Please sign in to comment.
Fix dual-stack UDP on Windows and improve dual-stack detection
This patch fixes dual-stack UDP on Windows as well as for unsual Linux configurations by ensuring the UDP sockets we create inherit their IPV6_V6ONLY sockopt from their corresponding TCP socket. Previously on systems where IPV6_V6ONLY was enabled by default (e.g. Windows) we would incorrectly create an IPv6 only socket even though our TCP socket and the system are dual-stacked. The dual-stack detection moved from Meta.h to Server.h into the SslServer class where it is a better fit. Also modified the function to instead of querying the value of IPV6_V6ONLY on a test socket it now tries to actively disable it. While previously dual stack support was only detected if it was the default configuration for that system, it should now be detected in all cases. The function also now performs the same check on Windows socket where the default actually is to have IPV6_V6ONLY enabled.
- Loading branch information...
Showing with 54 additions and 24 deletions.