Skip to content

Commit e38c70f

Browse files
Mika Tervonendeepakvenugopal
authored andcommitted
fix duplicate address detection (ARMmbed#1760)
1 parent 7648c1c commit e38c70f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/6LoWPAN/Thread/thread_extension_bbr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static int thread_pbbr_dua_duplicate_address_detection(int8_t service_id, uint8_
546546
}
547547

548548
// We have pending request and received answer
549-
if (memcmp(ml_eid_ptr,tr_ptr->ml_eid, 8) != 0 && memcmp(addr_data_ptr, tr_ptr->source_address, 16) == 0){
549+
if (memcmp(ml_eid_ptr,tr_ptr->ml_eid, 8) != 0) {
550550
// Different ml_eid but same address means duplicate address detected
551551
thread_resolution_client_address_error(this->interface_id, tr_ptr->source_address, tr_ptr->target_eid, tr_ptr->ml_eid);
552552
ipv6_neighbour_t *neighbour_entry;
@@ -556,6 +556,7 @@ static int thread_pbbr_dua_duplicate_address_detection(int8_t service_id, uint8_
556556
ipv6_neighbour_entry_remove(&cur->ipv6_neighbour_cache, neighbour_entry);
557557
}
558558
ipv6_route_delete(route->prefix, route->prefix_len, this->interface_id, NULL, ROUTE_THREAD_PROXIED_DUA_HOST);
559+
thread_border_router_dup_tr_delete(tr_ptr);
559560
}
560561

561562
return 0;

0 commit comments

Comments
 (0)