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