Correctly support ipv6 sockets