mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-10-01 22:24:55 +02:00
auth zone socket creation fix.
git-svn-id: file:///svn/unbound/trunk@4489 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -262,6 +262,7 @@ outnet_tcp_connect(int s, struct sockaddr_storage* addr, socklen_t addrlen)
|
||||
log_err_addr("outgoing tcp: connect",
|
||||
strerror(errno), addr, addrlen);
|
||||
close(s);
|
||||
return 0;
|
||||
#ifdef EINPROGRESS
|
||||
}
|
||||
#endif
|
||||
@@ -269,9 +270,9 @@ outnet_tcp_connect(int s, struct sockaddr_storage* addr, socklen_t addrlen)
|
||||
if(WSAGetLastError() != WSAEINPROGRESS &&
|
||||
WSAGetLastError() != WSAEWOULDBLOCK) {
|
||||
closesocket(s);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -2190,7 +2191,7 @@ fd_for_dest(struct outside_network* outnet, struct sockaddr_storage* to_addr,
|
||||
struct sockaddr_in* sa = (struct sockaddr_in*)addr;
|
||||
sa->sin_port = (in_port_t)htons((uint16_t)port);
|
||||
fd = create_udp_sock(AF_INET, SOCK_DGRAM,
|
||||
(struct sockaddr*)&sa, addrlen, 1, &inuse, &noproto,
|
||||
(struct sockaddr*)addr, addrlen, 1, &inuse, &noproto,
|
||||
0, 0, 0, NULL, 0, freebind, 0);
|
||||
}
|
||||
if(fd != -1) {
|
||||
|
||||
Reference in New Issue
Block a user