]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
22 months agodnsdist: Only compile and link doh.cc when h2o support is enabled 12678/head
Remi Gacogne [Thu, 7 Sep 2023 09:31:24 +0000 (11:31 +0200)] 
dnsdist: Only compile and link doh.cc when h2o support is enabled

22 months agotcpiohandler: Make it clearer which TLS implementation is preferred
Remi Gacogne [Thu, 7 Sep 2023 09:30:17 +0000 (11:30 +0200)] 
tcpiohandler: Make it clearer which TLS implementation is preferred

22 months agodnsdist: Unbreak incoming DoH w/ h2o
Remi Gacogne [Fri, 18 Aug 2023 08:47:47 +0000 (10:47 +0200)] 
dnsdist: Unbreak incoming DoH w/ h2o

22 months agodnsdist: Apply suggestions from Charles-Henri Bruyand's review (thanks!)
Remi Gacogne [Fri, 18 Aug 2023 06:53:16 +0000 (08:53 +0200)] 
dnsdist: Apply suggestions from Charles-Henri Bruyand's review (thanks!)

22 months agodnsdist: Fix a typo (HTTP/1->2) in the DoH doc, as reported by Frank Louwers (thanks!)
Remi Gacogne [Mon, 14 Aug 2023 09:21:39 +0000 (11:21 +0200)] 
dnsdist: Fix a typo (HTTP/1->2) in the DoH doc, as reported by Frank Louwers (thanks!)

22 months agodnsdist: Fix formatting in test-dnsdistnghttp2-in_cc.cc
Remi Gacogne [Tue, 1 Aug 2023 09:32:38 +0000 (11:32 +0200)] 
dnsdist: Fix formatting in test-dnsdistnghttp2-in_cc.cc

22 months agodnsdist: Delint test-dnsdistnghttp2-in_cc.cc and dnsdist-nghttp2.cc
Remi Gacogne [Tue, 1 Aug 2023 09:26:30 +0000 (11:26 +0200)] 
dnsdist: Delint test-dnsdistnghttp2-in_cc.cc and dnsdist-nghttp2.cc

22 months agodnsdist: Fix spelling issues
Remi Gacogne [Fri, 21 Jul 2023 17:19:15 +0000 (19:19 +0200)] 
dnsdist: Fix spelling issues

22 months agodnsdist: Document the h2o -> nghttp2 upgrade path
Remi Gacogne [Fri, 21 Jul 2023 15:53:34 +0000 (17:53 +0200)] 
dnsdist: Document the h2o -> nghttp2 upgrade path

22 months agodnsdist: Remove unused function in outgoing DoH
Remi Gacogne [Fri, 7 Jul 2023 15:16:02 +0000 (17:16 +0200)] 
dnsdist: Remove unused function in outgoing DoH

22 months agodnsdist: Better logging of backend server identity
Remi Gacogne [Thu, 20 Jul 2023 08:07:38 +0000 (10:07 +0200)] 
dnsdist: Better logging of backend server identity

22 months agodnsdist: Remove TCPIOHandler::hasBufferedData() since we cannot rely on it
Remi Gacogne [Mon, 17 Jul 2023 14:59:48 +0000 (16:59 +0200)] 
dnsdist: Remove TCPIOHandler::hasBufferedData() since we cannot rely on it

22 months agodnsdist: Fix incoming DoT when OpenSSL's read-ahead mode is enabled
Remi Gacogne [Mon, 17 Jul 2023 14:58:25 +0000 (16:58 +0200)] 
dnsdist: Fix incoming DoT when OpenSSL's read-ahead mode is enabled

22 months agodnsdist: Enable readAhead by default for TLS and DOH frontends
Remi Gacogne [Thu, 13 Jul 2023 15:23:22 +0000 (17:23 +0200)] 
dnsdist: Enable readAhead by default for TLS and DOH frontends

22 months agodnsdist: Document the new options to add{DOH,TLS}Local
Remi Gacogne [Thu, 13 Jul 2023 15:23:00 +0000 (17:23 +0200)] 
dnsdist: Document the new options to add{DOH,TLS}Local

22 months agodnsdist: Give the mock Proxy Protocol proxy some time to start
Remi Gacogne [Tue, 18 Jul 2023 12:37:16 +0000 (14:37 +0200)] 
dnsdist: Give the mock Proxy Protocol proxy some time to start

22 months agodnsdist: Add a test for DoH incoming proxy protocol inside of TLS
Remi Gacogne [Thu, 13 Jul 2023 14:15:48 +0000 (16:15 +0200)] 
dnsdist: Add a test for DoH incoming proxy protocol inside of TLS

22 months agodnsdist: Add a test for DoH incoming proxy protocol outside of TLS
Remi Gacogne [Thu, 13 Jul 2023 12:45:38 +0000 (14:45 +0200)] 
dnsdist: Add a test for DoH incoming proxy protocol outside of TLS

22 months agodnsdist: Add support for incoming proxy protocol outside the TLS layer
Remi Gacogne [Wed, 12 Jul 2023 15:46:57 +0000 (17:46 +0200)] 
dnsdist: Add support for incoming proxy protocol outside the TLS layer

22 months agodnsdist: Simplify I/O handling for incoming H2 w/ nghttp2
Remi Gacogne [Wed, 12 Jul 2023 12:41:31 +0000 (14:41 +0200)] 
dnsdist: Simplify I/O handling for incoming H2 w/ nghttp2

22 months agodnsdist: Fix timeout handling for incoming H2 w/ nghttp2
Remi Gacogne [Wed, 12 Jul 2023 12:40:34 +0000 (14:40 +0200)] 
dnsdist: Fix timeout handling for incoming H2 w/ nghttp2

22 months agodnsdist: Add unit and regression tests for incoming DoH w/ nghttp2
Remi Gacogne [Fri, 30 Jun 2023 15:49:35 +0000 (17:49 +0200)] 
dnsdist: Add unit and regression tests for incoming DoH w/ nghttp2

It is quite likely that the underlying TLS layer has buffered some
data already, so we need to consume it before trying to poll the
socket.

22 months agodnsdist: Make clang-tidy happy
Remi Gacogne [Thu, 22 Jun 2023 10:26:04 +0000 (12:26 +0200)] 
dnsdist: Make clang-tidy happy

22 months agodnsdist: Implement read-ahead support for incoming TLS connections
Remi Gacogne [Wed, 21 Jun 2023 08:55:28 +0000 (10:55 +0200)] 
dnsdist: Implement read-ahead support for incoming TLS connections

Read-ahead instructs OpenSSL to read more than the number of bytes
we requested from the incoming connection, if possible, and to buffer
it. This provides a huge performance boost by reducing the number
of syscalls because in most cases the data is already available on
the socket to be read even if we cannot know that yet without reading
the data length.
There are two drawbacks:
- we can keep reading on a connection in a loop as long as there is
  data available, which should be prevented by our number of concurrent
  requests limit ;
- we need to always try to read all the data available before asking
  the kernel to wake us up when the socket is readable, because the
  data buffered by OpenSSL is obviously not visible to the kernel so
  we could wait forever.

22 months agodnsdist: Test both incoming DoH implementations for TLS resumption
Remi Gacogne [Mon, 27 Mar 2023 12:48:19 +0000 (14:48 +0200)] 
dnsdist: Test both incoming DoH implementations for TLS resumption

22 months agodnsdist: Test both incoming DoH implementations in ProxyProtocol tests
Remi Gacogne [Mon, 27 Mar 2023 12:30:57 +0000 (14:30 +0200)] 
dnsdist: Test both incoming DoH implementations in ProxyProtocol tests

22 months agodnsdist: Test both incoming DoH implementations in Protobuf tests
Remi Gacogne [Mon, 27 Mar 2023 11:54:49 +0000 (13:54 +0200)] 
dnsdist: Test both incoming DoH implementations in Protobuf tests

22 months agodnsdist: Test both incoming DoH implementations in OCSP tests
Remi Gacogne [Mon, 27 Mar 2023 11:54:28 +0000 (13:54 +0200)] 
dnsdist: Test both incoming DoH implementations in OCSP tests

22 months agodnsdist: Test both incoming DoH implementations in Async tests
Remi Gacogne [Mon, 27 Mar 2023 11:42:08 +0000 (13:42 +0200)] 
dnsdist: Test both incoming DoH implementations in Async tests

22 months agodnsdist: Enable h2o in our workflows since it is now optional
Remi Gacogne [Fri, 24 Mar 2023 17:12:26 +0000 (18:12 +0100)] 
dnsdist: Enable h2o in our workflows since it is now optional

22 months agodnsdist: Check both h2o and nghttp2 in the DoH regression tests
Remi Gacogne [Fri, 24 Mar 2023 17:08:14 +0000 (18:08 +0100)] 
dnsdist: Check both h2o and nghttp2 in the DoH regression tests

22 months agodnsdist: Small optimizations for incoming DoH
Remi Gacogne [Thu, 11 May 2023 15:49:39 +0000 (17:49 +0200)] 
dnsdist: Small optimizations for incoming DoH

22 months agodnsdist: Small optimization for nghttp2 headers
Remi Gacogne [Fri, 5 May 2023 15:10:14 +0000 (17:10 +0200)] 
dnsdist: Small optimization for nghttp2 headers

22 months agodnsdist: Log when a TC=1 response is received for a DoH query
Remi Gacogne [Mon, 27 Mar 2023 11:41:36 +0000 (13:41 +0200)] 
dnsdist: Log when a TC=1 response is received for a DoH query

22 months agodnsdist: Implement incoming DoH support via nghttp2
Remi Gacogne [Mon, 31 Jul 2023 15:07:05 +0000 (17:07 +0200)] 
dnsdist: Implement incoming DoH support via nghttp2

22 months agodnsdist: Refactor the DoH code to be able to have two libraries
Remi Gacogne [Mon, 31 Jul 2023 14:18:02 +0000 (16:18 +0200)] 
dnsdist: Refactor the DoH code to be able to have two libraries

22 months agodnsdist: Make TLSFrontend and TCPIOHandler suitable for DoH as well
Remi Gacogne [Mon, 31 Jul 2023 09:56:30 +0000 (11:56 +0200)] 
dnsdist: Make TLSFrontend and TCPIOHandler suitable for DoH as well

22 months agodnsdist: Get rid of the reference counter for DOHUnit
Remi Gacogne [Mon, 31 Jul 2023 09:46:16 +0000 (11:46 +0200)] 
dnsdist: Get rid of the reference counter for DOHUnit

It is no longer needed since we now rely on moving the unique pointer
around.

22 months agodnsdist: Prepare for a second incoming DoH provider
Remi Gacogne [Mon, 31 Jul 2023 09:18:30 +0000 (11:18 +0200)] 
dnsdist: Prepare for a second incoming DoH provider

h2o becomes optional, and is not enabled by default.

22 months agoMerge pull request #13208 from neheb/pai
Remi Gacogne [Thu, 7 Sep 2023 07:15:34 +0000 (09:15 +0200)] 
Merge pull request #13208 from neheb/pai

remove make_tuple and make_pair

22 months agoMerge pull request #13218 from Habbie/docker-compose-space
Peter van Dijk [Wed, 6 Sep 2023 20:07:54 +0000 (22:07 +0200)] 
Merge pull request #13218 from Habbie/docker-compose-space

switch from `docker-compose` to `docker compose` and stop installing docker-compose because that uninstalls runc

22 months agoswitch from `docker-compose` to `sudo docker compose` and 13218/head
Peter van Dijk [Tue, 29 Aug 2023 13:07:19 +0000 (15:07 +0200)] 
switch from `docker-compose` to `sudo docker compose` and
stop installing docker-compose because that uninstalls runc

22 months agoMerge pull request #12086 from zeha/apizonepost
Peter van Dijk [Wed, 6 Sep 2023 10:18:12 +0000 (12:18 +0200)] 
Merge pull request #12086 from zeha/apizonepost

API: Auth: replace zone contents et al

22 months agoMerge pull request #13086 from jsoref/speed-bumps
Peter van Dijk [Tue, 5 Sep 2023 23:04:01 +0000 (01:04 +0200)] 
Merge pull request #13086 from jsoref/speed-bumps

Add speed bumps to bug filing

22 months agoMerge pull request #13197 from rgacogne/remove-arc4random-warning
Remi Gacogne [Tue, 5 Sep 2023 15:54:30 +0000 (17:54 +0200)] 
Merge pull request #13197 from rgacogne/remove-arc4random-warning

arc4random: Fix 'redundant redeclaration’ warnings

22 months agoUse at(i) instead of [i] 13208/head
Otto Moerbeek [Tue, 5 Sep 2023 10:40:50 +0000 (12:40 +0200)] 
Use at(i) instead of [i]

22 months agowording 13086/head
Peter van Dijk [Tue, 5 Sep 2023 10:47:59 +0000 (12:47 +0200)] 
wording

22 months agoalso link to Discussions
Peter van Dijk [Tue, 5 Sep 2023 10:23:43 +0000 (12:23 +0200)] 
also link to Discussions

22 months agosimplify text
Peter van Dijk [Tue, 5 Sep 2023 10:22:24 +0000 (12:22 +0200)] 
simplify text

22 months agoMerge pull request #11597 from cmouse/geoipbackend-multi
Peter van Dijk [Tue, 5 Sep 2023 10:15:17 +0000 (12:15 +0200)] 
Merge pull request #11597 from cmouse/geoipbackend-multi

geoipbackend: Support reading zones from directory

22 months agoremove make_tuple and make_pair
Rosen Penev [Fri, 1 Sep 2023 08:41:48 +0000 (08:41 +0000)] 
remove make_tuple and make_pair

Not needed

Signed-off-by: Rosen Penev <rosenp@gmail.com>
22 months agoMerge pull request #13142 from rgacogne/fix-channel-warning
Remi Gacogne [Mon, 4 Sep 2023 12:26:08 +0000 (14:26 +0200)] 
Merge pull request #13142 from rgacogne/fix-channel-warning

channel: Fix redundant redeclaration warning

22 months agoMerge pull request #13196 from rgacogne/ddist-dynblock-tests-waittime
Remi Gacogne [Mon, 4 Sep 2023 12:25:10 +0000 (14:25 +0200)] 
Merge pull request #13196 from rgacogne/ddist-dynblock-tests-waittime

dnsdist: Reduce the UDP wait time for blocked queries in the tests

23 months agoarc4random: Fix 'redundant redeclaration’ warnings 13197/head
Remi Gacogne [Thu, 31 Aug 2023 09:40:46 +0000 (11:40 +0200)] 
arc4random: Fix 'redundant redeclaration’ warnings

If `arc4random.hh` is included before `config.h`, the `HAVE_*` defines
are not yet available and thus we include the definition of the following
functions even though they might be available in the standard headers:
- `arc4random`
- `arc4random_buf`
- `arc4random_uniform`
- `explicit_bzero`

Yielding warnings:
```
In file included from dns_random.hh:27,
                 from tsigutils.cc:25:
../ext/arc4random/arc4random.hh:9:12: warning: redundant redeclaration of ‘uint32_t arc4random()’ in same scope [-Wredundant-decls]
    9 |   uint32_t arc4random(void);
      |            ^~~~~~~~~~
In file included from /usr/include/c++/13.2.1/cstdlib:79,
                 from /usr/include/c++/13.2.1/ext/string_conversions.h:43,
                 from /usr/include/c++/13.2.1/bits/basic_string.h:4097,
                 from /usr/include/c++/13.2.1/string:54,
                 from dnsname.hh:26,
                 from tsigutils.cc:23:
/usr/include/stdlib.h:657:19: note: previous declaration of ‘__uint32_t arc4random()’
  657 | extern __uint32_t arc4random (void)
      |                   ^~~~~~~~~~
../ext/arc4random/arc4random.hh:12:8: warning: redundant redeclaration of ‘void arc4random_buf(void*, size_t)’ in same scope [-Wredundant-decls]
   12 |   void arc4random_buf(void* buf, size_t nbytes);
      |        ^~~~~~~~~~~~~~
/usr/include/stdlib.h:661:13: note: previous declaration of ‘void arc4random_buf(void*, size_t)’
  661 | extern void arc4random_buf (void *__buf, size_t __size)
      |             ^~~~~~~~~~~~~~
../ext/arc4random/arc4random.hh:15:12: warning: redundant redeclaration of ‘uint32_t arc4random_uniform(uint32_t)’ in same scope [-Wredundant-decls]
   15 |   uint32_t arc4random_uniform(uint32_t upper_bound);
      |            ^~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:666:19: note: previous declaration of ‘__uint32_t arc4random_uniform(__uint32_t)’
  666 | extern __uint32_t arc4random_uniform (__uint32_t __upper_bound)
      |                   ^~~~~~~~~~~~~~~~~~
../ext/arc4random/arc4random.hh:18:8: warning: redundant redeclaration of ‘void explicit_bzero(void*, size_t)’ in same scope [-Wredundant-decls]
   18 |   void explicit_bzero(void*, size_t len);
```

23 months agodnsdist: Reduce the UDP wait time for blocked queries in the tests 13196/head
Remi Gacogne [Wed, 30 Aug 2023 13:55:01 +0000 (15:55 +0200)] 
dnsdist: Reduce the UDP wait time for blocked queries in the tests

We know that we are not going to get a response, and waiting for too
long increases the risk that the dynamic block is no longer present
and/or has expired (validity of 0s) in the subsequent API check.

23 months agoMerge pull request #13190 from omoerbeek/rec-unused-warnings
Otto Moerbeek [Tue, 29 Aug 2023 14:42:31 +0000 (16:42 +0200)] 
Merge pull request #13190 from omoerbeek/rec-unused-warnings

rec: fix a few unused argument warnings (depening on features enabled)

23 months agoMerge pull request #13181 from rgacogne/fix-provenance
Remi Gacogne [Tue, 29 Aug 2023 11:27:37 +0000 (13:27 +0200)] 
Merge pull request #13181 from rgacogne/fix-provenance

Fix provenance generation for our packages

23 months agorec: fix a few unused argument warnings (depening on features enabled) 13190/head
Otto Moerbeek [Tue, 29 Aug 2023 09:28:33 +0000 (11:28 +0200)] 
rec: fix a few unused argument warnings (depening on features enabled)

Additionally, handle a few clang-tidy warnings

23 months agobuilder-dispatch: Remove the newline at the end of the os list 13181/head
Remi Gacogne [Tue, 29 Aug 2023 09:48:57 +0000 (11:48 +0200)] 
builder-dispatch: Remove the newline at the end of the os list

23 months agoMerge pull request #13162 from fredmorcos/auth-print-loaded-modules
Fred Morcos [Tue, 29 Aug 2023 09:09:39 +0000 (11:09 +0200)] 
Merge pull request #13162 from fredmorcos/auth-print-loaded-modules

Auth: Print the list of loaded modules next to the config.h preset

23 months agoMerge pull request #13164 from fredmorcos/bindlexer-use-c++-header
Peter van Dijk [Tue, 29 Aug 2023 08:24:36 +0000 (10:24 +0200)] 
Merge pull request #13164 from fredmorcos/bindlexer-use-c++-header

Bindlexer use C++ bison header

23 months agoUse the C++ header file generated by bison instead of opting for a C header file 13164/head
Fred Morcos [Tue, 22 Aug 2023 14:50:00 +0000 (16:50 +0200)] 
Use the C++ header file generated by bison instead of opting for a C header file

23 months agoMerge pull request #13183 from omoerbeek/rec-pb-test-fix-empty-call
Otto Moerbeek [Mon, 28 Aug 2023 15:11:17 +0000 (17:11 +0200)] 
Merge pull request #13183 from omoerbeek/rec-pb-test-fix-empty-call

rec: fix call of empty() in Protobuf regression test, nice speedup

23 months agorec: fix call of empty() in Protobuf regression test, nice speedup 13183/head
Otto Moerbeek [Mon, 28 Aug 2023 14:19:05 +0000 (16:19 +0200)] 
rec: fix call of empty() in Protobuf regression test, nice speedup

23 months agobuild-packages: Fix 'check if hashes were created for all requested targets'
Remi Gacogne [Mon, 28 Aug 2023 13:54:18 +0000 (15:54 +0200)] 
build-packages: Fix 'check if hashes were created for all requested targets'

If the 'inputs.os' list ends with a newline the check fails.

23 months agoFix the generation of packages JSON list for provenance
Remi Gacogne [Mon, 28 Aug 2023 13:52:38 +0000 (15:52 +0200)] 
Fix the generation of packages JSON list for provenance

23 months agogeoipbackend: Document loading zones from directory. 11597/head
Aki Tuomi [Sun, 1 May 2022 18:50:05 +0000 (21:50 +0300)] 
geoipbackend: Document loading zones from directory.

23 months agogeoipbackend: Move geo2.example.com to separate file
Aki Tuomi [Sun, 1 May 2022 18:48:29 +0000 (21:48 +0300)] 
geoipbackend: Move geo2.example.com to separate file

Tests the new feature of loading zones from dir.

23 months agogeoipbackend: Add zones_dir key for geoipbackend file
Aki Tuomi [Sun, 1 May 2022 18:36:25 +0000 (21:36 +0300)] 
geoipbackend: Add zones_dir key for geoipbackend file

Allows loading zones from a directory.

Based on code by mason-chase <sid@moontius.com>

23 months agogeoipbackend: Emit error and discard errorneus zones instead of failing completely
Aki Tuomi [Sun, 1 May 2022 18:17:59 +0000 (21:17 +0300)] 
geoipbackend: Emit error and discard errorneus zones instead of failing completely

23 months agogeoipbackend: Move domain loading to separate function
Aki Tuomi [Sun, 1 May 2022 17:50:59 +0000 (20:50 +0300)] 
geoipbackend: Move domain loading to separate function

Simplifies next change

23 months agogeoipbackend: Move global custom mapping and format to object
Aki Tuomi [Sun, 1 May 2022 18:03:42 +0000 (21:03 +0300)] 
geoipbackend: Move global custom mapping and format to object

Simplifies following change

23 months agoMerge pull request #13154 from rgacogne/ddist-parallel-tests
Remi Gacogne [Mon, 28 Aug 2023 11:34:27 +0000 (13:34 +0200)] 
Merge pull request #13154 from rgacogne/ddist-parallel-tests

dnsdist: Switch to pytest for our regression tests, run them in parallel

23 months agodnsdist: Add missing 'sys' import in the Async regression test 13154/head
Remi Gacogne [Mon, 28 Aug 2023 10:33:21 +0000 (12:33 +0200)] 
dnsdist: Add missing 'sys' import in the Async regression test

As noticed by Charles-Henri (thanks!).

23 months agoMerge pull request #13143 from rgacogne/ddist-cache-metrics-tsan-warning
Remi Gacogne [Mon, 28 Aug 2023 09:22:44 +0000 (11:22 +0200)] 
Merge pull request #13143 from rgacogne/ddist-cache-metrics-tsan-warning

dnsdist: Try to fix a data race warning reported by TSAN

23 months agoMerge pull request #13167 from rgacogne/tcpiohandler-fix-conn-index-race
Remi Gacogne [Mon, 28 Aug 2023 08:55:20 +0000 (10:55 +0200)] 
Merge pull request #13167 from rgacogne/tcpiohandler-fix-conn-index-race

TCPIOHandler: Fix a race when creating the first TLS connections

23 months agoMerge pull request #13175 from omoerbeek/ssh_compat_getentropy
Otto Moerbeek [Mon, 28 Aug 2023 08:16:43 +0000 (10:16 +0200)] 
Merge pull request #13175 from omoerbeek/ssh_compat_getentropy

Declare ssh_compat_getentropy in the right spot.

23 months agoMerge pull request #13174 from omoerbeek/rec-include-cstdint
Otto Moerbeek [Mon, 28 Aug 2023 08:13:59 +0000 (10:13 +0200)] 
Merge pull request #13174 from omoerbeek/rec-include-cstdint

rec: Include cstdint in mtasker_ucontext.cc, noted by @zeha

23 months agoDeclare ssh_compat_getentropy in the right spot. 13175/head
Otto Moerbeek [Fri, 25 Aug 2023 13:00:37 +0000 (15:00 +0200)] 
Declare ssh_compat_getentropy in the right spot.

Avoiding a redundant and/or missing declaration (depending HAVE_* defines)

23 months agoInclude cstdint in mtasker_ucontext.cc, noted by @zeha 13174/head
Otto Moerbeek [Fri, 25 Aug 2023 12:08:36 +0000 (14:08 +0200)] 
Include cstdint in mtasker_ucontext.cc, noted by @zeha

23 months agoMerge pull request #13165 from omoerbeek/rec-prep-20230825
Otto Moerbeek [Fri, 25 Aug 2023 08:34:06 +0000 (10:34 +0200)] 
Merge pull request #13165 from omoerbeek/rec-prep-20230825

rec: Prep for upcoming rec 4.7.6, 4.8.5 and 4.9.1 releases

23 months agoMerge pull request #13097 from romeroalx/build-pkgs-add-pkghashes-check
Remi Gacogne [Thu, 24 Aug 2023 10:29:12 +0000 (12:29 +0200)] 
Merge pull request #13097 from romeroalx/build-pkgs-add-pkghashes-check

GH actions. build-packages.yml: check if hash entries were created for all targets

23 months agoMerge pull request #13168 from rgacogne/default-net-snmp-to-no
Remi Gacogne [Wed, 23 Aug 2023 15:55:33 +0000 (17:55 +0200)] 
Merge pull request #13168 from rgacogne/default-net-snmp-to-no

Change the default for building with net-snmp from `auto` to `no`

23 months agoChange the default for building with net-snmp from `auto` to `no` 13168/head
Remi Gacogne [Wed, 23 Aug 2023 15:00:17 +0000 (17:00 +0200)] 
Change the default for building with net-snmp from `auto` to `no`

We have had a fair amount of issues with `net-snmp` adding unexpected
and unwanted values to both `CXXFLAGS` and `LDFLAGS`, and it was just
reported to also define `HAVE_LIBSSL` is in public header, which messes
up our own feature detection. Therefore it is likely better for everyone
to prevent net-snmp from being enabled without the user intending it.
For our own packages we explicitly enable net-snmp when supported,
and this commit also enables it in our CI for dnsdist (it was already
done for the recursor) so it should not have any impact.

23 months agoTCPIOHandler: Fix a race when creating the first TLS connections 13167/head
Remi Gacogne [Wed, 23 Aug 2023 14:46:55 +0000 (16:46 +0200)] 
TCPIOHandler: Fix a race when creating the first TLS connections

We used to get a index from OpenSSL when the first incoming or
outgoing TLS connection was created. That index is later used
to store application-related data along the TLS connection, to
be able to access it in callbacks called from inside the OpenSSL
library.
Unfortunately the atomic flag construction used was racy: if a second
connection is created while the first one is still getting the index,
it could be reading the initial value (-1) instead of the actual index,
which might prevent the callback from working properly because they
cannot retrieve the necessary data. The good news is that this should
not have a serious impact: a TLS session might not be properly resumed
while it should have been, leading to a full TLS session negotiation.
This commit fixes the race by using a full mutex and only releasing
it once the value has been computed. In order to avoid a performance
penalty, the index is now computed when a TLS connection _context_
is created, instead of a TLS connection. TLS contexts should be
reused for a large number of connections, and mostly created during
startup or in the first few seconds of the application.

The race was reported by Thread Sanitizer during the
`test_TLS.py::TestTLSFrontendLimits::testTCPConnsPerTLSFrontend`
regression test as:
```
WARNING: ThreadSanitizer: data race (pid=120466)
  Read of size 4 at 0x55a12bf3d758 by thread T4:
    #0 OpenSSLTLSConnection::OpenSSLTLSConnection(int, timeval const&, std::shared_ptr<OpenSSLFrontendContext>) /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:106 (dnsdist+0x97ece8) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #1 std::__detail::_MakeUniq<OpenSSLTLSConnection>::__single_object std::make_unique<OpenSSLTLSConnection, int&, timeval const&, std::shared_ptr<OpenSSLFrontendContext>&>(int&, timeval const&, std::shared_ptr<OpenSSLFrontendContext>&) /usr/include/c++/13.2.1/bits/unique_ptr.h:1070 (dnsdist+0x97eff6) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #2 OpenSSLTLSIOCtx::getConnection(int, timeval const&, long) /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:797 (dnsdist+0x97eff6)
    #3 TCPIOHandler::TCPIOHandler(int, timeval const&, std::shared_ptr<TLSCtx>, long) /work/pdns/pdns/dnsdistdist/tcpiohandler.hh:246 (dnsdist+0x88c24f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #4 IncomingTCPConnectionState::IncomingTCPConnectionState(ConnectionInfo&&, TCPClientThreadData&, timeval const&) /work/pdns/pdns/dnsdistdist/dnsdist-tcp-upstream.hh:29 (dnsdist+0x88c24f)
    #5 void std::_Construct<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(IncomingTCPConnectionState*, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/stl_construct.h:119 (dnsdist+0x878b1e) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #6 void std::allocator_traits<std::allocator<void> >::construct<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(std::allocator<void>&, IncomingTCPConnectionState*, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/alloc_traits.h:660 (dnsdist+0x878b1e)
    #7 std::_Sp_counted_ptr_inplace<IncomingTCPConnectionState, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<ConnectionInfo, TCPClientThreadData&, timeval&>(std::allocator<void>, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:604 (dnsdist+0x878b1e)
    #8 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<IncomingTCPConnectionState, std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(IncomingTCPConnectionState*&, std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:971 (dnsdist+0x878b1e)
    #9 std::__shared_ptr<IncomingTCPConnectionState, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:1712 (dnsdist+0x878b1e)
    #10 std::shared_ptr<IncomingTCPConnectionState>::shared_ptr<std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr.h:464 (dnsdist+0x878b1e)
    #11 std::shared_ptr<std::enable_if<!std::is_array<IncomingTCPConnectionState>::value, IncomingTCPConnectionState>::type> std::make_shared<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr.h:1010 (dnsdist+0x878b1e)
    #12 handleIncomingTCPQuery /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:1118 (dnsdist+0x878b1e)
    #13 void std::__invoke_impl<void, void (*&)(int, boost::any&), int, boost::any&>(std::__invoke_other, void (*&)(int, boost::any&), int&&, boost::any&) /usr/include/c++/13.2.1/bits/invoke.h:61 (dnsdist+0x32d951) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #14 std::enable_if<is_invocable_r_v<void, void (*&)(int, boost::any&), int, boost::any&>, void>::type std::__invoke_r<void, void (*&)(int, boost::any&), int, boost::any&>(void (*&)(int, boost::any&), int&&, boost::any&) /usr/include/c++/13.2.1/bits/invoke.h:111 (dnsdist+0x32d951)
    #15 std::_Function_handler<void (int, boost::any&), void (*)(int, boost::any&)>::_M_invoke(std::_Any_data const&, int&&, boost::any&) /usr/include/c++/13.2.1/bits/std_function.h:290 (dnsdist+0x32d951)
    #16 std::function<void (int, boost::any&)>::operator()(int, boost::any&) const /usr/include/c++/13.2.1/bits/std_function.h:591 (dnsdist+0x98fc0f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #17 EpollFDMultiplexer::run(timeval*, int) /work/pdns/pdns/dnsdistdist/epollmplexer.cc:190 (dnsdist+0x98fc0f)
    #18 tcpClientThread /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:1251 (dnsdist+0x86cb7f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #19 void std::__invoke_impl<void, void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >(std::__invoke_other, void (*&&)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/13.2.1/bits/invoke.h:61 (dnsdist+0x87aab1) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #20 std::__invoke_result<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >::type std::__invoke<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >(void (*&&)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/13.2.1/bits/invoke.h:96 (dnsdist+0x87aab1)
    #21 void std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul>) /usr/include/c++/13.2.1/bits/std_thread.h:292 (dnsdist+0x87aab1)
    #22 std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > >::operator()() /usr/include/c++/13.2.1/bits/std_thread.h:299 (dnsdist+0x87aab1)
    #23 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > > >::_M_run() /usr/include/c++/13.2.1/bits/std_thread.h:244 (dnsdist+0x87aab1)
    #24 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104 (libstdc++.so.6+0xe1942) (BuildId: 207eb738c5976dd9aac1ae0640fc4de5946b547e)

  Previous write of size 4 at 0x55a12bf3d758 by thread T3:
    #0 OpenSSLTLSConnection::OpenSSLTLSConnection(int, timeval const&, std::shared_ptr<OpenSSLFrontendContext>) /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:88 (dnsdist+0x97ed98) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #1 std::__detail::_MakeUniq<OpenSSLTLSConnection>::__single_object std::make_unique<OpenSSLTLSConnection, int&, timeval const&, std::shared_ptr<OpenSSLFrontendContext>&>(int&, timeval const&, std::shared_ptr<OpenSSLFrontendContext>&) /usr/include/c++/13.2.1/bits/unique_ptr.h:1070 (dnsdist+0x97eff6) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #2 OpenSSLTLSIOCtx::getConnection(int, timeval const&, long) /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:797 (dnsdist+0x97eff6)
    #3 TCPIOHandler::TCPIOHandler(int, timeval const&, std::shared_ptr<TLSCtx>, long) /work/pdns/pdns/dnsdistdist/tcpiohandler.hh:246 (dnsdist+0x88c24f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #4 IncomingTCPConnectionState::IncomingTCPConnectionState(ConnectionInfo&&, TCPClientThreadData&, timeval const&) /work/pdns/pdns/dnsdistdist/dnsdist-tcp-upstream.hh:29 (dnsdist+0x88c24f)
    #5 void std::_Construct<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(IncomingTCPConnectionState*, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/stl_construct.h:119 (dnsdist+0x878b1e) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #6 void std::allocator_traits<std::allocator<void> >::construct<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(std::allocator<void>&, IncomingTCPConnectionState*, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/alloc_traits.h:660 (dnsdist+0x878b1e)
    #7 std::_Sp_counted_ptr_inplace<IncomingTCPConnectionState, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<ConnectionInfo, TCPClientThreadData&, timeval&>(std::allocator<void>, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:604 (dnsdist+0x878b1e)
    #8 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<IncomingTCPConnectionState, std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(IncomingTCPConnectionState*&, std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:971 (dnsdist+0x878b1e)
    #9 std::__shared_ptr<IncomingTCPConnectionState, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:1712 (dnsdist+0x878b1e)
    #10 std::shared_ptr<IncomingTCPConnectionState>::shared_ptr<std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr.h:464 (dnsdist+0x878b1e)
    #11 std::shared_ptr<std::enable_if<!std::is_array<IncomingTCPConnectionState>::value, IncomingTCPConnectionState>::type> std::make_shared<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr.h:1010 (dnsdist+0x878b1e)
    #12 handleIncomingTCPQuery /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:1118 (dnsdist+0x878b1e)
    #13 void std::__invoke_impl<void, void (*&)(int, boost::any&), int, boost::any&>(std::__invoke_other, void (*&)(int, boost::any&), int&&, boost::any&) /usr/include/c++/13.2.1/bits/invoke.h:61 (dnsdist+0x32d951) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #14 std::enable_if<is_invocable_r_v<void, void (*&)(int, boost::any&), int, boost::any&>, void>::type std::__invoke_r<void, void (*&)(int, boost::any&), int, boost::any&>(void (*&)(int, boost::any&), int&&, boost::any&) /usr/include/c++/13.2.1/bits/invoke.h:111 (dnsdist+0x32d951)
    #15 std::_Function_handler<void (int, boost::any&), void (*)(int, boost::any&)>::_M_invoke(std::_Any_data const&, int&&, boost::any&) /usr/include/c++/13.2.1/bits/std_function.h:290 (dnsdist+0x32d951)
    #16 std::function<void (int, boost::any&)>::operator()(int, boost::any&) const /usr/include/c++/13.2.1/bits/std_function.h:591 (dnsdist+0x98fc0f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #17 EpollFDMultiplexer::run(timeval*, int) /work/pdns/pdns/dnsdistdist/epollmplexer.cc:190 (dnsdist+0x98fc0f)
    #18 tcpClientThread /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:1251 (dnsdist+0x86cb7f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #19 void std::__invoke_impl<void, void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >(std::__invoke_other, void (*&&)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/13.2.1/bits/invoke.h:61 (dnsdist+0x87aab1) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #20 std::__invoke_result<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >::type std::__invoke<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >(void (*&&)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/13.2.1/bits/invoke.h:96 (dnsdist+0x87aab1)
    #21 void std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul>) /usr/include/c++/13.2.1/bits/std_thread.h:292 (dnsdist+0x87aab1)
    #22 std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > >::operator()() /usr/include/c++/13.2.1/bits/std_thread.h:299 (dnsdist+0x87aab1)
    #23 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > > >::_M_run() /usr/include/c++/13.2.1/bits/std_thread.h:244 (dnsdist+0x87aab1)
    #24 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104 (libstdc++.so.6+0xe1942) (BuildId: 207eb738c5976dd9aac1ae0640fc4de5946b547e)

  Location is global 'OpenSSLTLSConnection::s_tlsConnIndex' of size 4 at 0x55a12bf3d758 (dnsdist+0xc49758)

  Thread T4 'dnsdist/tcpClie' (tid=120471, running) created by main thread at:
    #0 pthread_create /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:1036 (libtsan.so.2+0x44219) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
    #1 __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xe1a29) (BuildId: 207eb738c5976dd9aac1ae0640fc4de5946b547e)
    #2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:172 (libstdc++.so.6+0xe1a29)
    #3 TCPClientCollection::addTCPClientThread(std::vector<ClientState*, std::allocator<ClientState*> >&) /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:149 (dnsdist+0x8685a1) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #4 TCPClientCollection::TCPClientCollection(unsigned long, std::vector<ClientState*, std::allocator<ClientState*> >) /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:126 (dnsdist+0x868912) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #5 std::__detail::_MakeUniq<TCPClientCollection>::__single_object std::make_unique<TCPClientCollection, unsigned long&, std::vector<ClientState*, std::allocator<ClientState*> > >(unsigned long&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/13.2.1/bits/unique_ptr.h:1070 (dnsdist+0x20adef) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #6 main /work/pdns/pdns/dnsdistdist/dnsdist.cc:2865 (dnsdist+0x20adef)

  Thread T3 'dnsdist/tcpClie' (tid=120470, running) created by main thread at:
    #0 pthread_create /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:1036 (libtsan.so.2+0x44219) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
    #1 __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xe1a29) (BuildId: 207eb738c5976dd9aac1ae0640fc4de5946b547e)
    #2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:172 (libstdc++.so.6+0xe1a29)
    #3 TCPClientCollection::addTCPClientThread(std::vector<ClientState*, std::allocator<ClientState*> >&) /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:149 (dnsdist+0x8685a1) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #4 TCPClientCollection::TCPClientCollection(unsigned long, std::vector<ClientState*, std::allocator<ClientState*> >) /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:126 (dnsdist+0x868912) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #5 std::__detail::_MakeUniq<TCPClientCollection>::__single_object std::make_unique<TCPClientCollection, unsigned long&, std::vector<ClientState*, std::allocator<ClientState*> > >(unsigned long&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/13.2.1/bits/unique_ptr.h:1070 (dnsdist+0x20adef) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #6 main /work/pdns/pdns/dnsdistdist/dnsdist.cc:2865 (dnsdist+0x20adef)

SUMMARY: ThreadSanitizer: data race /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:106 in OpenSSLTLSConnection::OpenSSLTLSConnection(int, timeval const&, std::shared_ptr<OpenSSLFrontendContext>)
```

23 months agoMerge pull request #13166 from omoerbeek/rec-buildbot-nosnmp
Otto Moerbeek [Wed, 23 Aug 2023 13:03:43 +0000 (15:03 +0200)] 
Merge pull request #13166 from omoerbeek/rec-buildbot-nosnmp

rec/buildbot: Avoid running SNMP tests on the current buildbot setup

23 months agodnsdist: Split the DynBlocks regression tests
Remi Gacogne [Wed, 23 Aug 2023 12:40:30 +0000 (14:40 +0200)] 
dnsdist: Split the DynBlocks regression tests

On my 8 physical CPU cores machine this brings the total time for
all regression tests to 107.60s (01:47).

23 months agoAvoid running SNMP tests on the current buildbot setup 13166/head
Otto Moerbeek [Wed, 23 Aug 2023 11:23:56 +0000 (13:23 +0200)] 
Avoid running SNMP tests on the current buildbot setup

Since the change from nose to pytest, the SNMP exclusion via the environment
var NOSE_EXLUDE does no longer work.

23 months agoPrep for upcoming rec 4.7.6, 4.8.5 and 4.9.1 releases 13165/head
Otto Moerbeek [Wed, 23 Aug 2023 09:16:50 +0000 (11:16 +0200)] 
Prep for upcoming rec 4.7.6, 4.8.5 and 4.9.1 releases

23 months agoMerge pull request #13095 from rgacogne/coding-guidelines
Remi Gacogne [Wed, 23 Aug 2023 07:40:09 +0000 (09:40 +0200)] 
Merge pull request #13095 from rgacogne/coding-guidelines

Add a coding guidelines document to the public repository

23 months agoBindlexer whitespace cleanup
Fred Morcos [Tue, 22 Aug 2023 14:49:49 +0000 (16:49 +0200)] 
Bindlexer whitespace cleanup

23 months agoMerge pull request #13071 from omoerbeek/json-encoding
Otto Moerbeek [Tue, 22 Aug 2023 13:55:15 +0000 (15:55 +0200)] 
Merge pull request #13071 from omoerbeek/json-encoding

Fix code producing json

23 months agoAuth: Print the list of loaded modules next to the config.h preset 13162/head
Fred Morcos [Tue, 22 Aug 2023 09:30:29 +0000 (11:30 +0200)] 
Auth: Print the list of loaded modules next to the config.h preset

23 months agoCoding Guidelines: Apply suggestions from reviews 13095/head
Remi Gacogne [Mon, 21 Aug 2023 15:35:30 +0000 (17:35 +0200)] 
Coding Guidelines: Apply suggestions from reviews

23 months agoMerge pull request #13155 from rgacogne/channel-make-blocking-params-explicit
Remi Gacogne [Mon, 21 Aug 2023 09:26:16 +0000 (11:26 +0200)] 
Merge pull request #13155 from rgacogne/channel-make-blocking-params-explicit

channel: Make the blocking parameters of the object queue explicit

23 months agoMerge pull request #13102 from omoerbeek/rec-nodata-condition
Otto Moerbeek [Mon, 21 Aug 2023 08:25:17 +0000 (10:25 +0200)] 
Merge pull request #13102 from omoerbeek/rec-nodata-condition

rec: Do not assume the records are in a particular order when determining if an answer is NODATA

23 months agoMerge pull request #13106 from omoerbeek/rec-aggr-cache-replace
Otto Moerbeek [Mon, 21 Aug 2023 08:24:55 +0000 (10:24 +0200)] 
Merge pull request #13106 from omoerbeek/rec-aggr-cache-replace

rec: replace data in the aggressive cache if new data becomes available

23 months agoMerge pull request #13144 from fredmorcos/iputils-cleanup
Fred Morcos [Fri, 18 Aug 2023 19:57:53 +0000 (21:57 +0200)] 
Merge pull request #13144 from fredmorcos/iputils-cleanup

Consistency: Use #ifdef instead of #if in `iputils.cc`

23 months agoMerge pull request #13152 from fredmorcos/cleanup-yaml-to-json
Fred Morcos [Fri, 18 Aug 2023 19:44:16 +0000 (21:44 +0200)] 
Merge pull request #13152 from fredmorcos/cleanup-yaml-to-json

Cleanup `convert-yaml-to-json.py`

23 months agoConsistency: Use #ifdef instead of #if in iputils.cc 13144/head
Fred Morcos [Wed, 16 Aug 2023 12:14:21 +0000 (14:14 +0200)] 
Consistency: Use #ifdef instead of #if in iputils.cc