Commit Graph

35 Commits

Author SHA1 Message Date
Willem Toorop 2a0114591a Resolve compile warnings
Thanks Andreas!
2021-06-03 20:45:55 +02:00
Willem Toorop eeb460af8d Merge branch 'develop' of github.com:getdnsapi/getdns into develop 2021-05-26 16:06:30 +02:00
Willem Toorop 515127289c Merge branch 'tcp-send-timeout' of https://github.com/maciejsszmigiero/getdns into maciejsszmigiero-tcp-send-timeout 2021-05-26 15:56:55 +02:00
Willem Toorop ae090a29b1
Merge pull request #482 from neheb/patch-1
val_secalgo: add missing DSA header
2021-05-26 15:48:10 +02:00
har-riz 0a13e4dbd3
Fix typo in cmakeconfig.h.in files
Fix typo in CMAKE included files, so Stubby can use TLS v1.3 with chipersuites options ON.

This solve issue that's written in here :
https://github.com/getdnsapi/stubby/issues/240
2021-01-27 18:29:22 +07:00
Rosen Penev 80cdfb3bd0
fix compilation without deprecated OpenSSL APIs
Several cmake header checks were missing and added.

Added rsa.h include.

Remove ENGINE_load_dynamic. ENGINE_load_builtin_engines already does
this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-04 19:54:18 -07:00
Maciej S. Szmigiero 606a88f9aa
Add "tcp_send_timeout" option to set a TCP send data timeout
When using Stubby as a system DNS over TLS resolver with a Internet
connection that disconnects and reconnects from time to time there is often
a long waiting time (~20 minutes) after the connection reconnects before
DNS queries start to work again.

This is because in this particular case all the upstream TLS TCP
connections in Stubby are stuck waiting for upstream server response.
Which will never arrive since the host external IP address might have
changed and / or NAT router connection tracking entries for these TCP
connections might have been removed when the Internet connection
reconnected.

By default Linux tries to retransmit data on a TCP connection 15 times
before finally terminating it.
This takes 16 - 20 minutes, which is obviously a very long time to wait for
system DNS resolving to work again.
This is a real problem on weak mobile connections.

Thankfully, there is a "TCP_USER_TIMEOUT" per-socket option that allows
explicitly setting how long the network stack will wait in such cases.

Let's add a matching "tcp_send_timeout" option to getdns that allows
setting this option on outgoing TCP sockets.
For backward compatibility the code won't try to set it by default.

With this option set to, for example, 15 seconds Stubby recovers pretty
much instantly in such cases.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2020-07-13 00:21:16 +02:00
Jim Hague ab49db8aa5 Tighten Nettle version checking, and fix build issue with Nettle >= 3.4.
Nettle 3.4 introduced accessor functions for obtaining nettle_secp_256r1 and nettle_secp_384r1. Use them if present.

Fixes #458
2020-02-25 13:30:25 +00:00
Willem Toorop dadddb0d7b Detect if __func__ can be used with debugging 2020-02-20 21:09:17 +01:00
Willem Toorop 17d5627529 Make TCP_FASTOPEN work again for linux and FreeBSD 2019-12-13 16:18:53 +01:00
Jim Hague 277a4ae9c7 Add test for new libuv callback styles.
This fixes a build warning on Mac.
2019-11-13 18:07:31 +00:00
Jim Hague a46ded25b6 Implement enabling and checking for TCP Fast Open. 2019-10-30 17:21:25 +00:00
Jim Hague cbed43ed59 Add ENABLE_EDNS_COOKIES. 2019-10-30 14:09:13 +00:00
Jim Hague 74d9404759 FIrst pass at GnuTLS support. 2019-10-30 14:02:32 +00:00
Jim Hague 02561c2d7e Add building the libevent extension.
Insist on libevent2.
2019-10-28 18:11:42 +00:00
Jim Hague 4ab7f8f757 Shared libraries - move versioning and export list into functions.
Also for Windows add looking for a template .RC of the target name and adding that to the build too.
2019-10-28 17:11:00 +00:00
Jim Hague 1da968a35f Detect and use libidn and libidn2 if present. 2019-10-28 09:57:29 +00:00
Jim Hague 164b089011 Add option to enable MDNS support. 2019-10-25 17:18:29 +01:00
Jim Hague 9dcd8482f5 Add stub only mode, on by default.
If disabled, it needs to drag in libunbound. So do all that.
2019-10-24 17:40:37 +01:00
Jim Hague 55a0456b67 Add cipher configuration options. 2019-10-24 14:21:25 +01:00
Jim Hague e4333b13df Add debug message options. 2019-10-24 13:43:20 +01:00
Jim Hague b5f260376e Expose file paths as options. 2019-10-24 11:57:16 +01:00
Jim Hague 07e617579d Add fd setsize configuration. 2019-10-24 11:15:41 +01:00
Jim Hague 5f3d5191b0 Make visible existing options that are visible in autoconf.
Also punctuate option text consistently.
2019-10-24 11:14:20 +01:00
Jim Hague cd62f2b716 Don't include OpenSSL headers in config.h.
Add an include of stdlib.h to various files that were relying on config.h to drag it in. I don't think config.h should be pulling in standard C headers.
2019-10-15 18:37:10 +01:00
Jim Hague 8362a183e8 Remove use of pkg-config to see if libbsd is present.
Instead check for the library directly.In the process, fix the detection of the declarations and functions in libbsd so they work.
2019-10-15 18:35:06 +01:00
Jim Hague dd70108558 Windows does not have mkstemp(). Add compat version.
The compat version is Windows-specific.
2019-10-15 16:54:13 +01:00
Jim Hague 323d76d7ae Add the rest of the compat functions to the build, if required.
Remove any preprocess guards from the sources, and only include them in the build if required. Add some additional required Windows libraries.
2019-10-15 16:53:03 +01:00
Jim Hague b8df26194e Add symbols for target endianness. 2019-10-14 09:47:03 +01:00
Jim Hague 7a0a2f712d Add support for building on Windows.
This should support both native Visual Studio builds and MinGW builds.
2019-10-14 09:44:28 +01:00
Jim Hague dc6cadebbc Add OpenSSL function checks as per autoconf.
Well, those function checks that are actually used in the code, anyway.
2019-10-10 12:30:50 +01:00
Jim Hague c367b39c13 Update build to get the current source building.
Hardwire OpenSSL and do the minimum necessary to get libgetdns building.
2019-10-09 17:19:18 +01:00
Jim Hague 3152a4112e Protect more #includes.
Somewhat illogical, really. A lot are standard headers.
2018-01-12 16:34:23 +00:00
Jim Hague a906710269 Add missing function sufficient to compile Stubby on Xenial and Mac.
This includes the select and poll default event loops, some missing getdns source files and pleasingly now results in a warning-free build.
2018-01-08 18:59:54 +00:00
Jim Hague 1ecc7b3c26 Initial version of CMake build.
This is just a basic build of the library. No options are support, and  the only builds tested are Xenial and MacOS (the latter using the Brew openssl package, and so requiring -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2l option on the cmake command line).

Using the library is untested.
2018-01-08 15:36:35 +00:00