Skip to content

Commit f443853

Browse files
timeout corrected for neighbour entry (ARMmbed#1508)
1 parent ea93c1f commit f443853

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

source/6LoWPAN/Thread/thread_extension_bbr.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ static int thread_extension_bbr_dua_cb(int8_t service_id, uint8_t source_address
714714
entry_keep_alive = false;
715715
}
716716

717-
if (thread_bbr_nd_entry_add(this->interface_id, addr_data_ptr, this->dua_timeout + this->delay_timer/500, NULL, ml_eid_ptr) == -1) {
717+
if (thread_bbr_nd_entry_add(this->interface_id, addr_data_ptr, 0xFFFFFFFF, NULL, ml_eid_ptr) == -1) {
718718
bbr_status = THREAD_BBR_STATUS_RESOURCE_SHORTAGE;
719719
goto send_response;
720720
}
@@ -968,6 +968,16 @@ void thread_extension_bbr_delete(int8_t interface_id)
968968
bool thread_extension_bbr_nd_query_process(protocol_interface_info_entry_t *cur, const uint8_t *target_addr)
969969
{
970970
uint8_t domain_prefix[8];
971+
if (thread_version < THREAD_VERSION_1_2) {
972+
return false;
973+
}
974+
thread_pbbr_t *this = thread_bbr_find_by_interface(cur->id);
975+
if (!this) {
976+
return false;
977+
}
978+
if (!this->pbbr_started) {
979+
return false;
980+
}
971981
// if we have DUA addressing enabled
972982
if ( thread_extension_network_prefix_get(cur->id, NULL, domain_prefix, NULL) == 0 &&
973983
bitsequal(domain_prefix,target_addr,64) ) {

0 commit comments

Comments
 (0)