summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-09-02 16:16:43 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2017-09-02 16:16:43 +0100
commit7d6ea1cdb5bd8887ccc8f7b9ad787a8e3e25ea2a (patch)
tree5ea1e9deb5b6fffd071ef21d0f7d5771cd196c6e
parenta2673768b71ee86c71e16e46d53d0ffc4f66b0de (diff)
Logging: restrict TFO client-side to Linux
The detection method depends on a getsockopt struct member apparently not supported by FreeBSD (at least). Other platforms status unknown.
-rw-r--r--doc/doc-txt/NewStuff3
-rw-r--r--src/OS/os.h-Linux3
-rw-r--r--src/src/smtp_out.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff
index e57192e58..8ea1708bd 100644
--- a/doc/doc-txt/NewStuff
+++ b/doc/doc-txt/NewStuff
@@ -49,7 +49,8 @@ Version 4.90
12. TCP Fast Open logging. As a server, logs when the SMTP banner was sent
while still in SYN_RECV state; as a client logs when the connection
- is opened with a TFO cookie.
+ is opened with a TFO cookie. Support varies between platforms
+ (Linux does both. FreeBSD server only, others unknown).
Version 4.89
diff --git a/src/OS/os.h-Linux b/src/OS/os.h-Linux
index 57034649c..f6d35772b 100644
--- a/src/OS/os.h-Linux
+++ b/src/OS/os.h-Linux
@@ -72,11 +72,14 @@ then change the 0 to 1 in the next block. */
# define EXIM_HAVE_OPENAT
#endif
+/* TCP Fast Open support */
+
#include <netinet/tcp.h> /* for TCP_FASTOPEN */
#include <sys/socket.h> /* for MSG_FASTOPEN */
#if defined(TCP_FASTOPEN) && !defined(MSG_FASTOPEN)
# define MSG_FASTOPEN 0x20000000
#endif
+#define EXIM_HAVE_TCPI_UNACKED
/* End */
diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c
index d5bf262be..ee39cb2fb 100644
--- a/src/src/smtp_out.c
+++ b/src/src/smtp_out.c
@@ -144,7 +144,7 @@ return TRUE;
static void
tfo_out_check(int sock)
{
-# ifdef TCP_INFO
+# if defined(TCP_INFO) && defined(EXIM_HAVE_TCPI_UNACKED)
struct tcp_info tinfo;
socklen_t len = sizeof(tinfo);