summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-10-23 22:23:56 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2018-10-23 22:24:56 +0100
commit590faf89a2dd33a5f97f8e685efd019ac9c96e1e (patch)
tree1efc7ed3cb85b5d260d30a85ca6c391fcd33d728
parentca9be0dc61a92a34325d83d72601e47b10e38f09 (diff)
MacOS: probe for a usable TFO system configuration
-rw-r--r--src/OS/os.h-Darwin6
-rw-r--r--src/src/daemon.c3
2 files changed, 8 insertions, 1 deletions
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));