From: W.C.A. Wijngaards Date: Wed, 2 Dec 2020 08:51:26 +0000 (+0100) Subject: - Fix #360: for the additionally reported TCP Fast Open makes TCP X-Git-Tag: release-1.13.1rc1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ebf851bf0906dab0739fed9426c8184e2f59746;p=thirdparty%2Funbound.git - 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. --- diff --git a/doc/Changelog b/doc/Changelog index 30b8d34a1..1e895f9f2 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/util/netevent.c b/util/netevent.c index 311a114ee..1a5d22892 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -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;