Skip to content

Commit

Permalink
Merge pull request ARMmbed#1862 from ARMmbed/dhcp_client_generic_update
Browse files Browse the repository at this point in the history
Dhcp client generic update
  • Loading branch information
Juha Heiskanen authored Oct 12, 2018
2 parents 2ec9b6e + 999bbc3 commit d74d5ff
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 513 deletions.
14 changes: 7 additions & 7 deletions source/6LoWPAN/Thread/thread_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
#include "MPL/mpl.h"
#include "MLE/mle.h"
#include "MLE/mle_tlv.h"
#include "thread_dhcpv6_client.h"
#include "DHCPv6_client/dhcpv6_client_api.h"
#include "thread_config.h"
#include "thread_meshcop_lib.h"
#include "multicast_api.h"
Expand Down Expand Up @@ -890,7 +890,7 @@ void thread_interface_init(protocol_interface_info_entry_t *cur)
{
thread_discovery_reset(cur->id);
thread_routing_set_mesh_callbacks(cur);
thread_dhcp_client_init(cur->id);
dhcp_client_init(cur->id);
thread_management_client_init(cur->id);
thread_address_registration_init();
cur->mpl_seed_id_mode = MULTICAST_MPL_SEED_ID_MAC_SHORT;
Expand Down Expand Up @@ -1837,7 +1837,7 @@ static void thread_dhcp_client_gua_error_cb(int8_t interface, uint8_t dhcp_addr[
tr_warn("Address Get fail: %s from: %s", trace_ipv6(prefix), trace_ipv6(dhcp_addr));
if (prefix && dhcp_addr) {
tr_debug("Delete Current Server data");
thread_dhcp_client_global_address_delete(interface, dhcp_addr, prefix);
dhcp_client_global_address_delete(interface, dhcp_addr, prefix);
}
}
}
Expand Down Expand Up @@ -2295,7 +2295,7 @@ void thread_bootstrap_stop(protocol_interface_info_entry_t *cur)
thread_leader_service_leader_data_free(cur->thread_info);
thread_bootstrap_all_nodes_multicast_unregister(cur);
thread_data_base_init(cur->thread_info, cur->id);
thread_dhcp_client_delete(cur->id);
dhcp_client_delete(cur->id);
thread_nd_service_delete(cur->id);
thread_child_id_request_entry_clean(cur);
thread_registered_mcast_addr_entry_clean(cur);
Expand Down Expand Up @@ -2544,7 +2544,7 @@ int thread_bootstrap_network_data_process(protocol_interface_info_entry_t *cur,
memcpy(&addr[8], ADDR_SHORT_ADR_SUFFIC, 6);
common_write_16_bit(genericService.routerID, &addr[14]);
tr_debug("Delete DHCPv6 given address");
thread_dhcp_client_global_address_delete(cur->id, addr, prefixTlv.Prefix);
dhcp_client_global_address_delete(cur->id, addr, prefixTlv.Prefix);
}
}

Expand Down Expand Up @@ -2840,8 +2840,8 @@ void thread_bootstrap_network_prefixes_process(protocol_interface_info_entry_t *
if (!thread_dhcpv6_address_entry_available(curPrefix->servicesPrefix, &cur->ip_addresses)) {
thread_addr_write_mesh_local_16(addr, curBorderRouter->routerID, cur->thread_info);
/* Do not allow multiple DHCP solicits from one prefix => delete previous */
thread_dhcp_client_global_address_delete(cur->id, NULL, curPrefix->servicesPrefix);
if (thread_dhcp_client_get_global_address(cur->id, addr, curPrefix->servicesPrefix, cur->mac, thread_dhcp_client_gua_error_cb) == 0) {
dhcp_client_global_address_delete(cur->id, NULL, curPrefix->servicesPrefix);
if (dhcp_client_get_global_address(cur->id, addr, curPrefix->servicesPrefix, cur->mac, thread_dhcp_client_gua_error_cb) == 0) {
tr_debug("GP Address Requested");
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/6LoWPAN/Thread/thread_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "6LoWPAN/Thread/thread_beacon.h"
#include "6LoWPAN/Thread/thread_leader_service.h"
#include "6LoWPAN/Thread/thread_routing.h"
#include "6LoWPAN/Thread/thread_dhcpv6_client.h"
#include "DHCPv6_client/dhcpv6_client_api.h"
#include "6LoWPAN/Thread/thread_discovery.h"
#include "6LoWPAN/Thread/thread_bootstrap.h"
#include "6LoWPAN/Thread/thread_router_bootstrap.h"
Expand Down
Loading

0 comments on commit d74d5ff

Please sign in to comment.