Skip to content

Commit b67f2d8

Browse files
author
Arto Kinnunen
authored
Reset children when no response from parent (ARMmbed#1698)
Reset children if old parent does not respond to child_id_request.
1 parent 3569c8a commit b67f2d8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

source/6LoWPAN/Thread/thread_host_bootstrap.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,13 @@ static bool thread_child_id_req_timeout(int8_t interface_id, uint16_t msgId, boo
10231023
ll64[8] ^= 2;
10241024

10251025
entry_temp = mle_class_get_entry_by_ll64(cur->id, scanned_parent->linkMarginToParent, ll64, false, NULL);
1026-
if (entry_temp && !thread_check_is_this_my_parent(cur, entry_temp)) {
1027-
// remove scanned_parent entry only if it is not my parent
1026+
if (entry_temp) {
1027+
if (thread_check_is_this_my_parent(cur, entry_temp)) {
1028+
tr_debug("No parent resp - any-attach");
1029+
thread_bootstrap_connection_error(interface_id, CON_ERROR_NETWORK_ATTACH_FAIL, NULL);
1030+
goto exit;
1031+
}
1032+
// remove scanned_parent mle-entry as it was not my parent
10281033
mle_class_remove_entry(cur->id, entry_temp);
10291034
}
10301035
}

0 commit comments

Comments
 (0)