Skip to content

Commit 4c50e52

Browse files
author
Mika Leppänen
committed
Added disabling of NA for Wi-SUN BR PPP backbone
If backbone is PPP and not ethernet, BR no longer sends neighbor advertisements to the interface when new address is registered.
1 parent d2ea325 commit 4c50e52

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

source/6LoWPAN/ws/ws_bbr_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ static void wisun_bbr_na_send(int8_t interface_id, const uint8_t target[static 1
239239
if (!cur) {
240240
return;
241241
}
242+
// Send NA only if it is enabled for the backhaul
243+
if (!cur->send_na) {
244+
return;
245+
}
242246

243247
buffer_t *buffer = icmpv6_build_na(cur, false, true, true, target, NULL, ADDR_UNSPECIFIED);
244248
protocol_push(buffer);

source/NWK_INTERFACE/Include/protocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ struct protocol_interface_info_entry {
410410
bool mpl_treat_realm_domains_as_one: 1;
411411
bool mpl_auto_domain_on_group_join: 1;
412412
#endif
413+
bool send_na : 1;
413414
/* RFC 4861 Router Variables */
414415
bool ip_forwarding : 1;
415416
bool ip_multicast_forwarding : 1;

source/NWK_INTERFACE/protocol_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ static void protocol_core_base_finish_init(protocol_interface_info_entry_t *entr
485485
entry->dad_failures = 0;
486486
entry->icmp_tokens = 10;
487487
entry->mle_link_reject_tokens = 2;
488+
entry->send_na = true; /* Default to on for now... */
488489
entry->ip_forwarding = true; /* Default to on for now... */
489490
entry->ip_multicast_forwarding = true; /* Default to on for now... */
490491
#ifdef HAVE_IPV6_ND
@@ -936,6 +937,7 @@ protocol_interface_info_entry_t *protocol_stack_interface_generate_ppp(eth_mac_a
936937
memcpy(new_entry->iid_eui64, iid64, 8);
937938
new_entry->send_mld = false; // No mld for PPP
938939
new_entry->dup_addr_detect_transmits = 0; // No duplicate detection for PPP
940+
new_entry->send_na = false; // No neighbor advertisements for PPP
939941

940942
ns_list_add_to_start(&protocol_interface_info_list, new_entry);
941943

0 commit comments

Comments
 (0)