1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 16:31:18 +01:00

Merge pull request #10483 from miri64/gnrc_ipv6_nib/fix/no-auto-config-wo-l2addr

gnrc_ipv6_nib: don't autoconfig IPv6 address without L2 addr
This commit is contained in:
Martine Lenders 2019-04-19 08:53:25 +02:00 committed by GitHub
commit 9a6473104d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,10 @@ void _auto_configure_addr(gnrc_netif_t *netif, const ipv6_addr_t *pfx,
int idx;
uint8_t flags = GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_TENTATIVE;
if (!(netif->flags & GNRC_NETIF_FLAGS_HAS_L2ADDR)) {
DEBUG("nib: interface %i has no link-layer addresses\n", netif->pid);
return;
}
DEBUG("nib: add address based on %s/%u automatically to interface %u\n",
ipv6_addr_to_str(addr_str, pfx, sizeof(addr_str)),
pfx_len, netif->pid);