IPV6_V6ONLY set by default on win32
authorJuho Vähä-Herttua <juhovh@iki.fi>
Tue, 22 Apr 2014 17:16:50 +0000 (20:16 +0300)
committerJuho Vähä-Herttua <juhovh@iki.fi>
Tue, 22 Apr 2014 17:16:50 +0000 (20:16 +0300)
src/lib/netutils.c

index 180d32eed7f6b510880a9a6b1fe4c75351536d74..3fc8838547aeb6857591eb95849f30737a5cd9c8 100644 (file)
@@ -78,9 +78,11 @@ netutils_init_socket(unsigned short *port, int use_ipv6, int use_udp)
                sin6ptr->sin6_addr = in6addr_any;
                sin6ptr->sin6_port = htons(*port);
 
+#ifndef WIN32
                /* Make sure we only listen to IPv6 addresses */
                setsockopt(server_fd, IPPROTO_IPV6, IPV6_V6ONLY,
                           (char *) &v6only, sizeof(v6only));
+#endif
 
                socklen = sizeof(*sin6ptr);
                ret = bind(server_fd, (struct sockaddr *)sin6ptr, socklen);