diff --git a/source/6LoWPAN/Thread/thread_joiner_application.c b/source/6LoWPAN/Thread/thread_joiner_application.c index 741cbd656c1..65ecc0af52c 100644 --- a/source/6LoWPAN/Thread/thread_joiner_application.c +++ b/source/6LoWPAN/Thread/thread_joiner_application.c @@ -54,6 +54,7 @@ #include "thread_management_if.h" #include "thread_common.h" #include "thread_bootstrap.h" +#include "thread_router_bootstrap.h" #include "thread_network_synch.h" #include "thread_network_data_lib.h" #include "thread_joiner_application.h" @@ -1922,6 +1923,8 @@ int thread_joiner_application_update_configuration(uint8_t interface_id, uint8_t } thread_meshcop_tlv_data_get_uint64(msg_ptr, msg_len, MESHCOP_TLV_ACTIVE_TIME_STAMP, &this->active_configuration_ptr->timestamp); link_configuration_update(this->configuration_ptr,msg_ptr,msg_len); + // allow 5 seconds delay before state change for data response propagation + thread_router_bootstrap_delay_reed_jitter(interface_id, 5); ns_dyn_mem_free(configuration_ptr); thread_joiner_application_configuration_nvm_save(interface_id); diff --git a/source/6LoWPAN/Thread/thread_router_bootstrap.c b/source/6LoWPAN/Thread/thread_router_bootstrap.c index 127ea439d17..b149aa3af05 100644 --- a/source/6LoWPAN/Thread/thread_router_bootstrap.c +++ b/source/6LoWPAN/Thread/thread_router_bootstrap.c @@ -2782,4 +2782,18 @@ void thread_router_bootstrap_address_change_notify_send(protocol_interface_info_ thread_info(cur)->proactive_an_timer = THREAD_PROACTIVE_AN_SEND_DELAY; } +void thread_router_bootstrap_delay_reed_jitter(int8_t interface_id, uint16_t delay) +{ + protocol_interface_info_entry_t *cur = protocol_stack_interface_info_get_by_id(interface_id); + if (!cur) { + return; + } + if (cur->thread_info->thread_device_mode != THREAD_DEVICE_MODE_ROUTER) { + return; + } + // delay reed jitter timer to allow for settings changes to distribute + thread_info(cur)->reedJitterTimer += delay; + return; +} + #endif /* HAVE_THREAD_ROUTER */ diff --git a/source/6LoWPAN/Thread/thread_router_bootstrap.h b/source/6LoWPAN/Thread/thread_router_bootstrap.h index 5ab9f3fa087..6874a01b0bb 100644 --- a/source/6LoWPAN/Thread/thread_router_bootstrap.h +++ b/source/6LoWPAN/Thread/thread_router_bootstrap.h @@ -76,6 +76,7 @@ void thread_router_bootstrap_anycast_address_register(protocol_interface_info_en void thread_router_bootstrap_network_data_distribute(protocol_interface_info_entry_t *cur); bool thread_router_bootstrap_routing_allowed(struct protocol_interface_info_entry *cur); void thread_router_bootstrap_address_change_notify_send(protocol_interface_info_entry_t *cur); +void thread_router_bootstrap_delay_reed_jitter(int8_t interface_id, uint16_t delay); #else @@ -108,7 +109,7 @@ void thread_router_bootstrap_address_change_notify_send(protocol_interface_info_ #define thread_router_bootstrap_routing_allowed(cur) false #define thread_router_bootstrap_address_change_notify_send(cur) #define thread_router_bootstrap_reed_merge_advertisement(cur) - +#define thread_router_bootstrap_delay_reed_jitter(interface_id, delay) #endif/*HAVE_THREAD_ROUTER*/ #endif /* THREAD_ROUTER_BOOTSTRAP_H_ */