Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnrc_ipv6_nib: don't auto-configure IPv6 w/o SLAAC on non-6LN interface #12513

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <stdbool.h>

#include "log.h"
#include "luid.h"
#include "net/gnrc/netif/internal.h"

Expand All @@ -34,6 +35,15 @@ 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 !GNRC_IPV6_NIB_CONF_SLAAC
if (!gnrc_netif_is_6ln(netif)) {
LOG_WARNING("SLAAC not activated; will not auto-configure IPv6 address "
"for interface %u.\n"
" Use GNRC_IPV6_NIB_CONF_SLAAC=1 to activate.\n",
netif->pid);
return;
}
#endif
if (!(netif->flags & GNRC_NETIF_FLAGS_HAS_L2ADDR)) {
DEBUG("nib: interface %i has no link-layer addresses\n", netif->pid);
return;
Expand Down