Skip to content

Commit 33c48eb

Browse files
author
Mika Tervonen
committed
Removed NUD messages from registered children
When we would send a NUD to check link status we skip it if there is a valid ARO registration for that neighbour
1 parent ec2ea92 commit 33c48eb

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,8 @@ static void ws_neighbor_entry_remove_notify(mac_neighbor_table_entry_t *entry_pt
16291629
static bool ws_neighbor_entry_nud_notify(mac_neighbor_table_entry_t *entry_ptr, void *user_data)
16301630
{
16311631
uint32_t time_from_start = entry_ptr->link_lifetime - entry_ptr->lifetime;
1632+
uint8_t ll_address[16];
1633+
bool nud_proces = false;
16321634
bool activate_nud = false;
16331635
protocol_interface_info_entry_t *cur = user_data;
16341636

@@ -1639,17 +1641,22 @@ static bool ws_neighbor_entry_nud_notify(mac_neighbor_table_entry_t *entry_ptr,
16391641
return false;
16401642
}
16411643

1642-
uint8_t ll_address[16];
1643-
bool nud_proces = false;
1644+
ws_bootsrap_create_ll_address(ll_address, entry_ptr->mac64);
1645+
16441646
if (time_from_start > WS_NEIGHBOR_NUD_TIMEOUT) {
16451647

1646-
ws_bootsrap_create_ll_address(ll_address, entry_ptr->mac64);
1648+
if (ipv6_neighbour_has_registered_by_eui64(&cur->ipv6_neighbour_cache, entry_ptr->mac64)) {
1649+
// This is our child with valid ARO registration Change link timeout to future we check at 2 minute intervals
1650+
entry_ptr->lifetime = entry_ptr->lifetime + 120;
1651+
if (entry_ptr->lifetime > entry_ptr->link_lifetime) {
1652+
entry_ptr->lifetime = entry_ptr->link_lifetime;
1653+
}
1654+
return false;
1655+
}
16471656

16481657
if (!rpl_control_is_dodag_parent_candidate(cur, ll_address, WS_NEIGHBOUR_MAX_CANDIDATE_PROBE)) {
1649-
if (!ipv6_neighbour_has_registered_by_eui64(&cur->ipv6_neighbour_cache, entry_ptr->mac64)) {
1650-
//NUD Not needed for if neighbour is not child or parent candidate
1651-
return false;
1652-
}
1658+
//NUD Not needed for if neighbour is not parent candidate
1659+
return false;
16531660
}
16541661

16551662
if (time_from_start > WS_NEIGHBOR_NUD_TIMEOUT * 1.5) {

0 commit comments

Comments
 (0)