@@ -473,7 +473,7 @@ static int thread_pbbr_bb_qry_cb(int8_t service_id, uint8_t source_address[16],
473
473
}
474
474
475
475
uint32_t last_transaction_time = protocol_core_monotonic_time - ((thread_pbbr_dua_info_t * )route -> info .info )-> last_contact_time ;
476
- 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
476
+ uint8_t * ml_eid_ptr = (( thread_pbbr_dua_info_t * ) route -> info .info ) -> mleid_ptr ;
477
477
478
478
// This address is valid in our MESH
479
479
thread_border_router_bb_ans_send (this , source_address , addr_data_ptr , ml_eid_ptr , last_transaction_time , link_configuration_ptr -> name , rloc_ptr );
@@ -515,7 +515,7 @@ static void thread_pbbr_pro_bb_ntf_process(protocol_interface_info_entry_t *cur,
515
515
516
516
remove_entry :
517
517
tr_info ("Remove dua registration for %s" , trace_ipv6 (addr_data_ptr ));
518
- ipv6_route_delete (route -> prefix , route -> prefix_len , cur -> id , route -> info . next_hop_addr , ROUTE_THREAD_PROXIED_DUA_HOST );
518
+ ipv6_route_delete (addr_data_ptr , 128 , cur -> id , NULL , ROUTE_THREAD_PROXIED_DUA_HOST );
519
519
return ;
520
520
}
521
521
@@ -542,7 +542,7 @@ static int thread_pbbr_dua_duplicate_address_detection(int8_t service_id, uint8_
542
542
}
543
543
544
544
// We have pending request and received answer
545
- if (memcmp (ml_eid_ptr ,tr_ptr -> ml_eid , 8 ) == 0 ){
545
+ if (memcmp (ml_eid_ptr ,tr_ptr -> ml_eid , 8 ) != 0 && memcmp ( addr_data_ptr , tr_ptr -> source_address , 16 ) == 0 ){
546
546
// Different ml_eid but same address means duplicate address detected
547
547
thread_resolution_client_address_error (this -> interface_id , tr_ptr -> source_address , tr_ptr -> target_eid , tr_ptr -> ml_eid );
548
548
ipv6_neighbour_t * neighbour_entry ;
@@ -551,7 +551,7 @@ static int thread_pbbr_dua_duplicate_address_detection(int8_t service_id, uint8_
551
551
tr_debug ("Remove from neigh Cache: %s" , tr_ipv6 (tr_ptr -> target_eid ));
552
552
ipv6_neighbour_entry_remove (& cur -> ipv6_neighbour_cache , neighbour_entry );
553
553
}
554
- ipv6_route_delete (route -> prefix , route -> prefix_len , this -> interface_id , route -> info . next_hop_addr , ROUTE_THREAD_PROXIED_DUA_HOST );
554
+ ipv6_route_delete (route -> prefix , route -> prefix_len , this -> interface_id , NULL , ROUTE_THREAD_PROXIED_DUA_HOST );
555
555
}
556
556
return 0 ;
557
557
}
@@ -855,18 +855,6 @@ static int thread_extension_bbr_dua_cb(int8_t service_id, uint8_t source_address
855
855
thread_border_router_bb_qry_send (this ,addr_data_ptr ,NULL );
856
856
857
857
}
858
- // TODO
859
- // Save RLOC to destination cache with Last transaction time. Should these be made as sticky or should I have own table for these?
860
- // send Proactive ND with override
861
- // Send PRO_BB.ntf
862
-
863
- // If new registration
864
- // Send BB.qry wait DUA_DUPL_CHECK_PERIOD == 1 second. own table needed for pending queries?
865
- // Repeat the message?
866
- // if response with different EID send error
867
- // Store the information
868
-
869
-
870
858
871
859
send_response :
872
860
0 commit comments