- 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:
Wouter Wijngaards 2012-02-23 09:01:46 +00:00
parent 7f6827cc97
commit 9429092966
4 changed files with 16 additions and 1 deletions

View file

@ -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
- iter_hints is now thread-owned in module env, and thus threadsafe.
- Fix prefetch and sticky NS, now the prefetch works. It picks

View file

@ -227,7 +227,10 @@ outnet_tcp_take_into_use(struct waiting_tcp* w, uint8_t* pkt, size_t pkt_len)
#else
if(1) {
#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);
#else /* USE_WINSOCK */
if(WSAGetLastError() != WSAEINPROGRESS &&

View file

@ -308,6 +308,11 @@ udp_send_errno_needs_log(struct sockaddr* addr, socklen_t addrlen)
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 */
int
comm_point_send_udp_msg(struct comm_point *c, ldns_buffer* packet,

View file

@ -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);
#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 */