Skip to content

Commit fd4b2e9

Browse files
author
Juha Heiskanen
committed
WS ARO handler update
Do not accept new childs if temporary not have a any selected parent. Change-Id: I817dad0144cb614276b3e1847b4057dfa20ca289
1 parent e2d46b9 commit fd4b2e9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/6LoWPAN/ws/ws_common.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include "Service_Libs/etx/etx.h"
3232
#include "Service_Libs/mac_neighbor_table/mac_neighbor_table.h"
3333
#include "Service_Libs/blacklist/blacklist.h"
34+
#include "RPL/rpl_protocol.h"
35+
#include "RPL/rpl_control.h"
3436
#include "ws_management_api.h"
3537
#include "mac_api.h"
3638

@@ -404,6 +406,13 @@ bool ws_common_allow_child_registration(protocol_interface_info_entry_t *interfa
404406
return true;
405407
}
406408

409+
//Verify that we have Selected Parent
410+
if (interface->bootsrap_mode != ARM_NWK_BOOTSRAP_MODE_6LoWPAN_BORDER_ROUTER && !rpl_control_parent_candidate_list_size(interface, true)) {
411+
tr_info("Do not accept new ARO child: no selected parent");
412+
return false;
413+
}
414+
415+
407416
ns_list_foreach_safe(mac_neighbor_table_entry_t, cur, &mac_neighbor_info(interface)->neighbour_list) {
408417

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

0 commit comments

Comments
 (0)