mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
Merge pull request #21437 from benpicco/CONFIG_GNRC_IPV6_NIB_SOL_ROUTER
gnrc/ipv6/nib: add option to disable router solicitations
This commit is contained in:
commit
d973ca18a9
@ -50,9 +50,8 @@ extern "C" {
|
|||||||
# ifndef CONFIG_GNRC_IPV6_NIB_6LN
|
# ifndef CONFIG_GNRC_IPV6_NIB_6LN
|
||||||
# define CONFIG_GNRC_IPV6_NIB_6LN 1
|
# define CONFIG_GNRC_IPV6_NIB_6LN 1
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* We are only a 6lo node with no 'classic' IPv6 interface */
|
|
||||||
# ifndef MODULE_GNRC_IPV6_CLASSIC
|
# ifndef MODULE_GNRC_IPV6_CLASSIC
|
||||||
|
/* We are only a 6lo node with no 'classic' IPv6 interface */
|
||||||
# ifndef CONFIG_GNRC_IPV6_NIB_QUEUE_PKT
|
# ifndef CONFIG_GNRC_IPV6_NIB_QUEUE_PKT
|
||||||
# define CONFIG_GNRC_IPV6_NIB_QUEUE_PKT 0
|
# define CONFIG_GNRC_IPV6_NIB_QUEUE_PKT 0
|
||||||
# endif
|
# endif
|
||||||
@ -131,6 +130,13 @@ extern "C" {
|
|||||||
# define CONFIG_GNRC_IPV6_NIB_ADV_ROUTER 0
|
# define CONFIG_GNRC_IPV6_NIB_ADV_ROUTER 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief enable periodic router solicitations
|
||||||
|
*/
|
||||||
|
#ifndef CONFIG_GNRC_IPV6_NIB_SOL_ROUTER
|
||||||
|
# define CONFIG_GNRC_IPV6_NIB_SOL_ROUTER 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Include a Route Information Option for subnets
|
* @brief Include a Route Information Option for subnets
|
||||||
* on other interfaces in normal Router Advertisements
|
* on other interfaces in normal Router Advertisements
|
||||||
|
|||||||
@ -105,11 +105,17 @@ static void _handle_rdnss_timeout(sock_udp_ep_t *dns_server);
|
|||||||
|
|
||||||
static inline bool _should_search_rtr(const gnrc_netif_t *netif)
|
static inline bool _should_search_rtr(const gnrc_netif_t *netif)
|
||||||
{
|
{
|
||||||
/* 6LBR interface does not send RS.
|
/* RS are globally disabled */
|
||||||
A non-advertising router sends RS or a 6LN that is advertising or not
|
if (!CONFIG_GNRC_IPV6_NIB_SOL_ROUTER) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
/* 6LBR interface does not send RS. */
|
||||||
|
if (gnrc_netif_is_6lbr(netif)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
/* A non-advertising router sends RS or a 6LN that is advertising or not
|
||||||
has to refetch router information */
|
has to refetch router information */
|
||||||
return !gnrc_netif_is_6lbr(netif) &&
|
return !gnrc_netif_is_rtr_adv(netif) || gnrc_netif_is_6ln(netif);
|
||||||
(!gnrc_netif_is_rtr_adv(netif) || gnrc_netif_is_6ln(netif));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void gnrc_ipv6_nib_init(void)
|
void gnrc_ipv6_nib_init(void)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user