Skip to content

Commit

Permalink
propagation of reserved bit in network data implemented. (ARMmbed#1827)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakvenugopal authored Sep 24, 2018
1 parent e7fa605 commit 06e3243
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion source/6LoWPAN/Thread/thread_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ static void thread_bootstrap_ml_address_update(protocol_interface_info_entry_t *

// Generate new ML64 address
thread_generate_ml64_address(cur);

// Generate new domain address
thread_extension_address_generate(cur);

Expand Down Expand Up @@ -2523,6 +2524,7 @@ int thread_bootstrap_network_data_process(protocol_interface_info_entry_t *cur,
genericService.P_slaac = ((flags >> THREAD_P_SLAAC_BIT_MOVE) & 1);
genericService.P_on_mesh = ((flags >> THREAD_P_ON_MESH_BIT_MOVE) & 1);
genericService.P_nd_dns = ((flags >> THREAD_P_ND_DNS_BIT_MOVE) & 1);
genericService.P_res1 = ((flags >> THREAD_P_ND_RES_BIT_MOVE) & 1);
if (thread_nd_local_list_add_on_mesh_prefix(networkDataStorage, &prefixTlv, &genericService) == 0) {
if (networkDataStorage->stableUpdatePushed || networkDataStorage->temporaryUpdatePushed) {
if (!genericService.P_slaac) {
Expand Down Expand Up @@ -2770,7 +2772,6 @@ int thread_bootstrap_network_data_save(protocol_interface_info_entry_t *cur, thr
return 0;
}


void thread_bootstrap_network_prefixes_process(protocol_interface_info_entry_t *cur)
{
// Route prefix is variable-length, so need to zero pad for ip6tos
Expand Down
6 changes: 4 additions & 2 deletions source/6LoWPAN/Thread/thread_network_data_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static uint16_t thread_nd_service_border_router_flags_read(thread_network_server
flags |= (cur->P_default_route << THREAD_P_DEF_ROUTE_BIT_MOVE);
flags |= (cur->P_on_mesh << THREAD_P_ON_MESH_BIT_MOVE);
flags |= (cur->P_nd_dns << THREAD_P_ND_DNS_BIT_MOVE);
flags |= (cur->P_res1 << THREAD_P_ND_RES_BIT_MOVE);
return flags;
}

Expand Down Expand Up @@ -1628,6 +1629,7 @@ int thread_nd_local_list_add_on_mesh_prefix(thread_network_data_cache_entry_t *n
server_entry->P_nd_dns = service->P_nd_dns;
trigDataPropagate = true;
}

}

if (trigDataPropagate) {
Expand Down Expand Up @@ -1707,9 +1709,9 @@ int thread_nd_local_list_del_on_mesh_server(thread_network_data_cache_entry_t *n
int thread_local_server_list_add_on_mesh_server(thread_network_local_data_cache_entry_t *networkDataList, thread_prefix_tlv_t *prefixTlv, thread_border_router_tlv_entry_t *service)
{
int retVal = -1;
tr_debug("Add prefix: %s prf:%d %s%s%s%s%s", trace_ipv6_prefix(prefixTlv->Prefix, prefixTlv->PrefixLen), service->Prf,
tr_debug("Add prefix: %s prf:%d %s%s%s%s%s%s", trace_ipv6_prefix(prefixTlv->Prefix, prefixTlv->PrefixLen), service->Prf,
service->P_default_route?"Default Route ":"",service->P_dhcp?"DHCPv6 Server ":"", service->P_configure?"DHCPv6 Configuration ":"",
service->P_slaac?"SLAAC ":"",service->P_preferred?"Preferred ":"");
service->P_slaac?"SLAAC ":"",service->P_preferred?"Preferred ":"",service->P_res1?"P_res1 ":"");

if (networkDataList) {
thread_network_local_data_entry_t *prefix_entry = thread_local_prefix_entry_get(&networkDataList->prefix_list, prefixTlv);
Expand Down

0 comments on commit 06e3243

Please sign in to comment.