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
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;
}