From 8bb01c46ad2a3743b26fba5546eafc0fa7fac6f1 Mon Sep 17 00:00:00 2001 From: Sara Dickinson Date: Mon, 29 Jun 2015 17:39:14 +0100 Subject: [PATCH] Turn TFO off by default. Strange crash found if TCP is not available. --- configure.ac | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 9bc1fb31..97d2a9a8 100644 --- a/configure.ac +++ b/configure.ac @@ -120,16 +120,29 @@ fi ]) ACX_ARG_RPATH -AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--disable-tcp-fastopen], Disable TCP Fast Open (default=enabled if available)), - enable_tcp_fastopen="$enableval", enable_tcp_fastopen=yes) -if test "x$enable_tcp_fastopen" = xno; then - AC_MSG_WARN([TCP Fast Open is disabled]) -else - AC_CHECK_DECL([MSG_FASTOPEN], [AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable TCP fast open.])], - [AC_MSG_WARN([TCP Fast Open is not available.])], [AC_INCLUDES_DEFAULT +AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--enable-tcp-fastopen], [Enable TCP Fast Open])) +case "$enable_tcp_fastopen" in + yes) + AC_CHECK_DECL([MSG_FASTOPEN], [], [AC_MSG_ERROR([TCP Fast Open is not available: please rerun without --enable-tcp-fastopen])], [AC_INCLUDES_DEFAULT #include ]) -fi + AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable TCP fast open.]) + ;; + no|*) + ;; +esac + +# Not yet enabled by default as crash found when TCP fails. +# AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--disable-tcp-fastopen], Disable TCP Fast Open (default=enabled if available)), +# enable_tcp_fastopen="$enableval", enable_tcp_fastopen=yes) +# if test "x$enable_tcp_fastopen" = xno; then +# AC_MSG_WARN([TCP Fast Open is disabled]) +# else +# AC_CHECK_DECL([MSG_FASTOPEN], [AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable TCP fast open.])], +# [AC_MSG_WARN([TCP Fast Open is not available.])], [AC_INCLUDES_DEFAULT +# #include +# ]) +# fi AC_ARG_ENABLE(broken-native-stub-dnssec, AC_HELP_STRING([--enable-broken-native-stub-dnssec], [Enable very experimental and broken native stub DNSSEC support])) case "$enable_broken_native_stub_dnssec" in