Rewriting server side Resolve name by getaddrinfo() Use AI_PASSIVE to get wildcard sockaddr We don't know address family, so need to resolve name before socket() Try all returned addrinfo, ignore errors until we reach the end Kernel may not have IPv6 support Kernel may not be configured with IPv4/v6 DNS database may not be correct Kernel may be imposing ordering constraint between bind(2)