@@ -153,17 +153,28 @@ static void ws_bootstrap_neighbor_list_clean(struct protocol_interface_info_entr
153153 mac_neighbor_table_neighbor_list_clean (mac_neighbor_info (interface ));
154154}
155155
156+ static void ws_address_reregister_trig (struct protocol_interface_info_entry * interface )
157+ {
158+ if (interface -> ws_info -> aro_registration_timer == 0 ) {
159+ interface -> ws_info -> aro_registration_timer = WS_NEIGHBOR_NUD_TIMEOUT ;
160+ }
161+ }
162+
156163static void ws_bootstrap_address_notification_cb (struct protocol_interface_info_entry * interface , const struct if_address_entry * addr , if_address_callback_t reason )
157164{
158165 /* No need for LL address registration */
159- if (addr -> source == ADDR_SOURCE_UNKNOWN ) {
166+ if (addr -> source == ADDR_SOURCE_UNKNOWN || ! interface -> ws_info ) {
160167 return ;
161168 }
162169 if (reason == ADDR_CALLBACK_DAD_COMPLETE ) {
163170 //Trig Address Registartion only when Bootstrap is ready
164- if (interface -> nwk_bootstrap_state == ER_BOOTSRAP_DONE && addr -> source != ADDR_SOURCE_DHCP ) {
165- tr_debug ("Address registration %s" , trace_ipv6 (addr -> address ));
166- ws_address_registration_update (interface , addr -> address );
171+ if (addr -> source != ADDR_SOURCE_DHCP ) {
172+ if (interface -> nwk_bootstrap_state == ER_BOOTSRAP_DONE ) {
173+ tr_debug ("Address registration %s" , trace_ipv6 (addr -> address ));
174+ ws_address_registration_update (interface , addr -> address );
175+ }
176+ ws_address_reregister_trig (interface );
177+
167178 }
168179 if (addr_ipv6_scope (addr -> address , interface ) > IPV6_SCOPE_LINK_LOCAL ) {
169180 // at least ula address available inside mesh.
@@ -190,12 +201,6 @@ static void ws_bootstrap_address_notification_cb(struct protocol_interface_info_
190201 break ;
191202 }
192203 }
193- } else if (reason == ADDR_CALLBACK_TIMER ) {
194- if (addr -> source != ADDR_SOURCE_DHCP ) {
195- tr_debug ("Address Re registration %s" , trace_ipv6 (addr -> address ));
196- //Register
197- ws_address_registration_update (interface , addr -> address );
198- }
199204 }
200205}
201206
@@ -2089,7 +2094,7 @@ static void ws_dhcp_client_global_adress_cb(int8_t interface, uint8_t dhcp_addr[
20892094 if (register_status ) {
20902095 protocol_interface_info_entry_t * cur = protocol_stack_interface_info_get_by_id (interface );
20912096 if (cur ) {
2092- ws_address_registration_update (cur , prefix );
2097+ ws_address_reregister_trig (cur );
20932098 }
20942099 } else {
20952100 //Delete dhcpv6 client
0 commit comments