|
Lines 2577-2582
channel_setup_fwd_listener(int type, con
Link Here
|
| 2577 |
} |
2577 |
} |
| 2578 |
|
2578 |
|
| 2579 |
channel_set_reuseaddr(sock); |
2579 |
channel_set_reuseaddr(sock); |
|
|
2580 |
if (ai->ai_family == AF_INET6) |
| 2581 |
sock_set_v6only(sock); |
| 2580 |
|
2582 |
|
| 2581 |
debug("Local forwarding listening on %s port %s.", |
2583 |
debug("Local forwarding listening on %s port %s.", |
| 2582 |
ntop, strport); |
2584 |
ntop, strport); |
|
Lines 3108-3120
x11_create_display_inet(int x11_display_
Link Here
|
| 3108 |
continue; |
3110 |
continue; |
| 3109 |
} |
3111 |
} |
| 3110 |
} |
3112 |
} |
| 3111 |
#ifdef IPV6_V6ONLY |
3113 |
if (ai->ai_family == AF_INET6) |
| 3112 |
if (ai->ai_family == AF_INET6) { |
3114 |
sock_set_v6only(sock); |
| 3113 |
int on = 1; |
|
|
| 3114 |
if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0) |
| 3115 |
error("setsockopt IPV6_V6ONLY: %.100s", strerror(errno)); |
| 3116 |
} |
| 3117 |
#endif |
| 3118 |
if (x11_use_localhost) |
3115 |
if (x11_use_localhost) |
| 3119 |
channel_set_reuseaddr(sock); |
3116 |
channel_set_reuseaddr(sock); |
| 3120 |
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { |
3117 |
if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { |