Open AndersTrier opened 7 months ago
Announcing a link-local address as DNS is permitted by RFC 8106 section 5.1:
Note: The addresses for RDNSSes in the RDNSS option MAY be link-local addresses.
The same with TMO's trashcan (Nokia). Due to the issue every DNS resolution always takes significantly longer on MacOS. IMO ra_dns should be applied in relay mode as well.
.. as that DNS server address is unreachable from clients.
The router advertisements sent by my OPPO 5G CPE T2 sets a link-local DNS resolver. This works fine for clients connected directly to the OPPO router. It doesn't work for clients behind a second router that uses odhcpd to relay the router advertisements, as the link-local address of the OPPO router is unreachable from behind this second router.
Suggested fix: If relaying a router advertisement that includes a link-local DNS, remove that entry from the relayed message as that will never work.
If the
dns_service
option is enabled, setc->always_rewrite_dns
to true so we hit https://github.com/openwrt/odhcpd/blob/master/src/router.c#L971C1-L971C59