Skip to content

Commit

Permalink
gnrc_ipv6_nib: disable router advertisements on interface startup
Browse files Browse the repository at this point in the history
Router Advertisements are enabled automatically for routing nodes
as soon as they obtain a prefix (e.g. via DHCPv6, UHCP, …).

Enabling router advertisements without a prefix to advertise is
wrong and causes no router solicitations to be send on an upstream
interface.

Also from https://www.rfc-editor.org/rfc/rfc4861#section-6.2.1

	Note that AdvSendAdvertisements MUST be FALSE by
	default so that a node will not accidentally start
	acting as a router unless it is explicitly
	configured by system management to send Router
	Advertisements.
  • Loading branch information
benpicco committed Sep 11, 2023
1 parent f1df27b commit 0572a95
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions sys/include/net/gnrc/ipv6/nib/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,11 @@ extern "C" {
#endif

/**
* @brief (de-)activate router advertising at interface start-up
* @brief activate router advertising at interface start-up
*/
#ifndef CONFIG_GNRC_IPV6_NIB_ADV_ROUTER
#if CONFIG_GNRC_IPV6_NIB_ROUTER && \
(!CONFIG_GNRC_IPV6_NIB_6LR || CONFIG_GNRC_IPV6_NIB_6LBR) && \
!(IS_USED(MODULE_DHCPV6_CLIENT_IA_PD) || IS_USED(MODULE_GNRC_UHCPC) || \
IS_USED(MODULE_GNRC_IPV6_AUTO_SUBNETS) || IS_USED(MODULE_GNRC_IPV6_STATIC_ADDR))
#define CONFIG_GNRC_IPV6_NIB_ADV_ROUTER 1
#else
#define CONFIG_GNRC_IPV6_NIB_ADV_ROUTER 0
#endif
#endif

/**
* @brief Include a Route Information Option for subnets
Expand Down

0 comments on commit 0572a95

Please sign in to comment.