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:
parent
3daa847108
commit
4a78ccd771
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100522
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user