@@ -1011,10 +1011,19 @@ static void thread_bootstrap_client_router_id_cb(int8_t interface_id, int8_t sta
1011
1011
parent_router_id = cur -> thread_info -> thread_endnode_parent -> router_id ;
1012
1012
}
1013
1013
1014
+ tr_info ("Thread Short address changed old: %x new: %x" , cur -> thread_info -> routerShortAddress , router_rloc );
1015
+ /*the default routerShortAddress if nothing is requested is 0xfffe so eliminate this case
1016
+ Also make sure that the child info (from previous partition if any)
1017
+ is cleared if the router address requested is not what is got from leader */
1018
+ if ( cur -> thread_info -> routerShortAddress != router_rloc ) {
1019
+ thread_router_bootstrap_child_information_clear (cur );
1020
+ }
1021
+ // Release network data from old address
1022
+ cur -> thread_info -> localServerDataBase .release_old_address = true;
1023
+
1014
1024
//ADD New ML16
1015
1025
// This should be used thread_bootstrap_update_ml16_address(cur, router_rloc);
1016
1026
thread_clean_old_16_bit_address_based_addresses (cur );
1017
-
1018
1027
mac_helper_mac16_address_set (cur , router_rloc );
1019
1028
cur -> thread_info -> routerShortAddress = router_rloc ;
1020
1029
memcpy (ml16 , cur -> thread_info -> threadPrivatePrefixInfo .ulaPrefix , 8 );
@@ -1028,16 +1037,6 @@ static void thread_bootstrap_client_router_id_cb(int8_t interface_id, int8_t sta
1028
1037
return ;
1029
1038
}
1030
1039
1031
- tr_info ("Thread Short address changed old: %x new: %x" , cur -> thread_info -> routerShortAddress , router_rloc );
1032
- /*the default routerShortAddress if nothing is requested is 0xfffe so eliminate this case
1033
- Also make sure that the child info (from previous partition if any)
1034
- is cleared if the router address requested is not what is got from leader */
1035
- if (cur -> thread_info -> routerShortAddress != router_rloc ) {
1036
- thread_router_bootstrap_child_information_clear (cur );
1037
- }
1038
- // Release network data from old address
1039
- cur -> thread_info -> localServerDataBase .release_old_address = true;
1040
-
1041
1040
// /* XXX Is short_src_adr ever reset? Is it undefined if info not in msg? */
1042
1041
tr_debug ("Route seq %d Router mask: %s" , routeId , trace_array (router_mask_ptr , 8 ));
1043
1042
cur -> thread_info -> routing .router_id_sequence_valid = false;
0 commit comments