Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Net: Add IPv6 Link-Local Address Support #7570
Adds support for binding and listening, as well as connecting to, scoped IPv6 addresses.
I wanted to be able to use IPv6 link-local addresses on 4.2+ GNU/Linux (
Note that if you test this, it's easier to see the bound address with something like:
Basically, commands similar to these should work now, instead of failing with
This should still fail due to missing the scope ID:
This should still fail due to the scope id being misplaced:
For the link-local addresses I believe that is accounted for already because CNetAddr::IsRFC4862 matches them and thus CNetAddr::IsRoutable returns false for them.
About the site-local category of scoped addresses, upon more investigation, their usage is already deprecated by RFC 3879 (https://www.ietf.org/rfc/rfc3879.txt) and Linux does not support them. I only mentioned them because the Windows documents mentioned them and I'm inclined to think that we don't need to concern ourselves with them. If we do, then we could maybe add another method to match them and then make that part of the IsRoutable check too.
I rebased and re-worked this commit to make it easier to review.
Also, circling back on the site-local addresses...
That's good. It means this PR only has to concern itself with link-local (which was the original intent).
The motivation for this change is to make it easier to deploy and manage a cluster of nodes on a local network.