From: W.C.A. Wijngaards Date: Tue, 28 Jan 2020 13:32:06 +0000 (+0100) Subject: - Fix to silence the tls handshake errors for broken pipe and reset X-Git-Tag: release-1.10.0rc1~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c0a863584e888c10a5b3f4afdf42502d36bccc7;p=thirdparty%2Funbound.git - Fix to silence the tls handshake errors for broken pipe and reset by peer, unless verbosity is set to 2 or higher. --- diff --git a/doc/Changelog b/doc/Changelog index ebaf368af..c551dc09c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,8 @@ 28 January 2020: Wouter - iana portlist updated. + - Fix to silence the tls handshake errors for broken pipe and reset + by peer, unless verbosity is set to 2 or higher. 27 January 2020: Ralph - Merge PR#154; Allow use of libbsd functions with configure option diff --git a/util/netevent.c b/util/netevent.c index 980bb8bea..9fe5da2d4 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -1120,6 +1120,14 @@ ssl_handshake(struct comm_point* c) return 0; /* closed */ } else if(want == SSL_ERROR_SYSCALL) { /* SYSCALL and errno==0 means closed uncleanly */ +#ifdef EPIPE + if(errno == EPIPE && verbosity < 2) + return 0; /* silence 'broken pipe' */ +#endif +#ifdef ECONNRESET + if(errno == ECONNRESET && verbosity < 2) + return 0; /* silence reset by peer */ +#endif if(errno != 0) log_err("SSL_handshake syscall: %s", strerror(errno));