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

Bind link-local addresses for interfaces using scope #6536

Open
riedel opened this issue Mar 10, 2024 · 2 comments
Open

Bind link-local addresses for interfaces using scope #6536

riedel opened this issue Mar 10, 2024 · 2 comments

Comments

@riedel
Copy link

riedel commented Mar 10, 2024

What would you like to be added:

#4531 removed linking link-local addresses altogether.

However, I am not sure how this is any wanted behavior: it was rather done to work around a bug.

IMHO this just a misunderstanding, how binding link-local IPv6 addresses work. Typically you just need to provide a scope, which is actually given by the interface. This means that the semantics would be fully defined when using e.g. bind eth0

See eg. https://stackoverflow.com/questions/2460841/how-to-bind-a-link-local-address-to-an-ipv6-socket.

The problem is that this would require some more rewriting as the net.ParseIP does not support the scope (see e.g. ooni/probe#2036 here) . So I was just wondering before submitting a pull request if for whatever reason the link-local exception is wanted behaviour.

Why is this needed:

To me this is a real problem at the moment, when trying to use CoreDNS for local DNS rewriting. The problem with using a global address is that in my dynamic DNS setting the prefix may change, so I cannot hardcode the DNS Server for my network.

Feedback and workarounds welcome

@chrisohaver
Copy link
Member

From reading #4531, it seems the change was done because it was easier to disable than fix. If you'd like to propose a fix you may do so.

@riedel
Copy link
Author

riedel commented Mar 11, 2024

This is my PR in go but I tried to address it and it seemed quite straight forward actually: #6547

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

No branches or pull requests

2 participants