1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00

use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.

Approved by:	gad
This commit is contained in:
Hajimu UMEMOTO 2002-07-22 18:16:05 +00:00
parent 3daa847108
commit 4a78ccd771
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100522

View File

@ -904,17 +904,15 @@ socksetup(int af, int debuglvl)
close(*s);
continue;
}
#ifdef IPV6_BINDV6ONLY
if (r->ai_family == AF_INET6) {
if (setsockopt(*s, IPPROTO_IPV6, IPV6_BINDV6ONLY,
if (setsockopt(*s, IPPROTO_IPV6, IPV6_V6ONLY,
&on, sizeof(on)) < 0) {
syslog(LOG_ERR,
"setsockopt (IPV6_BINDV6ONLY): %m");
"setsockopt (IPV6_V6ONLY): %m");
close(*s);
continue;
}
}
#endif
if (bind(*s, r->ai_addr, r->ai_addrlen) < 0) {
syslog(LOG_DEBUG, "bind(): %m");
close(*s);