Skip to content

Commit

Permalink
Wi-sun NS Aro registration blacklisting update
Browse files Browse the repository at this point in the history
When NS ARO message send fail we must blacklist device also similar way than at receive NA ARO cache full message.

Change-Id: Ib5ad63e7ac6f0c145097df05c01632377ca35055
  • Loading branch information
Juha Heiskanen committed Jan 14, 2020
1 parent e3e5a00 commit 7606ee8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
6 changes: 2 additions & 4 deletions source/6LoWPAN/ws/ws_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,10 @@ void ws_common_neighbor_update(protocol_interface_info_entry_t *cur, const uint8
}
}

void ws_common_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t *ll_address, bool cache_full)
void ws_common_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t *ll_address)
{
tr_warn("ARO registration Failure %s", trace_ipv6(ll_address));
if (cache_full) {
blacklist_update(ll_address, false);
}
blacklist_update(ll_address, false);
ws_bootstrap_aro_failure(cur, ll_address);
}

Expand Down
4 changes: 2 additions & 2 deletions source/6LoWPAN/ws/ws_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void ws_common_fast_timer(protocol_interface_info_entry_t *cur, uint16_t ticks);

void ws_common_neighbor_update(protocol_interface_info_entry_t *cur, const uint8_t *ll_address);

void ws_common_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t *ll_address, bool cache_full);
void ws_common_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t *ll_address);

void ws_common_neighbor_remove(protocol_interface_info_entry_t *cur, const uint8_t *ll_address);

Expand All @@ -155,7 +155,7 @@ uint32_t ws_common_version_timeout_get(uint8_t config);
#define ws_info(cur) ((ws_info_t *) NULL)
#define ws_common_seconds_timer(cur, seconds)
#define ws_common_neighbor_update(cur, ll_address) ((void) 0)
#define ws_common_aro_failure(cur, ll_address, cache_full)
#define ws_common_aro_failure(cur, ll_address)
#define ws_common_neighbor_remove(cur, ll_address)
#define ws_common_fast_timer(cur, ticks) ((void) 0)
#define ws_common_allow_child_registration(cur, eui64) (false)
Expand Down
4 changes: 2 additions & 2 deletions source/Common_Protocols/icmpv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static void icmpv6_na_wisun_aro_handler(protocol_interface_info_entry_t *cur_int

(void)life_time;
if (nd_status != ARO_SUCCESS) {
ws_common_aro_failure(cur_interface, src_addr, true);
ws_common_aro_failure(cur_interface, src_addr);
}
}

Expand Down Expand Up @@ -1389,7 +1389,7 @@ static void icmpv6_aro_cb(buffer_t *buf, uint8_t status)
}
rpl_control_address_register_done(buf->interface, ll_address, status);
if (status != SOCKET_TX_DONE) {
ws_common_aro_failure(buf->interface, ll_address, false);
ws_common_aro_failure(buf->interface, ll_address);
}
}

Expand Down
3 changes: 1 addition & 2 deletions test/nanostack/unittest/stub/ws_common_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ bool ws_common_allow_child_registration(protocol_interface_info_entry_t *interfa
(void) interface;
return true;
}
void ws_common_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t *ll_address, bool cache_full)
void ws_common_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t *ll_address)
{
(void) cur;
(void) ll_address;
(void) cache_full;
}
void ws_common_neighbor_remove(protocol_interface_info_entry_t *cur, const uint8_t *ll_address)
{
Expand Down

0 comments on commit 7606ee8

Please sign in to comment.