]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix to silence the tls handshake errors for broken pipe and reset
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 28 Jan 2020 13:32:06 +0000 (14:32 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 28 Jan 2020 13:32:06 +0000 (14:32 +0100)
  by peer, unless verbosity is set to 2 or higher.

doc/Changelog
util/netevent.c

index ebaf368afed7f19e1abad4e2bf78e0aa220661fa..c551dc09c6c37d0169b2f47e6df62666fb5738e3 100644 (file)
@@ -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
index 980bb8bea97224e9eb20071aba801c3cbd8d9ae5..9fe5da2d45a343f8a3847d44b301b41c6046cecf 100644 (file)
@@ -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));