Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RA relay shouldn't relay link-local DNS #218

Open
AndersTrier opened this issue Apr 17, 2024 · 2 comments
Open

RA relay shouldn't relay link-local DNS #218

AndersTrier opened this issue Apr 17, 2024 · 2 comments

Comments

@AndersTrier
Copy link

AndersTrier commented Apr 17, 2024

.. 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, set c->always_rewrite_dns to true so we hit https://github.com/openwrt/odhcpd/blob/master/src/router.c#L971C1-L971C59

@AndersTrier
Copy link
Author

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.

@Homas
Copy link

Homas commented Aug 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants