diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -979,15 +979,9 @@ server_listen(void) | |||
979 | &on, sizeof(on)) == -1) | 979 | &on, sizeof(on)) == -1) |
980 | error("setsockopt SO_REUSEADDR: %s", strerror(errno)); | 980 | error("setsockopt SO_REUSEADDR: %s", strerror(errno)); |
981 | 981 | ||
982 | #ifdef IPV6_V6ONLY | ||
983 | /* Only communicate in IPv6 over AF_INET6 sockets. */ | 982 | /* Only communicate in IPv6 over AF_INET6 sockets. */ |
984 | if (ai->ai_family == AF_INET6) { | 983 | if (ai->ai_family == AF_INET6) |
985 | if (setsockopt(listen_sock, IPPROTO_IPV6, IPV6_V6ONLY, | 984 | sock_set_v6only(listen_sock); |
986 | &on, sizeof(on)) == -1) | ||
987 | error("setsockopt IPV6_V6ONLY: %s", | ||
988 | strerror(errno)); | ||
989 | } | ||
990 | #endif | ||
991 | 985 | ||
992 | debug("Bind to port %s on %s.", strport, ntop); | 986 | debug("Bind to port %s on %s.", strport, ntop); |
993 | 987 | ||