Skip to content

Commit

Permalink
timeout corrected for neighbour entry (ARMmbed#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakvenugopal authored Dec 5, 2017
1 parent ea93c1f commit f443853
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion source/6LoWPAN/Thread/thread_extension_bbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ static int thread_extension_bbr_dua_cb(int8_t service_id, uint8_t source_address
entry_keep_alive = false;
}

if (thread_bbr_nd_entry_add(this->interface_id, addr_data_ptr, this->dua_timeout + this->delay_timer/500, NULL, ml_eid_ptr) == -1) {
if (thread_bbr_nd_entry_add(this->interface_id, addr_data_ptr, 0xFFFFFFFF, NULL, ml_eid_ptr) == -1) {
bbr_status = THREAD_BBR_STATUS_RESOURCE_SHORTAGE;
goto send_response;
}
Expand Down Expand Up @@ -968,6 +968,16 @@ void thread_extension_bbr_delete(int8_t interface_id)
bool thread_extension_bbr_nd_query_process(protocol_interface_info_entry_t *cur, const uint8_t *target_addr)
{
uint8_t domain_prefix[8];
if (thread_version < THREAD_VERSION_1_2) {
return false;
}
thread_pbbr_t *this = thread_bbr_find_by_interface(cur->id);
if (!this) {
return false;
}
if (!this->pbbr_started) {
return false;
}
// if we have DUA addressing enabled
if ( thread_extension_network_prefix_get(cur->id, NULL, domain_prefix, NULL) == 0 &&
bitsequal(domain_prefix,target_addr,64) ) {
Expand Down

0 comments on commit f443853

Please sign in to comment.