diff options
author | ume <ume@FreeBSD.org> | 2002-07-22 15:22:53 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2002-07-22 15:22:53 +0000 |
commit | 9c2c51a1e61030bfe633fa01ea19069f3fd0091b (patch) | |
tree | cc39562b6ea40c9f3ec3aab6d5fe9295ff53b4b5 /libexec | |
parent | 881112a66cdce7db30df7845ba02b180e6725cd0 (diff) | |
download | FreeBSD-src-9c2c51a1e61030bfe633fa01ea19069f3fd0091b.zip FreeBSD-src-9c2c51a1e61030bfe633fa01ea19069f3fd0091b.tar.gz |
use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.
MFC after: 1 week
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ftpd/ftpd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index fe83eca..20b9249 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -457,14 +457,12 @@ main(int argc, char *argv[], char **envp) if (setsockopt(ctl_sock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0) syslog(LOG_ERR, "control setsockopt: %m"); -#ifdef IPV6_BINDV6ONLY if (family == AF_INET6 && enable_v4 == 0) { - if (setsockopt(ctl_sock, IPPROTO_IPV6, IPV6_BINDV6ONLY, + if (setsockopt(ctl_sock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&on, sizeof (on)) < 0) syslog(LOG_ERR, - "control setsockopt(IPV6_BINDV6ONLY): %m"); + "control setsockopt(IPV6_V6ONLY): %m"); } -#endif /* IPV6_BINDV6ONLY */ memcpy(&server_addr, res->ai_addr, res->ai_addr->sa_len); if (bind(ctl_sock, (struct sockaddr *)&server_addr, server_addr.su_len) < 0) { |