]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #360: for the additionally reported TCP Fast Open makes TCP
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 2 Dec 2020 08:51:26 +0000 (09:51 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 2 Dec 2020 08:51:26 +0000 (09:51 +0100)
  connections fail, in that case we print a hint that this is
  happening with the error in the logs.

doc/Changelog
util/netevent.c

index 30b8d34a1f32624865e714465177a55009f1130f..1e895f9f2321f3f66eac1833f895d2c09640461d 100644 (file)
@@ -1,3 +1,8 @@
+2 December 2020: Wouter
+       - Fix #360: for the additionally reported TCP Fast Open makes TCP
+         connections fail, in that case we print a hint that this is
+         happening with the error in the logs.
+
 1 December 2020: Wouter
        - Fix #358: Squelch udp connect 'no route to host' errors on low
          verbosity.
index 311a114ee613a37b6619a35ef26ac8c7a4e55426..1a5d228927702de01c0d6a225510054003c1f542 100644 (file)
@@ -1594,6 +1594,13 @@ comm_point_tcp_handle_read(int fd, struct comm_point* c, int short_ok)
                        if(errno == ECONNRESET && verbosity < 2)
                                return 0; /* silence reset by peer */
 #endif
+#ifdef ENOTCONN
+                       if(errno == ENOTCONN) {
+                               log_err_addr("read (in tcp s) failed and this could be because TCP Fast Open is enabled [--disable-tfo-client --disable-tfo-server] but does not work", sock_strerror(errno),
+                                       &c->repinfo.addr, c->repinfo.addrlen);
+                               return 0;
+                       }
+#endif
 #else /* USE_WINSOCK */
                        if(WSAGetLastError() == WSAECONNRESET)
                                return 0;