File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,12 @@ static void ws_bootstrap_address_notification_cb(struct protocol_interface_info_
159
159
} else if (reason == ADDR_CALLBACK_DELETED ) {
160
160
// What to do?
161
161
// Go through address list and check if there is global address still available
162
+ if (addr -> source == ADDR_SOURCE_DHCP ) {
163
+ //Deprecate dhcpv address
164
+ uint8_t address [16 ];
165
+ memcpy (address , addr -> address , 16 );
166
+ dhcp_client_global_address_delete (interface -> id , NULL , address );
167
+ }
162
168
//Discover prefix policy
163
169
addr_policy_remove_by_label (WS_NON_PREFFRED_LABEL );
164
170
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ void dhcp_client_delete(int8_t interface)
96
96
{
97
97
protocol_interface_info_entry_t * cur = NULL ;
98
98
dhcpv6_client_server_data_t * srv_data_ptr ;
99
-
99
+ uint8_t temporary_address [ 16 ];
100
100
dhcp_service_delete (dhcp_client .service_instance );
101
101
102
102
@@ -110,9 +110,11 @@ void dhcp_client_delete(int8_t interface)
110
110
srv_data_ptr = libdhcpv6_nonTemporal_entry_get_by_instance (dhcp_client .libDhcp_instance );
111
111
if (srv_data_ptr != NULL ) {
112
112
tr_debug ("Free DHCPv6 Client\n" );
113
+ memcpy (temporary_address , srv_data_ptr -> iaNontemporalAddress .addressPrefix , 16 );
113
114
dhcp_service_req_remove (srv_data_ptr -> transActionId );// remove all pending retransmissions
114
- addr_delete (cur , srv_data_ptr -> iaNontemporalAddress .addressPrefix );
115
115
libdhcvp6_nontemporalAddress_server_data_free (srv_data_ptr );
116
+ addr_delete (cur , temporary_address );
117
+
116
118
}
117
119
} while (srv_data_ptr != NULL );
118
120
dhcp_client .service_instance = 0 ;
You can’t perform that action at this time.
0 commit comments