Skip to content

Commit 7c7568d

Browse files
address error sent when matching entry found. (#1695)
1 parent 0860ae7 commit 7c7568d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/6LoWPAN/Thread/thread_extension_bbr.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ static int thread_pbbr_bb_qry_cb(int8_t service_id, uint8_t source_address[16],
468468
rloc_ptr = &rloc;
469469
}
470470

471-
uint32_t last_transaction_time = this->mlr_timeout > route->lifetime? this->mlr_timeout - route->lifetime : 0;
471+
uint32_t last_transaction_time = 30;
472472
uint8_t *ml_eid_ptr = &route->prefix[8];// TODO MLEID needs to be stored in own structure route->info.info and support for dealloc made
473473

474474
// This address is valid in our MESH
@@ -500,7 +500,7 @@ static int thread_pbbr_dua_duplicate_address_detection(int8_t service_id, uint8_
500500
}
501501

502502
// We have pending request and received answer
503-
if (memcmp(ml_eid_ptr,tr_ptr->ml_eid, 8) != 0){
503+
if (memcmp(ml_eid_ptr,tr_ptr->ml_eid, 8) == 0){
504504
// Different ml_eid but same address means duplicate address detected
505505
thread_resolution_client_address_error(this->interface_id, tr_ptr->source_address, tr_ptr->target_eid, tr_ptr->ml_eid);
506506
ipv6_neighbour_t *neighbour_entry;
@@ -1068,6 +1068,9 @@ bool thread_extension_bbr_nd_query_process(protocol_interface_info_entry_t *cur,
10681068

10691069
static void thread_extension_bbr_dad_process(protocol_interface_info_entry_t *cur, thread_pbbr_t *this, uint32_t seconds)
10701070
{
1071+
if (!this) {
1072+
return;
1073+
}
10711074
ns_list_foreach_safe(duplicate_dua_tr_t, cur_dup_tr, &duplicate_dua_tr_list) {
10721075
if (cur_dup_tr->interface_id != cur->id) {
10731076
continue;
@@ -1080,7 +1083,6 @@ static void thread_extension_bbr_dad_process(protocol_interface_info_entry_t *cu
10801083
if (cur_dup_tr->dua_dad_repeat > 0) {
10811084
cur_dup_tr->ttl = THREAD_BBR_DUA_DAD_QUERY_TIMEOUT;
10821085
thread_border_router_bb_qry_send(this,cur_dup_tr->target_eid,NULL);
1083-
return;
10841086
} else {
10851087
// dad completed
10861088
// send PRO_BB.ntf and delete dad entry

0 commit comments

Comments
 (0)