From: Jeremy Harris Date: Sat, 2 Sep 2017 15:16:43 +0000 (+0100) Subject: Logging: restrict TFO client-side to Linux X-Git-Tag: exim-4_90_RC1~81 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/7d6ea1cdb5bd8887ccc8f7b9ad787a8e3e25ea2a 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. --- 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 /* for TCP_FASTOPEN */ #include /* 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);