From: Vladimír Čunát Date: Wed, 4 Mar 2020 12:47:02 +0000 (+0100) Subject: daemon/io: extend logging for TCP Fast Open failure X-Git-Tag: v5.1.0~37^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f1fc6e5dd567d26b83d653a6ba2acc021d02e3d;p=thirdparty%2Fknot-resolver.git daemon/io: extend logging for TCP Fast Open failure In FreeBSD it's disabled by default, causing this error. I tried disabling it on Linux via sysctl, but that didn't seem to cause any errors. --- diff --git a/daemon/io.c b/daemon/io.c index eb1f276ab..fb1a1d076 100644 --- a/daemon/io.c +++ b/daemon/io.c @@ -440,7 +440,9 @@ int io_listen_tcp(uv_loop_t *loop, uv_tcp_t *handle, int fd, int tcp_backlog, bo val = 1; /* Accepts on/off */ #endif if (setsockopt(fd, IPPROTO_TCP, TCP_FASTOPEN, &val, sizeof(val))) { - kr_log_error("[ io ] listen TCP (fastopen): %s\n", strerror(errno)); + kr_log_error("[ io ] listen TCP (fastopen): %s%s\n", strerror(errno), + (errno != EPERM ? "" : + ". This may be caused by TCP Fast Open being disabled in the OS.")); } #endif