mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Squelch log messages from tcp send about connection reset by peer.
They can be enabled with verbosity at higher values for diagnosing network connectivity issues.
This commit is contained in:
parent
a922a19d70
commit
a95f5fd5cb
2 changed files with 17 additions and 0 deletions
|
|
@ -1,3 +1,8 @@
|
|||
13 May 2019: Wouter
|
||||
- Squelch log messages from tcp send about connection reset by peer.
|
||||
They can be enabled with verbosity at higher values for diagnosing
|
||||
network connectivity issues.
|
||||
|
||||
9 May 2019: Wouter
|
||||
- Revert fix for oss-fuzz, error is in that build script that
|
||||
unconditionally includes .o files detected by configure, also
|
||||
|
|
|
|||
|
|
@ -1648,6 +1648,10 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
|
|||
#endif
|
||||
if(errno == EINTR || errno == EAGAIN)
|
||||
return 1;
|
||||
#ifdef ECONNRESET
|
||||
if(errno == ECONNRESET && verbosity < 2)
|
||||
return 0; /* silence reset by peer */
|
||||
#endif
|
||||
# ifdef HAVE_WRITEV
|
||||
log_err_addr("tcp writev", strerror(errno),
|
||||
&c->repinfo.addr, c->repinfo.addrlen);
|
||||
|
|
@ -1665,6 +1669,8 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
|
|||
UB_EV_WRITE);
|
||||
return 1;
|
||||
}
|
||||
if(WSAGetLastError() == WSAECONNRESET && verbosity < 2)
|
||||
return 0; /* silence reset by peer */
|
||||
log_err_addr("tcp send s",
|
||||
wsa_strerror(WSAGetLastError()),
|
||||
&c->repinfo.addr, c->repinfo.addrlen);
|
||||
|
|
@ -1688,6 +1694,10 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
|
|||
#ifndef USE_WINSOCK
|
||||
if(errno == EINTR || errno == EAGAIN)
|
||||
return 1;
|
||||
#ifdef ECONNRESET
|
||||
if(errno == ECONNRESET && verbosity < 2)
|
||||
return 0; /* silence reset by peer */
|
||||
#endif
|
||||
log_err_addr("tcp send r", strerror(errno),
|
||||
&c->repinfo.addr, c->repinfo.addrlen);
|
||||
#else
|
||||
|
|
@ -1697,6 +1707,8 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
|
|||
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
|
||||
return 1;
|
||||
}
|
||||
if(WSAGetLastError() == WSAECONNRESET && verbosity < 2)
|
||||
return 0; /* silence reset by peer */
|
||||
log_err_addr("tcp send r", wsa_strerror(WSAGetLastError()),
|
||||
&c->repinfo.addr, c->repinfo.addrlen);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue