From: Jeremy Harris Date: Tue, 23 Oct 2018 21:23:56 +0000 (+0100) Subject: MacOS: probe for a usable TFO system configuration X-Git-Tag: exim-4.92-RC1~60 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/590faf89a2dd33a5f97f8e685efd019ac9c96e1e?ds=inline MacOS: probe for a usable TFO system configuration --- diff --git a/src/OS/os.h-Darwin b/src/OS/os.h-Darwin index b597f9da3..d0a1a092f 100644 --- a/src/OS/os.h-Darwin +++ b/src/OS/os.h-Darwin @@ -53,4 +53,10 @@ in "man 2 getgroups". */ #define _DARWIN_UNLIMITED_GETGROUPS #define EXIM_GROUPLIST_SIZE 64 +/* TCP_FASTOPEN support. For the moment, claim there is none +(the probe fails; unsure why). +Sometime in the future need to investigate connectex(). */ + +#define EXIM_TFO_PROBE + /* End */ diff --git a/src/src/daemon.c b/src/src/daemon.c index d69a7db3d..ee9ddcc4f 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -1459,7 +1459,8 @@ if (f.daemon_listen && !f.inetd_wait_mode) debug_printf("listening on %s port %d\n", ipa->address, ipa->port); #ifdef TCP_FASTOPEN - if (setsockopt(listen_sockets[sk], IPPROTO_TCP, TCP_FASTOPEN, + if ( f.tcp_fastopen_ok + && setsockopt(listen_sockets[sk], IPPROTO_TCP, TCP_FASTOPEN, &smtp_connect_backlog, sizeof(smtp_connect_backlog))) { DEBUG(D_any) debug_printf("setsockopt FASTOPEN: %s\n", strerror(errno));