From f44385378d2490b7b80c22c7da4bce812c592755 Mon Sep 17 00:00:00 2001 From: Deepak Venugopal Date: Tue, 5 Dec 2017 18:54:11 +0200 Subject: [PATCH] timeout corrected for neighbour entry (#1508) --- source/6LoWPAN/Thread/thread_extension_bbr.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/6LoWPAN/Thread/thread_extension_bbr.c b/source/6LoWPAN/Thread/thread_extension_bbr.c index a159f9f7709..5f8f242a410 100644 --- a/source/6LoWPAN/Thread/thread_extension_bbr.c +++ b/source/6LoWPAN/Thread/thread_extension_bbr.c @@ -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; } @@ -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) ) {