diff options
author | Huang-Ming Huang <huangming.huang@gmail.com> | 2017-04-07 12:26:19 -0500 |
---|---|---|
committer | Huang-Ming Huang <huangming.huang@gmail.com> | 2017-04-07 12:26:19 -0500 |
commit | 76dcc3fed2faf5c2148df8adb09ef3bc7b11b440 (patch) | |
tree | 2536331d3160f2c2bf939f2db63248eabd673672 /ACE/ace/INET_Addr.cpp | |
parent | fae93c9ce7e8130077306798d26d4ddcb3dd1ef4 (diff) | |
download | ATCD-76dcc3fed2faf5c2148df8adb09ef3bc7b11b440.tar.gz |
Fix getaddrinfo() inconsistent behavior on windows machines
Diffstat (limited to 'ACE/ace/INET_Addr.cpp')
-rw-r--r-- | ACE/ace/INET_Addr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ACE/ace/INET_Addr.cpp b/ACE/ace/INET_Addr.cpp index 811ee79afc6..e2d33e32ebb 100644 --- a/ACE/ace/INET_Addr.cpp +++ b/ACE/ace/INET_Addr.cpp @@ -412,7 +412,11 @@ ACE_INET_Addr::set (u_short port_number, // The ai_flags used to contain AI_ADDRCONFIG as well but that prevented // lookups from completing if there is no, or only a loopback, IPv6 // interface configured. See Bugzilla 4211 for more info. - hints.ai_flags = AI_V4MAPPED; + + // Without AI_ALL, Windows machines exhibit inconsistent behaviors on + // difference machines we have tested. + hints.ai_flags = AI_V4MAPPED | AI_ALL; + // Note - specify the socktype here to avoid getting multiple entries // returned with the same address for different socket types or // protocols. If this causes a problem for some reason (an address that's |