File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2149,6 +2149,12 @@ static bool thread_bootstrap_sync_after_reset_start(protocol_interface_info_entr
21492149 uint16_t my_short_address ;
21502150 uint8_t parent_mac64 [8 ];
21512151
2152+ // link sync is allowed only once in bootstrap start and we might get here in other cases also
2153+ if (!cur -> thread_info -> link_sync_allowed ) {
2154+ return false;
2155+ }
2156+ cur -> thread_info -> link_sync_allowed = false;
2157+
21522158 int link_info_err = thread_nvm_store_link_info_get (parent_mac64 , & my_short_address );
21532159 if ( link_info_err != THREAD_NVM_FILE_SUCCESS ) {
21542160 tr_warning ("thread_nvm_store_link_info_get returned %d" , link_info_err );
@@ -2157,7 +2163,7 @@ static bool thread_bootstrap_sync_after_reset_start(protocol_interface_info_entr
21572163 link_info_err = thread_nvm_store_link_info_clear ();
21582164 if ( link_info_err != THREAD_NVM_FILE_SUCCESS ) {
21592165 tr_warning ("thread_nvm_store_link_info_clear returned %d" , link_info_err );
2160- }
2166+ }
21612167 if (thread_is_router_addr (my_short_address )) {
21622168 thread_info (cur )-> routerShortAddress = my_short_address ;
21632169 thread_dynamic_storage_build_mle_table (cur -> id );
Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ int8_t thread_bootstrap_up(protocol_interface_info_entry_t *cur)
226226 ret_val = nwk_6lowpan_up (cur );
227227
228228 cur -> nwk_nd_re_scan_count = 0 ;
229+ cur -> thread_info -> link_sync_allowed = true;
229230
230231 return ret_val ;
231232}
Original file line number Diff line number Diff line change @@ -328,6 +328,7 @@ typedef struct thread_info_s {
328328 bool networkDataRequested : 1 ;
329329 bool end_device_link_synch : 1 ;
330330 bool router_mc_addrs_registered : 1 ;
331+ bool link_sync_allowed :1 ;
331332 bool leader_synced :1 ; // flag used by leader after restart
332333} thread_info_t ;
333334
You can’t perform that action at this time.
0 commit comments