mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_ipv6_nib: use static DNS server from auto_init_sock_dns if present
This commit is contained in:
parent
acf2074369
commit
ff52d35584
@ -67,6 +67,11 @@ else ifeq (static,$(PREFIX_CONF))
|
||||
# Only set this if the default router does not send router advertisements
|
||||
# IPV6_DEFAULT_ROUTER ?= fe80::1
|
||||
USEMODULE += gnrc_ipv6_static_addr
|
||||
|
||||
# configure static DNS server
|
||||
ifneq (,$(filter sock_dns,$(USEMODULE)))
|
||||
USEMODULE += auto_init_sock_dns
|
||||
endif
|
||||
endif
|
||||
|
||||
# Comment this out to disable code in RIOT that does safety checking
|
||||
|
@ -155,7 +155,8 @@ static gnrc_pktsnip_t *_build_ext_opts(gnrc_netif_t *netif,
|
||||
uint32_t rdnss_ltime = _evtimer_lookup(&sock_dns_server,
|
||||
GNRC_IPV6_NIB_RDNSS_TIMEOUT);
|
||||
|
||||
if ((rdnss_ltime < UINT32_MAX) &&
|
||||
/* with auto_init_sock_dns we always have a valid (static) DNS server */
|
||||
if (((rdnss_ltime < UINT32_MAX) || IS_USED(MODULE_AUTO_INIT_SOCK_DNS)) &&
|
||||
(!ipv6_addr_is_link_local((ipv6_addr_t *)sock_dns_server.addr.ipv6))) {
|
||||
gnrc_pktsnip_t *rdnsso = gnrc_ndp_opt_rdnss_build(
|
||||
rdnss_ltime * MS_PER_SEC,
|
||||
|
Loading…
Reference in New Issue
Block a user