@@ -153,17 +153,28 @@ static void ws_bootstrap_neighbor_list_clean(struct protocol_interface_info_entr
153
153
mac_neighbor_table_neighbor_list_clean (mac_neighbor_info (interface ));
154
154
}
155
155
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
+
156
163
static void ws_bootstrap_address_notification_cb (struct protocol_interface_info_entry * interface , const struct if_address_entry * addr , if_address_callback_t reason )
157
164
{
158
165
/* No need for LL address registration */
159
- if (addr -> source == ADDR_SOURCE_UNKNOWN ) {
166
+ if (addr -> source == ADDR_SOURCE_UNKNOWN || ! interface -> ws_info ) {
160
167
return ;
161
168
}
162
169
if (reason == ADDR_CALLBACK_DAD_COMPLETE ) {
163
170
//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
+
167
178
}
168
179
if (addr_ipv6_scope (addr -> address , interface ) > IPV6_SCOPE_LINK_LOCAL ) {
169
180
// at least ula address available inside mesh.
@@ -190,12 +201,6 @@ static void ws_bootstrap_address_notification_cb(struct protocol_interface_info_
190
201
break ;
191
202
}
192
203
}
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
- }
199
204
}
200
205
}
201
206
@@ -2089,7 +2094,7 @@ static void ws_dhcp_client_global_adress_cb(int8_t interface, uint8_t dhcp_addr[
2089
2094
if (register_status ) {
2090
2095
protocol_interface_info_entry_t * cur = protocol_stack_interface_info_get_by_id (interface );
2091
2096
if (cur ) {
2092
- ws_address_registration_update (cur , prefix );
2097
+ ws_address_reregister_trig (cur );
2093
2098
}
2094
2099
} else {
2095
2100
//Delete dhcpv6 client
0 commit comments