MEDIUM: tcp: add the "tfo" option to support TCP fastopen on the server
This implements support for the new API which relies on a call to
setsockopt().
On systems that support it (currently, only Linux >= 4.11), this enables
using TCP fast open when connecting to server.
Please note that you should use the retry-on "conn-failure", "empty-response"
and "response-timeout" keywords, or the request won't be able to be retried
on failure.
Co-authored-by: Olivier Houchard <ohouchard@haproxy.com>
diff --git a/include/common/compat.h b/include/common/compat.h
index 8a7bbd5..1401f91 100644
--- a/include/common/compat.h
+++ b/include/common/compat.h
@@ -128,6 +128,10 @@
#ifndef TCP_FASTOPEN
#define TCP_FASTOPEN 23
#endif
+
+#ifndef TCP_FASTOPEN_CONNECT
+#define TCP_FASTOPEN_CONNECT 30
+#endif
#endif
/* FreeBSD doesn't define SOL_IP and prefers IPPROTO_IP */