mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-24 00:29:58 -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
|
9 May 2019: Wouter
|
||||||
- Revert fix for oss-fuzz, error is in that build script that
|
- Revert fix for oss-fuzz, error is in that build script that
|
||||||
unconditionally includes .o files detected by configure, also
|
unconditionally includes .o files detected by configure, also
|
||||||
|
|
|
||||||
|
|
@ -1648,6 +1648,10 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
|
||||||
#endif
|
#endif
|
||||||
if(errno == EINTR || errno == EAGAIN)
|
if(errno == EINTR || errno == EAGAIN)
|
||||||
return 1;
|
return 1;
|
||||||
|
#ifdef ECONNRESET
|
||||||
|
if(errno == ECONNRESET && verbosity < 2)
|
||||||
|
return 0; /* silence reset by peer */
|
||||||
|
#endif
|
||||||
# ifdef HAVE_WRITEV
|
# ifdef HAVE_WRITEV
|
||||||
log_err_addr("tcp writev", strerror(errno),
|
log_err_addr("tcp writev", strerror(errno),
|
||||||
&c->repinfo.addr, c->repinfo.addrlen);
|
&c->repinfo.addr, c->repinfo.addrlen);
|
||||||
|
|
@ -1665,6 +1669,8 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
|
||||||
UB_EV_WRITE);
|
UB_EV_WRITE);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if(WSAGetLastError() == WSAECONNRESET && verbosity < 2)
|
||||||
|
return 0; /* silence reset by peer */
|
||||||
log_err_addr("tcp send s",
|
log_err_addr("tcp send s",
|
||||||
wsa_strerror(WSAGetLastError()),
|
wsa_strerror(WSAGetLastError()),
|
||||||
&c->repinfo.addr, c->repinfo.addrlen);
|
&c->repinfo.addr, c->repinfo.addrlen);
|
||||||
|
|
@ -1688,6 +1694,10 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
|
||||||
#ifndef USE_WINSOCK
|
#ifndef USE_WINSOCK
|
||||||
if(errno == EINTR || errno == EAGAIN)
|
if(errno == EINTR || errno == EAGAIN)
|
||||||
return 1;
|
return 1;
|
||||||
|
#ifdef ECONNRESET
|
||||||
|
if(errno == ECONNRESET && verbosity < 2)
|
||||||
|
return 0; /* silence reset by peer */
|
||||||
|
#endif
|
||||||
log_err_addr("tcp send r", strerror(errno),
|
log_err_addr("tcp send r", strerror(errno),
|
||||||
&c->repinfo.addr, c->repinfo.addrlen);
|
&c->repinfo.addr, c->repinfo.addrlen);
|
||||||
#else
|
#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);
|
ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if(WSAGetLastError() == WSAECONNRESET && verbosity < 2)
|
||||||
|
return 0; /* silence reset by peer */
|
||||||
log_err_addr("tcp send r", wsa_strerror(WSAGetLastError()),
|
log_err_addr("tcp send r", wsa_strerror(WSAGetLastError()),
|
||||||
&c->repinfo.addr, c->repinfo.addrlen);
|
&c->repinfo.addr, c->repinfo.addrlen);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue