cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

Issues using cpprestsdk on Windows in mixed IPv6/IPv6 networks (Happy Eyeballs)

Open deeringc opened this issue 7 years ago • 2 comments

We're observing an issue where the WinHTTP-based client inside of cpprestsdk is having issues where a users DNS server is returning a mix of IPv6 & IPv4 addresses on a badly configured network.

If the IPv6 address is not routable we see a 21 second timeout , and then WinHTTP seems to fall back on the IPv4 address (which succeeds immediately).

This seems to indicate that WinHTTP does not support Happy Eyeballs (rfc6555).

Can you confirm whether this is indeed the case? Do consumers have any way to control which DNS results are honoured?

Obviously the network is the source of the issue, and that should be addressed, but users mostly dont have any control over this, and many HTTP stacks do support Happy Eyeballs in order to shield users from this.

Thanks, Chris

deeringc avatar Apr 16 '19 15:04 deeringc

Does netsh interface ipv6 set prefixpolicy help here?

garethsb avatar Apr 16 '19 16:04 garethsb

Thanks for the good suggestion, @garethsb-sony. It works around the problem but it's not something we can set globally on the user's system. We need something that only affects the app in question.

deeringc avatar Apr 16 '19 19:04 deeringc