mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix ip-transparent for ipv6 on FreeBSD.
git-svn-id: file:///svn/unbound/trunk@3675 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
575fe62425
commit
2e55b493c6
2 changed files with 7 additions and 3 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
16 March 2016: Wouter
|
||||||
|
- Fix ip-transparent for ipv6 on FreeBSD.
|
||||||
|
|
||||||
15 March 2016: Wouter
|
15 March 2016: Wouter
|
||||||
- ip_freebind: yesno option in unbound.conf sets IP_FREEBIND for
|
- ip_freebind: yesno option in unbound.conf sets IP_FREEBIND for
|
||||||
binding to an IP address while the interface or address is down.
|
binding to an IP address while the interface or address is down.
|
||||||
|
|
|
||||||
|
|
@ -202,9 +202,10 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
|
||||||
#elif defined(IP_BINDANY)
|
#elif defined(IP_BINDANY)
|
||||||
if (transparent &&
|
if (transparent &&
|
||||||
setsockopt(s, (family==AF_INET6? IPPROTO_IPV6:IPPROTO_IP),
|
setsockopt(s, (family==AF_INET6? IPPROTO_IPV6:IPPROTO_IP),
|
||||||
IP_BINDANY, (void*)&on, (socklen_t)sizeof(on)) < 0) {
|
(family == AF_INET6? IPV6_BINDANY:IP_BINDANY),
|
||||||
log_warn("setsockopt(.. IP_BINDANY ..) failed: %s",
|
(void*)&on, (socklen_t)sizeof(on)) < 0) {
|
||||||
strerror(errno));
|
log_warn("setsockopt(.. IP%s_BINDANY ..) failed: %s",
|
||||||
|
(family==AF_INET6?"V6":""), strerror(errno));
|
||||||
}
|
}
|
||||||
#endif /* IP_TRANSPARENT || IP_BINDANY */
|
#endif /* IP_TRANSPARENT || IP_BINDANY */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue