diff options
author | Kevin Steves <stevesk@pobox.com> | 2002-06-04 20:52:19 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2002-06-04 20:52:19 +0000 |
commit | df75dd21f53829f97eff225c87a71e43c8ec4064 (patch) | |
tree | e28dacbdd1b3a825a273d21c281d94c91ad91d86 /channels.c | |
parent | 28bbb0c458c1f6cee5c3de1cec1f9dfea14d7196 (diff) |
- (stevesk) [channels.c] bug #164 patch from YOSHIFUJI Hideaki (changed
setsockopt from debug to error for now).
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -2374,6 +2374,13 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost, continue; } } +#ifdef IPV6_V6ONLY + if (ai->ai_family == AF_INET6) { + int on = 1; + if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0) + error("setsockopt IPV6_V6ONLY: %.100s", strerror(errno)); + } +#endif if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { debug("bind port %d: %.100s", port, strerror(errno)); close(sock); @@ -2392,7 +2399,12 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost, if (num_socks == NUM_SOCKS) break; #else - break; + if (x11_use_localhost) { + if (num_socks == NUM_SOCKS) + break; + } else { + break; + } #endif } freeaddrinfo(aitop); |