Skip to content

Commit

Permalink
gnrc/ipv6/nib: allow for predictable static link-local addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Jan 3, 2024
1 parent 26682d8 commit 4ca2dab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sys/net/gnrc/network_layer/ipv6/nib/nib.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ static void _add_static_lladdr(gnrc_netif_t *netif)
ipv6_addr_t lladdr;

if (ipv6_addr_from_str(&lladdr, lladdr_str) != NULL) {
lladdr.u8[15] += netif->pid;
if (!IS_ACTIVE(CONFIG_GNRC_IPV6_STATIC_LLADDR_IS_FIXED)) {
lladdr.u8[15] += netif->pid;
}
assert(ipv6_addr_is_link_local(&lladdr));
gnrc_netif_ipv6_addr_add_internal(
netif, &lladdr, 64U, GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_VALID
Expand Down

0 comments on commit 4ca2dab

Please # to comment.