fixup test for BSD.

git-svn-id: file:///svn/unbound/trunk@851 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2008-01-15 11:54:15 +00:00
parent 4b065a443c
commit 8404701a09
2 changed files with 10 additions and 0 deletions
+10
View File
@@ -246,6 +246,16 @@ set_ip6_recvpktinfo(int s)
strerror(errno));
return 0;
}
#ifdef IPV6_V6ONLY
on = 0;
if(setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
&on, (socklen_t)sizeof(on)) < 0) {
log_err("disable sockopt(..., IPV6_V6ONLY, ...) failed: %s"
" (on BSD may be due to net.inet6.ip6.v6only sysctl)",
strerror(errno));
return 0;
}
#endif /* defined IPV6_V6ONLY */
return 1;
}
#endif /* defined IPV6_RECVPKTINFO */
BIN
View File
Binary file not shown.