Skip to content

Commit b43db5f

Browse files
duplicate address handling (ARMmbed#1709)
handling of receipt of duplicate address in same thread network implemented.
1 parent cb54705 commit b43db5f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source/6LoWPAN/Thread/thread_extension_bbr.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,12 @@ static int thread_extension_bbr_dua_cb(int8_t service_id, uint8_t source_address
824824
entry_keep_alive = false;
825825
ipv6_route_t *route = thread_bbr_dua_entry_find(this->interface_id, addr_data_ptr);
826826

827-
if ( route != NULL && route->info.info != NULL) {
827+
// new device has generated duplicate dua
828+
if (route != NULL && route->info.info != NULL && memcmp(((thread_pbbr_dua_info_t *)route->info.info)->mleid_ptr,ml_eid_ptr,8) != 0) {
829+
bbr_status = THREAD_BBR_STATUS_DUA_ALREADY_IN_USE;
830+
goto send_response;
831+
}
832+
if (route != NULL && route->info.info != NULL && memcmp(((thread_pbbr_dua_info_t *)route->info.info)->mleid_ptr,ml_eid_ptr,8) == 0) {
828833
((thread_pbbr_dua_info_t *)route->info.info)->last_contact_time = protocol_core_monotonic_time;
829834
entry_keep_alive = true;
830835
}

0 commit comments

Comments
 (0)