Skip to content

Commit

Permalink
WS ARO handler update
Browse files Browse the repository at this point in the history
Do not accept new childs if temporary not have a any selected parent.

Change-Id: I817dad0144cb614276b3e1847b4057dfa20ca289
  • Loading branch information
Juha Heiskanen committed Sep 10, 2019
1 parent e2d46b9 commit fd4b2e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/6LoWPAN/ws/ws_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "Service_Libs/etx/etx.h"
#include "Service_Libs/mac_neighbor_table/mac_neighbor_table.h"
#include "Service_Libs/blacklist/blacklist.h"
#include "RPL/rpl_protocol.h"
#include "RPL/rpl_control.h"
#include "ws_management_api.h"
#include "mac_api.h"

Expand Down Expand Up @@ -404,6 +406,13 @@ bool ws_common_allow_child_registration(protocol_interface_info_entry_t *interfa
return true;
}

//Verify that we have Selected Parent
if (interface->bootsrap_mode != ARM_NWK_BOOTSRAP_MODE_6LoWPAN_BORDER_ROUTER && !rpl_control_parent_candidate_list_size(interface, true)) {
tr_info("Do not accept new ARO child: no selected parent");
return false;
}


ns_list_foreach_safe(mac_neighbor_table_entry_t, cur, &mac_neighbor_info(interface)->neighbour_list) {

if (ipv6_neighbour_has_registered_by_eui64(&interface->ipv6_neighbour_cache, cur->mac64)) {
Expand Down

0 comments on commit fd4b2e9

Please sign in to comment.