]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
2 months agoMerge pull request #15556 from rgacogne/dnsdist-1.8.x-ubuntu-22 rel/dnsdist-1.8.x
Remi Gacogne [Wed, 14 May 2025 07:33:18 +0000 (09:33 +0200)] 
Merge pull request #15556 from rgacogne/dnsdist-1.8.x-ubuntu-22

dnsdist-1.8.x: move to ubuntu 22 for package building and ci (2)

2 months agodnsdist: Fix unused configuration parameters in health-checks tests 15556/head
Remi Gacogne [Mon, 12 May 2025 13:14:58 +0000 (15:14 +0200)] 
dnsdist: Fix unused configuration parameters in health-checks tests

2 months agotask: The LLVM symbolizer is in llvm-12 on Ubuntu 22
Remi Gacogne [Wed, 7 May 2025 14:06:23 +0000 (16:06 +0200)] 
task: The LLVM symbolizer is in llvm-12 on Ubuntu 22

2 months agodnsdist: Fix regression tests with Python 3.13
Remi Gacogne [Mon, 30 Dec 2024 14:55:33 +0000 (15:55 +0100)] 
dnsdist: Fix regression tests with Python 3.13

The CA certificates that we are generating as par of our regression tests
were lacking the X.509 `Key Usage` extension, causing TLS validation with
Python 3.13 to fail with:

> certificate verify failed: CA cert does not include key usage extension

It appears that Python 3.13 enables `VERIFY_X509_STRICT` by default, which makes OpenSSL stricter, and thus it chokes on our invalid CA.

(cherry picked from commit 98ef889a9232877ac369b67c11922bab92ab84a9)
(cherry picked from commit 5787ffad38d920d972c683e5ef500a595aca4fec)

2 months agobuild-and-test-all.yml: set fail-fast: false
romeroalx [Wed, 7 May 2025 10:33:08 +0000 (12:33 +0200)] 
build-and-test-all.yml: set fail-fast: false

2 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).

2 months agodnsdist: Add missing 'sys' import in the Async regression test
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!).

3 months agodnsdist: Use the same UDP timeouts than usual in the 'advanced' tests
Remi Gacogne [Fri, 18 Aug 2023 10:55:10 +0000 (12:55 +0200)] 
dnsdist: Use the same UDP timeouts than usual in the 'advanced' tests

It makes sense to use a short timeout when we know this is going to
fail, but here we actually expect a response, and it seems that the
current timeout is sometimes too short when running with TSAN,
especially when we have a lot of tests running in parallel.

3 months agodnsdist: Set verbose for TestAdvancedGetLocalAddressOnAnyBind
Remi Gacogne [Fri, 18 Aug 2023 06:37:29 +0000 (08:37 +0200)] 
dnsdist: Set verbose for TestAdvancedGetLocalAddressOnAnyBind

3 months agodnsdist: Better handling of network events in the regression test responders
Remi Gacogne [Fri, 18 Aug 2023 06:36:54 +0000 (08:36 +0200)] 
dnsdist: Better handling of network events in the regression test responders

3 months agodnsdist: Fix a deprecation warning in the XPF regression tests
Remi Gacogne [Fri, 18 Aug 2023 06:36:19 +0000 (08:36 +0200)] 
dnsdist: Fix a deprecation warning in the XPF regression tests

3 months agodnsdist: Update the regression tests for parallel testing
Remi Gacogne [Fri, 7 Jul 2023 16:17:13 +0000 (18:17 +0200)] 
dnsdist: Update the regression tests for parallel testing

3 months agodnsdist-1.9.x: Remove the source code format check workflow
Remi Gacogne [Tue, 29 Apr 2025 07:29:36 +0000 (09:29 +0200)] 
dnsdist-1.9.x: Remove the source code format check workflow

3 months agotasks.py: allow more recent version of packages available for ubuntu22
romeroalx [Tue, 6 May 2025 10:59:38 +0000 (12:59 +0200)] 
tasks.py: allow more recent version of packages available for ubuntu22

3 months agoremoved unused pip pkgs from gh-actions-setup. removed azure apt reference
Alexis Romero [Wed, 15 Nov 2023 10:04:28 +0000 (11:04 +0100)] 
removed unused pip pkgs from gh-actions-setup. removed azure apt reference

3 months agodnsdist-1.8.x: move to ubuntu 20 for package building and ci
romeroalx [Wed, 7 May 2025 00:29:52 +0000 (02:29 +0200)] 
dnsdist-1.8.x: move to ubuntu 20 for package building and ci

8 months agoMerge pull request #14906 from romeroalx/backport-13679-to-dnsdist-1.8.x
Remi Gacogne [Mon, 2 Dec 2024 08:54:33 +0000 (09:54 +0100)] 
Merge pull request #14906 from romeroalx/backport-13679-to-dnsdist-1.8.x

dnsdist 1.8.x: Backport 13679 - Update upload-artifact and download-artifact to version 4

8 months agobuild(deps): bump actions/cache from 3 to 4 14906/head
dependabot[bot] [Thu, 18 Jan 2024 15:21:24 +0000 (15:21 +0000)] 
build(deps): bump actions/cache from 3 to 4

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
8 months agobuild(deps): bump actions/checkout from 3 to 4
dependabot[bot] [Mon, 27 Nov 2023 15:34:52 +0000 (15:34 +0000)] 
build(deps): bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
8 months agoci: Update upload-artifact and download-artifact to version 4
Remi Gacogne [Mon, 8 Jan 2024 16:14:20 +0000 (17:14 +0100)] 
ci: Update upload-artifact and download-artifact to version 4

8 months agoMerge pull request #14882 from romeroalx/backport-14862-to-dnsdist-1.8.x
Remi Gacogne [Tue, 26 Nov 2024 08:26:03 +0000 (09:26 +0100)] 
Merge pull request #14882 from romeroalx/backport-14862-to-dnsdist-1.8.x

dnsdist-1.8.x: Backport 14862 - builder: remove ubuntu lunar+mantic as they are EOL

8 months agobuilder: remove ubuntu lunar+mantic as they are EOL 14882/head
Peter van Dijk [Fri, 22 Nov 2024 09:08:40 +0000 (10:08 +0100)] 
builder: remove ubuntu lunar+mantic as they are EOL

10 months agoMerge pull request #14679 from rgacogne/ddist18-backport-14671 dnsdist-1.8.4
Remi Gacogne [Tue, 17 Sep 2024 14:52:30 +0000 (16:52 +0200)] 
Merge pull request #14679 from rgacogne/ddist18-backport-14671

dnsdist-1.8.x: Backport 14671 - Always store the `OpenSSLTLSIOCtx` in the connection

10 months agoMerge pull request #14680 from rgacogne/ddist18-backport-14562
Remi Gacogne [Tue, 17 Sep 2024 14:52:20 +0000 (16:52 +0200)] 
Merge pull request #14680 from rgacogne/ddist18-backport-14562

dnsdist-1.8.x: Backport 14562 - Fix build with boost 1.86.0

10 months agodnsdist: Fix clang-tidy warnings 14679/head
Remi Gacogne [Fri, 13 Sep 2024 14:38:16 +0000 (16:38 +0200)] 
dnsdist: Fix clang-tidy warnings

(cherry picked from commit afcd4ccefb73efbf025b2f910a6506e18b4cf116)

10 months agodnsdist: Always store the OpenSSLTLSIOCtx in the connection
Remi Gacogne [Fri, 13 Sep 2024 13:57:38 +0000 (15:57 +0200)] 
dnsdist: Always store the OpenSSLTLSIOCtx in the connection

(cherry picked from commit 6aac1f054fe6253fe3b051d5c7e3f78a71547e4e)

10 months agoFix build with boost 1.86.0 14680/head
Michael Cho [Fri, 16 Aug 2024 02:49:17 +0000 (22:49 -0400)] 
Fix build with boost 1.86.0

Boost 1.86.0 changes seem to no longer indirectly include header which
causes build to fail with:
```
uuid-utils.cc:38:58:
error: 'random' is not a class, namespace, or enumeration
```

boost/random/mersenne_twister.hpp has been available since Boost 1.21.2

(cherry picked from commit eed56000b1d68ac083b8e8bea4ff0ea30a1579c4)

12 months agoMerge pull request #14491 from omoerbeek/backport-14486-to-dnsdist-1.8.x
Remi Gacogne [Thu, 18 Jul 2024 08:05:05 +0000 (10:05 +0200)] 
Merge pull request #14491 from omoerbeek/backport-14486-to-dnsdist-1.8.x

dnsdist: Backport 14486 to dnsdist 1.8.x: pin pysnmp to version 5 for regression tests

12 months agoAlso pin pysnmp version for dnsdist regression tests 14491/head
Otto Moerbeek [Wed, 17 Jul 2024 12:44:11 +0000 (14:44 +0200)] 
Also pin pysnmp version for dnsdist regression tests

(cherry picked from commit 5d3db32982e7a06a9e653529baa2fb67e24d7189)

12 months agorec: pin pysnmp to version 5 for regression tests
Otto Moerbeek [Wed, 17 Jul 2024 12:03:32 +0000 (14:03 +0200)] 
rec: pin pysnmp to version 5 for regression tests

(cherry picked from commit 4d44d3076051fe27ee91e847a3600ad19c44fd72)

12 months agoMerge pull request #14469 from omoerbeek/backport-14422-to-dnsdist-1.8.x
Remi Gacogne [Fri, 12 Jul 2024 15:10:17 +0000 (17:10 +0200)] 
Merge pull request #14469 from omoerbeek/backport-14422-to-dnsdist-1.8.x

dnsdist 1.8.x: switch el7 builds to Oracle Linux 7

12 months agoswitch el7 builds to Oracle Linux 7 14469/head
Peter van Dijk [Tue, 2 Jul 2024 09:19:31 +0000 (11:19 +0200)] 
switch el7 builds to Oracle Linux 7

(cherry picked from commit 73a1b98f92c671c590540ac19d74d70499f89066)
(cherry picked from commit 87e2e08b41de7453f144721ed232219052205651)

12 months agoMerge pull request #14465 from omoerbeek/backport-14445-to-dnsdist-1.8.x
Otto Moerbeek [Fri, 12 Jul 2024 12:58:21 +0000 (14:58 +0200)] 
Merge pull request #14465 from omoerbeek/backport-14445-to-dnsdist-1.8.x

dnsdist: Backport 14445 to dnsdist 1.8.x: use el-7 for daily build

12 months agoMerge pull request #14467 from rgacogne/ddist18-backport-14359
Remi Gacogne [Fri, 12 Jul 2024 11:28:05 +0000 (13:28 +0200)] 
Merge pull request #14467 from rgacogne/ddist18-backport-14359

dnsdist-1.8.x: Backport 14359 - dns.cc: use pdns::views::UnsignedCharView

12 months agodns.cc: use pdns::views::UnsignedCharView 14467/head
Otto Moerbeek [Wed, 19 Jun 2024 11:10:15 +0000 (13:10 +0200)] 
dns.cc: use pdns::views::UnsignedCharView

Includes minor cleanup and additions to make UnsignedCharView usable for this use case.
Supersedes #14356
Fixes
/usr/include/c++/v1/__fwd/string_view.h:22:41: warning: 'char_traits<unsigned char>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 19, so please migrate off of it. [-Wdeprecated-declarations]

12 months agorec 4.9.x: daily build for el-7 instead of centos-7 14465/head
Otto Moerbeek [Tue, 9 Jul 2024 08:19:07 +0000 (10:19 +0200)] 
rec 4.9.x: daily build for el-7 instead of centos-7

(cherry picked from commit 8a0e619a2a7d027d24e26fb23ecade0573592382)

13 months agoMerge pull request #14321 from romeroalx/backport-14241-to-dnsdist-1.8.x
Alexis Romero [Thu, 13 Jun 2024 16:53:35 +0000 (18:53 +0200)] 
Merge pull request #14321 from romeroalx/backport-14241-to-dnsdist-1.8.x

dnsdist-1.8.x: Backport removal of centos-8 and centos-8-stream as build targets

13 months agoremove centos-8 and centos-8-stream as build targets 14321/head
romeroalx [Tue, 4 Jun 2024 09:16:18 +0000 (11:16 +0200)] 
remove centos-8 and centos-8-stream as build targets

14 months agoMerge pull request #14293 from romeroalx/backport-14171-to-dnsdist-1.8.x-2
Remi Gacogne [Thu, 6 Jun 2024 08:00:01 +0000 (10:00 +0200)] 
Merge pull request #14293 from romeroalx/backport-14171-to-dnsdist-1.8.x-2

dnsdist-1.8.x: backport of #14171 for fixing the build of images on new tags

14 months agogh actions: add WF for building and pushing images when a new tag is created 14293/head
romeroalx [Tue, 14 May 2024 15:45:08 +0000 (17:45 +0200)] 
gh actions: add WF for building and pushing images when a new tag is created

14 months agogh actions: add WF for building and pushing images manually
romeroalx [Tue, 14 May 2024 15:43:26 +0000 (17:43 +0200)] 
gh actions: add WF for building and pushing images manually

14 months agogh actions: modify docker.yml for building and pushing images daily (master)
romeroalx [Tue, 14 May 2024 15:40:11 +0000 (17:40 +0200)] 
gh actions: modify docker.yml for building and pushing images daily (master)

14 months agogh actions: add WF for building and pushing multi-platform images on workflow_call...
romeroalx [Tue, 14 May 2024 15:35:44 +0000 (17:35 +0200)] 
gh actions: add WF for building and pushing multi-platform images on workflow_call events

14 months agoMerge pull request #14214 from romeroalx/backport-14171-to-dnsdist-1.8.x
Remi Gacogne [Tue, 21 May 2024 12:12:43 +0000 (14:12 +0200)] 
Merge pull request #14214 from romeroalx/backport-14171-to-dnsdist-1.8.x

dnsdist-1.8.x: Partial backport of #14171 for fixing the build of arm64 images

14 months agoAdding liblua5.3-dev/libluajit-5.1-dev to dockerfiles 14214/head
romeroalx [Tue, 14 May 2024 15:26:05 +0000 (17:26 +0200)] 
Adding liblua5.3-dev/libluajit-5.1-dev to dockerfiles

14 months agoMerge pull request #14151 from romeroalx/backport-14044-to-dnsdist-1.8.x
Remi Gacogne [Mon, 13 May 2024 14:18:39 +0000 (16:18 +0200)] 
Merge pull request #14151 from romeroalx/backport-14044-to-dnsdist-1.8.x

dnsdist: Backport 14044 to dnsdist-1.8.x: gh actions - replace yq snap in collect job build-and-test-all

14 months agogh actions - build-and-test-all: use a ubuntu-22 runner for job collect 14151/head
romeroalx [Thu, 9 May 2024 14:36:59 +0000 (16:36 +0200)] 
gh actions - build-and-test-all: use a ubuntu-22 runner for job collect

15 months agogh actions - replace yq snap in collect job build-and-test-all
romeroalx [Fri, 5 Apr 2024 10:02:55 +0000 (12:02 +0200)] 
gh actions - replace yq snap in collect job build-and-test-all

18 months agoMerge pull request #13696 from omoerbeek/backport-13675-to-dnsdist-1.8.x
Remi Gacogne [Mon, 22 Jan 2024 09:00:06 +0000 (10:00 +0100)] 
Merge pull request #13696 from omoerbeek/backport-13675-to-dnsdist-1.8.x

Backport 13675 to dnsdist 1.8.x: Fix documentation building error for dnsdist and recursor

18 months agodnsdist: Fix the version of alabaster when building the doc 13696/head
Remi Gacogne [Mon, 8 Jan 2024 10:47:13 +0000 (11:47 +0100)] 
dnsdist: Fix the version of alabaster when building the doc

Fixes
```
The alabaster extension used by this project needs at least Sphinx v3.4; it therefore cannot be built with this version.
```

(cherry picked from commit c2a7ef8bd4f2423e2dc0eaa4d4a46de99b44636b)

18 months agorec: Fix the version of alabaster when building the doc
Remi Gacogne [Mon, 8 Jan 2024 10:32:31 +0000 (11:32 +0100)] 
rec: Fix the version of alabaster when building the doc

Fixes
```
The alabaster extension used by this project needs at least Sphinx v3.4; it therefore cannot be built with this version.
```

(cherry picked from commit ac89467f17bb888fbd48c0f4c5267beab95aebee)

19 months agoMerge pull request #13601 from rgacogne/ddist18-13342 dnsdist-1.8.3
Remi Gacogne [Thu, 14 Dec 2023 10:11:46 +0000 (11:11 +0100)] 
Merge pull request #13601 from rgacogne/ddist18-13342

dnsdist-1.8.x: Add a `DynBlockRulesGroup:removeRange()` binding

19 months agoMerge pull request #13602 from rgacogne/ddist18-13310
Remi Gacogne [Thu, 14 Dec 2023 09:55:36 +0000 (10:55 +0100)] 
Merge pull request #13602 from rgacogne/ddist18-13310

dnsdist-1.8.x: Fix several cosmetic issues in eBPF dynamic blocks, update documentation

19 months agoMerge pull request #13603 from rgacogne/ddist18-13403
Remi Gacogne [Thu, 14 Dec 2023 09:55:15 +0000 (10:55 +0100)] 
Merge pull request #13603 from rgacogne/ddist18-13403

dnsdist-1.8.x: Fix a race in the Async unit tests

19 months agoMerge pull request #13604 from rgacogne/ddist18-13182
Remi Gacogne [Thu, 14 Dec 2023 09:41:47 +0000 (10:41 +0100)] 
Merge pull request #13604 from rgacogne/ddist18-13182

dnsdist-1.8.x: Also test metrics with recvmmsg support enabled

19 months agoMerge pull request #13605 from rgacogne/ddist18-13135
Remi Gacogne [Thu, 14 Dec 2023 09:41:38 +0000 (10:41 +0100)] 
Merge pull request #13605 from rgacogne/ddist18-13135

dnsdist-1.8.x: Add a `DNSHeader:getTC()` Lua binding

19 months agoMerge pull request #13607 from rgacogne/ddist18-13071
Remi Gacogne [Thu, 14 Dec 2023 09:41:29 +0000 (10:41 +0100)] 
Merge pull request #13607 from rgacogne/ddist18-13071

dnsdist-1.8.x: Fix code producing json

19 months agoMerge pull request #13600 from rgacogne/ddist18-13314
Remi Gacogne [Thu, 14 Dec 2023 09:41:15 +0000 (10:41 +0100)] 
Merge pull request #13600 from rgacogne/ddist18-13314

dnsdist-1.8.x: Skip our BADVERS regression test on broken Python versions

19 months agoMerge pull request #13599 from rgacogne/ddist18-13488
Remi Gacogne [Thu, 14 Dec 2023 09:41:07 +0000 (10:41 +0100)] 
Merge pull request #13599 from rgacogne/ddist18-13488

dnsdist-1.8.x: Fix the removal of the last rule by name or UUID

19 months agoMerge pull request #13598 from rgacogne/ddist18-13536
Remi Gacogne [Thu, 14 Dec 2023 09:40:43 +0000 (10:40 +0100)] 
Merge pull request #13598 from rgacogne/ddist18-13536

dnsdist-1.8.x: Detect and dismiss truncated UDP responses from a backend

19 months agoImplement recomendationm from #13050: step 1 13607/head
Otto Moerbeek [Fri, 21 Jul 2023 11:43:57 +0000 (13:43 +0200)] 
Implement recomendationm from #13050: step 1

Revert #12660

(cherry picked from commit 26f5d6058d8b0cf4ad2f8da729cb906796c297a0)

19 months agodnsdist: Fix the documented return value of DNSHeader:getTC() 13605/head
Remi Gacogne [Mon, 14 Aug 2023 15:50:52 +0000 (17:50 +0200)] 
dnsdist: Fix the documented return value of DNSHeader:getTC()

(cherry picked from commit dfd90e05d024dbc7c5a01975fc4e753cad03e77d)

19 months agodnsdist: Add a DNSHeader:getTC() Lua binding
Remi Gacogne [Mon, 14 Aug 2023 15:02:39 +0000 (17:02 +0200)] 
dnsdist: Add a DNSHeader:getTC() Lua binding

(cherry picked from commit 2be955a17cd79d92dd5ab3975481c4a53c6369a1)

19 months agodnsdist: Also test metrics with recvmmsg support enabled 13604/head
Remi Gacogne [Mon, 28 Aug 2023 14:12:01 +0000 (16:12 +0200)] 
dnsdist: Also test metrics with recvmmsg support enabled

We have seen in https://github.com/PowerDNS/pdns/issues/13148 that
we can easily break frontend metrics when `recvmmsg`/`sendmmsg`
support is enabled via `setUDPMultipleMessagesVectorSize()`, so let's
test the metrics in that case explicitly so we do not break them
again in the future.

(cherry picked from commit bd5a0bc629d6445be7a77e1c28539702f5cf2585)

19 months agodnsdist: Fix a race in the Async unit tests 13603/head
Remi Gacogne [Thu, 28 Sep 2023 12:13:59 +0000 (14:13 +0200)] 
dnsdist: Fix a race in the Async unit tests

We used to set the `errorRaised` variable from the `AsynchronousHolder`
thread then check its value from the main thread, which is correctly
reported as TSAN as a data race. We do know that we have waited enough,
and that otherwise it's fine to fail, but TSAN cannot know that. Switching
to a `std::atomic<bool>` fixes it.

(cherry picked from commit f39b15a71271afe6333e55f5994b680a68eeccbd)

19 months agodnsdist: Fix eBPF metrics in the internal web server 13602/head
Remi Gacogne [Fri, 29 Sep 2023 13:52:10 +0000 (15:52 +0200)] 
dnsdist: Fix eBPF metrics in the internal web server

We used to only display eBPF dynamic blocks for the Dynamic BPF
registered via `registerDynBPFFilter()`, which does not play well
with the new DynBlockRulesGroup approach.
This commit fixes it by making exporting / displaying metric for
the default BPF filter (`setDefaultBPFFilter`) as well.

(cherry picked from commit 2b8de4d5c2f0d8360ef0bd6b4e33183acd1e0a87)

19 months agodnsdist: Document that `add*DynBlocks()` methods are legacy ones
Remi Gacogne [Fri, 29 Sep 2023 08:33:29 +0000 (10:33 +0200)] 
dnsdist: Document that `add*DynBlocks()` methods are legacy ones

(cherry picked from commit a53e079749c0472c0187c4e7f5ac57408165786d)

19 months agodnsdist: Log whether newly inserted dynamic blocks are eBPF-based
Remi Gacogne [Fri, 29 Sep 2023 08:32:30 +0000 (10:32 +0200)] 
dnsdist: Log whether newly inserted dynamic blocks are eBPF-based

(cherry picked from commit c7306f1464596b9bc6b4d3325d26b1d9d997b3c5)

19 months agodnsdist: Display whether blocks are eBPF-based in `showDynBlocks()`
Remi Gacogne [Fri, 29 Sep 2023 08:31:43 +0000 (10:31 +0200)] 
dnsdist: Display whether blocks are eBPF-based in `showDynBlocks()`

(cherry picked from commit 8959c0adf0f5be11c2c5dac1b86efe41881e81e1)

19 months agodnsdist: Disable the complexity check for setupLuaInspection() 13601/head
Remi Gacogne [Thu, 19 Oct 2023 14:03:24 +0000 (16:03 +0200)] 
dnsdist: Disable the complexity check for setupLuaInspection()

(cherry picked from commit cbf61a8c98e712529609fec795d9b0e3a8f16516)

19 months agodnsdist: Fix version in the documentation of DynBlockRulesGroup:removeRange()
Remi Gacogne [Thu, 19 Oct 2023 13:02:13 +0000 (15:02 +0200)] 
dnsdist: Fix version in the documentation of DynBlockRulesGroup:removeRange()

(cherry picked from commit f44613ecba20799ce1b6108424789ef5476dfb6c)

19 months agodnsdist: Add a DynBlockRulesGroup:removeRange() binding
Remi Gacogne [Fri, 6 Oct 2023 15:43:11 +0000 (17:43 +0200)] 
dnsdist: Add a DynBlockRulesGroup:removeRange() binding

This adds the ability to remove an existing range from the list of
existing included/excluded ranges.

(cherry picked from commit 59a8b3389bb12e127165a9e3fb0f2f28f97adcde)

19 months agodnsdist: Skip our BADVERS regression test on broken Python versions 13600/head
Remi Gacogne [Fri, 29 Sep 2023 15:13:18 +0000 (17:13 +0200)] 
dnsdist: Skip our BADVERS regression test on broken Python versions

See https://github.com/PowerDNS/pdns/pull/12912 for the longer
explanation.

(cherry picked from commit f57b74a69cf3b235ac22b38deb77ff3b09aba27b)

19 months agodnsdist: Add a regression test for rules removal 13599/head
Remi Gacogne [Tue, 14 Nov 2023 14:40:43 +0000 (15:40 +0100)] 
dnsdist: Add a regression test for rules removal

(cherry picked from commit 90149f576d927e7746d57008bf8ac66101d7c47c)

19 months agodnsdist: Prevent a copy of the UUID when scanning rules for removal
Remi Gacogne [Tue, 14 Nov 2023 14:38:14 +0000 (15:38 +0100)] 
dnsdist: Prevent a copy of the UUID when scanning rules for removal

(cherry picked from commit aa7c1fcdd0500aa349659aa7a33cae960e45f093)

19 months agodnsdist: Fix the removal of the last rule by name or UUID
Remi Gacogne [Tue, 14 Nov 2023 09:20:43 +0000 (10:20 +0100)] 
dnsdist: Fix the removal of the last rule by name or UUID

(cherry picked from commit 26fb52245b02022f50ab138dfcde4140bd2f707f)

19 months agodnsdist: Explain to clang-tidy that resizing a moved vector is fine 13598/head
Remi Gacogne [Fri, 24 Nov 2023 15:16:52 +0000 (16:16 +0100)] 
dnsdist: Explain to clang-tidy that resizing a moved vector is fine

(cherry picked from commit c0391c22e44f9cef35a13feaf211bbc0b16573b7)

19 months agodnsdist: Detect and dismiss truncated UDP responses from a backend
Remi Gacogne [Fri, 24 Nov 2023 14:30:09 +0000 (15:30 +0100)] 
dnsdist: Detect and dismiss truncated UDP responses from a backend

Until now we would not have detected if the response was larger than
our buffer (4096 bytes or larger in some cases), which could have
led to parsing errors or even forwarding a corrupted response.

(cherry picked from commit 17a0b06ee3cfa43bb9ac4a0cd5186fbc42e090a5)

19 months agoMerge pull request #13573 from romeroalx/rel/dnsdist-1.8.x-workflow-call
Remi Gacogne [Thu, 7 Dec 2023 08:28:13 +0000 (09:28 +0100)] 
Merge pull request #13573 from romeroalx/rel/dnsdist-1.8.x-workflow-call

GH Actions - rel/dnsdist-1.8.x: make `build-and-test-all` and `builder` workflows reusable from other branches

20 months agomake builder workflow reusable 13573/head
romeroalx [Wed, 22 Nov 2023 13:07:38 +0000 (14:07 +0100)] 
make builder workflow reusable

20 months agomake build-and-test-all reusable
Alexis Romero [Thu, 16 Nov 2023 16:07:07 +0000 (17:07 +0100)] 
make build-and-test-all reusable

20 months agotest ubuntu jammy build target
Peter van Dijk [Fri, 14 Jan 2022 11:12:09 +0000 (12:12 +0100)] 
test ubuntu jammy build target

20 months agobuilder: drop ubuntu kinetic, it is EOL
Peter van Dijk [Thu, 14 Sep 2023 06:35:05 +0000 (08:35 +0200)] 
builder: drop ubuntu kinetic, it is EOL

20 months agoMerge pull request #13523 from rgacogne/ddist18-backoff
Remi Gacogne [Tue, 21 Nov 2023 12:52:42 +0000 (13:52 +0100)] 
Merge pull request #13523 from rgacogne/ddist18-backoff

dnsdist-1.8.x: Refactor the exponential back-off timer code

20 months agodnsdist: Refactor the exponential back-off timer code 13523/head
Remi Gacogne [Mon, 20 Nov 2023 19:38:57 +0000 (20:38 +0100)] 
dnsdist: Refactor the exponential back-off timer code

The existing code could overflow in some cases, leading to a
potentially endless busy-loop.

(cherry picked from commit d629f5b02ee6de8bf94592980472337fdbf301ad)

21 months agoMerge pull request #13356 from Habbie/backport-13355-to-dnsdist-1.8.x
Peter van Dijk [Wed, 11 Oct 2023 17:44:57 +0000 (19:44 +0200)] 
Merge pull request #13356 from Habbie/backport-13355-to-dnsdist-1.8.x

dnsdist 1.8 Docker: enable h2o again, using our fork

21 months agodnsdist Docker: enable h2o again, using our fork 13356/head
Peter van Dijk [Wed, 11 Oct 2023 15:12:56 +0000 (17:12 +0200)] 
dnsdist Docker: enable h2o again, using our fork

(cherry picked from commit de02bfc15ca0b17bb082bcffd0882ec03257ce57)

21 months agoMerge pull request #13349 from rgacogne/ddist18-powerdns-h2o-h2-rapid-reset dnsdist-1.8.2
Remi Gacogne [Wed, 11 Oct 2023 11:38:51 +0000 (13:38 +0200)] 
Merge pull request #13349 from rgacogne/ddist18-powerdns-h2o-h2-rapid-reset

dnsdist-1.8x: Switch to our fork of h2o to mitigate http2 rapid reset

21 months agobuilder-support: Use curl's "fail fast with no output at all on server errors" option 13349/head
Remi Gacogne [Wed, 11 Oct 2023 10:04:21 +0000 (12:04 +0200)] 
builder-support: Use curl's "fail fast with no output at all on server errors" option

(cherry picked from commit 97d18cb451fcac78816604556629278c9ca49d3c)

21 months agodnsdist: Switch to our fork of h2o to mitigate http2 rapid reset
Remi Gacogne [Wed, 11 Oct 2023 08:41:45 +0000 (10:41 +0200)] 
dnsdist: Switch to our fork of h2o to mitigate http2 rapid reset

(cherry picked from commit 115db75920b73f07c356308df1b83ba296850e2a)

22 months agoMerge pull request #13184 from rgacogne/ddist18-backport-package-building-workflow dnsdist-1.8.1
Remi Gacogne [Thu, 7 Sep 2023 09:39:04 +0000 (11:39 +0200)] 
Merge pull request #13184 from rgacogne/ddist18-backport-package-building-workflow

dnsdist-1.8.x: Backport the workflow to build packages from tags

23 months agoFix 'check if hashes were created for all requested targets' 13184/head
Remi Gacogne [Mon, 28 Aug 2023 12:51:19 +0000 (14:51 +0200)] 
Fix 'check if hashes were created for all requested targets'

23 months agofix the provenance generation
Remi Gacogne [Mon, 28 Aug 2023 12:19:53 +0000 (14:19 +0200)] 
fix the provenance generation

23 months agodnsdist-1.8.x: Backport the workflow to build packages from tags
Remi Gacogne [Mon, 28 Aug 2023 09:15:41 +0000 (11:15 +0200)] 
dnsdist-1.8.x: Backport the workflow to build packages from tags

23 months agoMerge pull request #13178 from rgacogne/ddist18-tcpiohandler-fix-conn-index-race
Remi Gacogne [Mon, 28 Aug 2023 09:51:47 +0000 (11:51 +0200)] 
Merge pull request #13178 from rgacogne/ddist18-tcpiohandler-fix-conn-index-race

dnsdist-1.8.x: TCPIOHandler: Fix a race when creating the first TLS connections

23 months agoTCPIOHandler: Fix a race when creating the first TLS connections 13178/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>)
```

(cherry picked from commit b56f05b6d81d64cc11f389e2b08d070c1b912ce7)

23 months agoMerge pull request #13122 from rgacogne/ddist18-auto-include-ffi-inspection
Remi Gacogne [Wed, 23 Aug 2023 15:13:28 +0000 (17:13 +0200)] 
Merge pull request #13122 from rgacogne/ddist18-auto-include-ffi-inspection

dnsdist-1.8.x: Automatically load Lua FFI inspection functions

23 months agodnsdist: add dnsdist-lua-inspection-ffi.h to dist tarballs 13122/head
Peter van Dijk [Thu, 22 Jun 2023 07:18:56 +0000 (09:18 +0200)] 
dnsdist: add dnsdist-lua-inspection-ffi.h to dist tarballs

(cherry picked from commit 46de63a6feb237e39b444c80ba82b57c4635ae52)

23 months agoMerge pull request #13123 from rgacogne/ddist18-declare-custom-metrics-at-runtime
Remi Gacogne [Wed, 23 Aug 2023 12:55:58 +0000 (14:55 +0200)] 
Merge pull request #13123 from rgacogne/ddist18-declare-custom-metrics-at-runtime

dnsdist-1.8.x: Allow declaring custom metrics at runtime

23 months agoMerge pull request #13118 from rgacogne/ddist18-fix-dnsdistconf-grp-rpm
Remi Gacogne [Wed, 23 Aug 2023 12:03:02 +0000 (14:03 +0200)] 
Merge pull request #13118 from rgacogne/ddist18-fix-dnsdistconf-grp-rpm

dnsdist-1.8.x: Fix the group of the dnsdist.conf file when installed via RPM