Bind link-local addresses for interfaces using scope
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. https://github.com/ooni/probe/issues/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
From reading https://github.com/coredns/coredns/pull/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.
This is my PR in go but I tried to address it and it seemed quite straight forward actually: #6547