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
2149
2149
uint16_t my_short_address ;
2150
2150
uint8_t parent_mac64 [8 ];
2151
2151
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
+
2152
2158
int link_info_err = thread_nvm_store_link_info_get (parent_mac64 , & my_short_address );
2153
2159
if ( link_info_err != THREAD_NVM_FILE_SUCCESS ) {
2154
2160
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
2157
2163
link_info_err = thread_nvm_store_link_info_clear ();
2158
2164
if ( link_info_err != THREAD_NVM_FILE_SUCCESS ) {
2159
2165
tr_warning ("thread_nvm_store_link_info_clear returned %d" , link_info_err );
2160
- }
2166
+ }
2161
2167
if (thread_is_router_addr (my_short_address )) {
2162
2168
thread_info (cur )-> routerShortAddress = my_short_address ;
2163
2169
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)
226
226
ret_val = nwk_6lowpan_up (cur );
227
227
228
228
cur -> nwk_nd_re_scan_count = 0 ;
229
+ cur -> thread_info -> link_sync_allowed = true;
229
230
230
231
return ret_val ;
231
232
}
Original file line number Diff line number Diff line change @@ -328,6 +328,7 @@ typedef struct thread_info_s {
328
328
bool networkDataRequested : 1 ;
329
329
bool end_device_link_synch : 1 ;
330
330
bool router_mc_addrs_registered : 1 ;
331
+ bool link_sync_allowed :1 ;
331
332
bool leader_synced :1 ; // flag used by leader after restart
332
333
} thread_info_t ;
333
334
You can’t perform that action at this time.
0 commit comments