From 1ebf851bf0906dab0739fed9426c8184e2f59746 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Wed, 2 Dec 2020 09:51:26 +0100 Subject: [PATCH] - 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. --- doc/Changelog | 5 +++++ util/netevent.c | 7 +++++++ 2 files changed, 12 insertions(+) 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;