mirror of https://github.com/getdnsapi/getdns.git
Turn fast open on by default. Fix build warning.
This commit is contained in:
parent
e20d679bc8
commit
e5a80943e2
17
configure.ac
17
configure.ac
|
@ -120,17 +120,16 @@ fi
|
||||||
])
|
])
|
||||||
ACX_ARG_RPATH
|
ACX_ARG_RPATH
|
||||||
|
|
||||||
AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--enable-tcp-fastopen], [Enable TCP Fast Open]))
|
AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--disable-tcp-fastopen], Disable TCP Fast Open (default=enabled if available)),
|
||||||
case "$enable_tcp_fastopen" in
|
enable_tcp_fastopen="$enableval", enable_tcp_fastopen=yes)
|
||||||
yes)
|
if test "x$enable_tcp_fastopen" = xno; then
|
||||||
AC_CHECK_DECL([MSG_FASTOPEN], [], [AC_MSG_ERROR([TCP Fast Open is not available: please rerun without --enable-tcp-fastopen])], [AC_INCLUDES_DEFAULT
|
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 <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
])
|
])
|
||||||
AC_DEFINE_UNQUOTED([USE_TCP_FASTOPEN], [1], [Define this to enable TCP fast open.])
|
fi
|
||||||
;;
|
|
||||||
no|*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(broken-native-stub-dnssec, AC_HELP_STRING([--enable-broken-native-stub-dnssec], [Enable very experimental and broken native stub DNSSEC support]))
|
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
|
case "$enable_broken_native_stub_dnssec" in
|
||||||
|
|
|
@ -1274,7 +1274,6 @@ upstream_read_cb(void *userarg)
|
||||||
getdns_upstream *upstream = (getdns_upstream *)userarg;
|
getdns_upstream *upstream = (getdns_upstream *)userarg;
|
||||||
getdns_network_req *netreq;
|
getdns_network_req *netreq;
|
||||||
getdns_dns_req *dnsreq;
|
getdns_dns_req *dnsreq;
|
||||||
uint64_t idle_timeout;
|
|
||||||
int q;
|
int q;
|
||||||
uint16_t query_id;
|
uint16_t query_id;
|
||||||
intptr_t query_id_intptr;
|
intptr_t query_id_intptr;
|
||||||
|
@ -1317,8 +1316,6 @@ upstream_read_cb(void *userarg)
|
||||||
/* TODO[TLS]: I don't think we should do this for TCP. We should stay
|
/* TODO[TLS]: I don't think we should do this for TCP. We should stay
|
||||||
* on a working connection until we hit a problem.*/
|
* on a working connection until we hit a problem.*/
|
||||||
upstream->upstreams->current = 0;
|
upstream->upstreams->current = 0;
|
||||||
/* netreq may die before setting timeout*/
|
|
||||||
idle_timeout = netreq->owner->context->idle_timeout;
|
|
||||||
|
|
||||||
/* TODO: DNSSEC */
|
/* TODO: DNSSEC */
|
||||||
netreq->secure = 0;
|
netreq->secure = 0;
|
||||||
|
|
Loading…
Reference in New Issue