mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-22 09:44:56 +02:00
- Set IPPROTO_IP6 for ipv6 sockets otherwise invalid argument error.
git-svn-id: file:///svn/unbound/trunk@3625 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -189,8 +189,8 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
|
||||
}
|
||||
#elif defined(IP_BINDANY)
|
||||
if (transparent &&
|
||||
setsockopt(s, IPPROTO_IP, IP_BINDANY, (void*)&on,
|
||||
(socklen_t)sizeof(on)) < 0) {
|
||||
setsockopt(s, (family==AF_INET6? IPPROTO_IPV6:IPPROTO_IP),
|
||||
IP_BINDANY, (void*)&on, (socklen_t)sizeof(on)) < 0) {
|
||||
log_warn("setsockopt(.. IP_BINDANY ..) failed: %s",
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user