mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-22 15:50:59 -05:00
- Fix to squelch 'network unreachable' errors from tcp connect in
logs, high verbosity will show them. git-svn-id: file:///svn/unbound/trunk@2634 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
7f6827cc97
commit
9429092966
4 changed files with 16 additions and 1 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
23 February 2012: Wouter
|
||||||
|
- Fix to squelch 'network unreachable' errors from tcp connect in
|
||||||
|
logs, high verbosity will show them.
|
||||||
|
|
||||||
16 February 2012: Wouter
|
16 February 2012: Wouter
|
||||||
- iter_hints is now thread-owned in module env, and thus threadsafe.
|
- iter_hints is now thread-owned in module env, and thus threadsafe.
|
||||||
- Fix prefetch and sticky NS, now the prefetch works. It picks
|
- Fix prefetch and sticky NS, now the prefetch works. It picks
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,10 @@ outnet_tcp_take_into_use(struct waiting_tcp* w, uint8_t* pkt, size_t pkt_len)
|
||||||
#else
|
#else
|
||||||
if(1) {
|
if(1) {
|
||||||
#endif
|
#endif
|
||||||
log_err("outgoing tcp: connect: %s", strerror(errno));
|
if(tcp_connect_errno_needs_log(
|
||||||
|
(struct sockaddr*)&w->addr, w->addrlen))
|
||||||
|
log_err("outgoing tcp: connect: %s",
|
||||||
|
strerror(errno));
|
||||||
close(s);
|
close(s);
|
||||||
#else /* USE_WINSOCK */
|
#else /* USE_WINSOCK */
|
||||||
if(WSAGetLastError() != WSAEINPROGRESS &&
|
if(WSAGetLastError() != WSAEINPROGRESS &&
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,11 @@ udp_send_errno_needs_log(struct sockaddr* addr, socklen_t addrlen)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int tcp_connect_errno_needs_log(struct sockaddr* addr, socklen_t addrlen)
|
||||||
|
{
|
||||||
|
return udp_send_errno_needs_log(addr, addrlen);
|
||||||
|
}
|
||||||
|
|
||||||
/* send a UDP reply */
|
/* send a UDP reply */
|
||||||
int
|
int
|
||||||
comm_point_send_udp_msg(struct comm_point *c, ldns_buffer* packet,
|
comm_point_send_udp_msg(struct comm_point *c, ldns_buffer* packet,
|
||||||
|
|
|
||||||
|
|
@ -646,4 +646,7 @@ void comm_point_raw_handle_callback(int fd, short event, void* arg);
|
||||||
void comm_point_tcp_win_bio_cb(struct comm_point* c, void* ssl);
|
void comm_point_tcp_win_bio_cb(struct comm_point* c, void* ssl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** see if errno for tcp connect has to be logged or not. This uses errno */
|
||||||
|
int tcp_connect_errno_needs_log(struct sockaddr* addr, socklen_t addrlen);
|
||||||
|
|
||||||
#endif /* NET_EVENT_H */
|
#endif /* NET_EVENT_H */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue