From: Jeremy Harris Date: Tue, 25 Oct 2016 13:59:44 +0000 (+0100) Subject: TFO: use IPPROTO_TCP not SOL_TCL for setsockopt, being present on more platforms X-Git-Tag: exim-4_88_RC4~33 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4670e9d3b06f6f14c5d868f786b75e2d6b921c8d;p=exim.git TFO: use IPPROTO_TCP not SOL_TCL for setsockopt, being present on more platforms Also downgrade errors from panic-log to debug --- diff --git a/src/src/daemon.c b/src/src/daemon.c index dc49eeb85..3ace7e9db 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -1458,10 +1458,9 @@ if (daemon_listen && !inetd_wait_mode) debug_printf("listening on %s port %d\n", ipa->address, ipa->port); #ifdef TCP_FASTOPEN - if (setsockopt(listen_sockets[sk], SOL_TCP, TCP_FASTOPEN, &smtp_connect_backlog, - sizeof(smtp_connect_backlog))) - log_write(0, LOG_MAIN|LOG_PANIC, "failed to set socket FASTOPEN: %s", - strerror(errno)); + if (setsockopt(listen_sockets[sk], IPPROTO_TCP, TCP_FASTOPEN, + &smtp_connect_backlog, sizeof(smtp_connect_backlog))) + DEBUG(D_any) debug_printf("setsockopt FASTOPEN: %s", strerror(errno)); #endif /* Start listening on the bound socket, establishing the maximum backlog of diff --git a/src/src/ip.c b/src/src/ip.c index a8230a149..ee70cf469 100644 --- a/src/src/ip.c +++ b/src/src/ip.c @@ -239,8 +239,8 @@ if (fastopen) && errno == EOPNOTSUPP ) { - log_write(0, LOG_MAIN|LOG_PANIC, - "Tried TCP Fast Open but apparently not enabled by sysctl"); + DEBUG(D_transport) + debug_printf("Tried TCP Fast Open but apparently not enabled by sysctl"); rc = connect(sock, s_ptr, s_len); } }