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
--interface for ipv6 binds to unusable IP address #686
I did this
I received the following output
I have this machine sitting behind an openwrt router that sets up public facing ipv6 addresses, the actual route that I would like curl to take, and a unique-local subnet (as described in RFC 5156). Curl appears to prefer this fdde:: address, as it is listed first in
If I run
If I run
Since the fc00::/7 is a reserved block, would it be possible to intelligently match the bind address based on the destination address?
so, my request would be to match at the IP level, not the domain level.
if you are trying to reach:
you could even use the subnet mask to more explicitly specify which inet6 address should be used, because there could be more complex subnetting defined, over the defaults spesified in RFC5156.
Is this clear, or should I elaborate more?
changed the title from
curl chooses the wrong bind address
select bind address based on IP
Mar 21, 2016
It is clear what you'd like. It is also clear to me that this is not a bug and it couldn't do this by default, but sure one could imagine a feature that allows curl to work like this. Feel free to suggest a patch, I personally don't see this as a very high prio feature.
So, I realize that my solution is complex and likely constitutes a feature request, however there does seem to be bug at the root of my inquiry.
I designed a solution that should work optimally, and while requiring more code, would prevent nasty timeout issues, or other corner case related hassles. However, if you simply applied the same automation logic that can be seen in
I would probably suggest that an ipv6 binding would start with the widest possible scoped address instead of just the one that happens to be first.