Skip to content

Commit 0860ae7

Browse files
author
Arto Kinnunen
authored
Keep parent mle_entry in child_update_req timeout (#1693)
When end device fails to attach to new partition it will return back to old partition. End device is not allowed to delete its parent mle_entry when parent has moved to new partition and attach fails.
1 parent 92044d6 commit 0860ae7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/6LoWPAN/Thread/thread_host_bootstrap.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ static void thread_mle_child_request_receive_cb(int8_t interface_id, mle_message
890890
break;
891891
}
892892
default:
893-
tr_debug("Unsupported TLV %d", mle_msg->message_type);
893+
tr_debug("Skip msg type %d", mle_msg->message_type);
894894
break;
895895

896896
}
@@ -998,7 +998,7 @@ static bool thread_child_id_req_timeout(int8_t interface_id, uint16_t msgId, boo
998998
cur->thread_info->thread_attach_scanned_parent->child_id_request_id = 0;
999999

10001000
uint8_t *addr = mle_service_get_msg_destination_address_pointer(msgId);
1001-
tr_debug("Child ID Request timed out, address: %s", trace_ipv6(addr));
1001+
tr_debug("Child ID Request timed out: %s", trace_ipv6(addr));
10021002

10031003
blacklist_update(addr, false);
10041004

@@ -1023,7 +1023,8 @@ 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) {
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
10271028
mle_class_remove_entry(cur->id, entry_temp);
10281029
}
10291030
}

0 commit comments

Comments
 (0)