Skip to content

Commit

Permalink
duplicate address handling (ARMmbed#1709)
Browse files Browse the repository at this point in the history
handling of receipt of duplicate address in same thread network implemented.
  • Loading branch information
deepakvenugopal committed May 17, 2018
1 parent cb54705 commit b43db5f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/6LoWPAN/Thread/thread_extension_bbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,12 @@ static int thread_extension_bbr_dua_cb(int8_t service_id, uint8_t source_address
entry_keep_alive = false;
ipv6_route_t *route = thread_bbr_dua_entry_find(this->interface_id, addr_data_ptr);

if ( route != NULL && route->info.info != NULL) {
// new device has generated duplicate dua
if (route != NULL && route->info.info != NULL && memcmp(((thread_pbbr_dua_info_t *)route->info.info)->mleid_ptr,ml_eid_ptr,8) != 0) {
bbr_status = THREAD_BBR_STATUS_DUA_ALREADY_IN_USE;
goto send_response;
}
if (route != NULL && route->info.info != NULL && memcmp(((thread_pbbr_dua_info_t *)route->info.info)->mleid_ptr,ml_eid_ptr,8) == 0) {
((thread_pbbr_dua_info_t *)route->info.info)->last_contact_time = protocol_core_monotonic_time;
entry_keep_alive = true;
}
Expand Down

0 comments on commit b43db5f

Please sign in to comment.