[PATCH 1/1] mesh: Handle KeyRefresh phase set to 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prathyusha N <prathyusha.n@xxxxxxxxxxx>

If keyRefresh phase 3 is already completed then respond with
current phase state and status as SUCCESS.
---
 mesh/net.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mesh/net.c b/mesh/net.c
index ec05b6be9..91d14b0b3 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -3419,6 +3419,9 @@ uint8_t mesh_net_key_refresh_phase_set(struct mesh_net *net, uint16_t idx,
 	if (transition == subnet->kr_phase)
 		return MESH_STATUS_SUCCESS;
 
+	if (transition == 3 && subnet->kr_phase == KEY_REFRESH_PHASE_NONE)
+		return MESH_STATUS_SUCCESS;
+
 	if ((transition != 2 && transition != 3) ||
 						transition < subnet->kr_phase)
 		return MESH_STATUS_CANNOT_SET;
-- 
2.17.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux