Remove AI_ADDRCONFIG getaddrinfo hints flag for listening sockets.

Because, according to RFC 3493, that will cause getaddrinfo to
overlook the ::1 loopback if there's not some other interface with
a global IPv6 address.  The rationale being that the flag helps
prevent unnecessary AAAA lookups, but since I set AI_NUMERICHOST,
lookups aren't going to happen anyway.

Also update the IPv6 Bro communication test to get it to work more
reliably.
This commit is contained in:
Jon Siwek 2012-05-10 10:47:39 -05:00
parent 8bb62eaaa2
commit 2338a32288
4 changed files with 7 additions and 3 deletions

View file

@ -4023,7 +4023,7 @@ bool SocketComm::Listen()
hints.ai_protocol = IPPROTO_TCP;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG | AI_NUMERICHOST;
hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
char port_str[16];
modp_uitoa10(listen_port, port_str);