diff options
author | Cédric Schieli <cschieli@gmail.com> | 2017-01-16 18:23:26 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-01-16 12:23:26 -0500 |
commit | fe0252e5b8180f7358eb3780cd19722b0f6c998c (patch) | |
tree | f5efee763a4b8d3b4bb7fe1b77fba4206b49c68f | |
parent | e52b13cfc47a8181406a59b6fc30c01aa2934678 (diff) |
ndisc: honor IPv6AcceptRA.UseDNS when parsing RA options (#5071)
RDNSS and DNSLL options received in RA are always used, possibly breaking the resolution of private domains hosted on a local DNS server. When setting UseDNS=no in a [IPv6AcceptRA] section of a .network file, both RDNSS and DNSLL options in received RA should be ignored.
Fixes: #5040
-rw-r--r-- | src/network/networkd-ndisc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index bc80c693d0..4fd5d8ae70 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -587,11 +587,13 @@ static void ndisc_router_process_options(Link *link, sd_ndisc_router *rt) { break; case SD_NDISC_OPTION_RDNSS: - ndisc_router_process_rdnss(link, rt); + if (link->network->ipv6_accept_ra_use_dns) + ndisc_router_process_rdnss(link, rt); break; case SD_NDISC_OPTION_DNSSL: - ndisc_router_process_dnssl(link, rt); + if (link->network->ipv6_accept_ra_use_dns) + ndisc_router_process_dnssl(link, rt); break; } |