Gitweb:
https://git.exim.org/exim.git/commitdiff/590faf89a2dd33a5f97f8e685efd019ac9c96e1e
Commit: 590faf89a2dd33a5f97f8e685efd019ac9c96e1e
Parent: ca9be0dc61a92a34325d83d72601e47b10e38f09
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Tue Oct 23 22:23:56 2018 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Tue Oct 23 22:24:56 2018 +0100
MacOS: probe for a usable TFO system configuration
---
src/OS/os.h-Darwin | 6 ++++++
src/src/daemon.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/OS/os.h-Darwin b/src/OS/os.h-Darwin
index b597f9d..d0a1a09 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 d69a7db..ee9ddcc 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));