Skip to content

Commit 83fc53a

Browse files
Security policy check added. (#2004)
Thread devices that are not capable of becoming routers should not send parent response or child id response.
1 parent 345c34f commit 83fc53a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

source/6LoWPAN/Thread/thread_router_bootstrap.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,12 @@ void thread_router_bootstrap_mle_receive_cb(int8_t interface_id, mle_message_t *
14851485
return;
14861486
}
14871487

1488+
// check if security policy prevents sending of parent response
1489+
if (!thread_extension_is_reed_upgrade_allowed(cur)) {
1490+
tr_debug("Security policy prevents parent response; drop packet");
1491+
return;
1492+
}
1493+
14881494
if (thread_am_reed(cur)) {
14891495
// If we are in REED mode and receive PARENT_REQ from our parent, don't send response.
14901496
if (thread_router_parent_address_check(cur, mle_msg->packet_src_address)) {
@@ -1598,8 +1604,14 @@ void thread_router_bootstrap_mle_receive_cb(int8_t interface_id, mle_message_t *
15981604
return;
15991605
}
16001606

1601-
// If we are in REED mode and receive child ID request from our parent, call connection error.
1607+
// check if security policy prevents sending of child id response
1608+
if (!thread_extension_is_reed_upgrade_allowed(cur)) {
1609+
tr_debug("Security policy prevents child id response; drop packet");
1610+
return;
1611+
}
1612+
16021613
if (thread_am_reed(cur)) {
1614+
// If we are in REED mode and receive child ID request from our parent, call connection error.
16031615
if (thread_router_parent_address_check(cur, mle_msg->packet_src_address)) {
16041616
tr_debug("Child ID req from own parent -> connection error");
16051617
entry_temp = mac_neighbor_entry_get_by_ll64(mac_neighbor_info(cur), mle_msg->packet_src_address, false, NULL);

0 commit comments

Comments
 (0)