]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
2 weeks agodnsdist: Return early when a rule chain is empty 15926/head
Remi Gacogne [Tue, 22 Jul 2025 09:19:19 +0000 (11:19 +0200)] 
dnsdist: Return early when a rule chain is empty

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 1ae16e707a6cb1c80d611b72e9e4599707332645)

3 weeks agoMerge pull request #15879 from rgacogne/ddist20-backport-15871 dnsdist-2.0.0
Remi Gacogne [Mon, 21 Jul 2025 09:54:44 +0000 (11:54 +0200)] 
Merge pull request #15879 from rgacogne/ddist20-backport-15871

dnsdist-2.0.x: Backport 15871 - Use an unordered map for pools

3 weeks agoMerge pull request #15880 from rgacogne/ddist20-backport-15872
Remi Gacogne [Mon, 21 Jul 2025 09:53:04 +0000 (11:53 +0200)] 
Merge pull request #15880 from rgacogne/ddist20-backport-15872

dnsdist-2.0.x: Backport 15872 - Only parse EDNS Z once

3 weeks agoMerge pull request #15878 from rgacogne/ddist20-backport-15870
Remi Gacogne [Mon, 21 Jul 2025 09:52:49 +0000 (11:52 +0200)] 
Merge pull request #15878 from rgacogne/ddist20-backport-15870

dnsdist-2.0.x: Avoid constructing a DNSResponse object when not really needed

3 weeks agoMerge pull request #15877 from rgacogne/ddist20-backport-15869
Remi Gacogne [Mon, 21 Jul 2025 09:47:32 +0000 (11:47 +0200)] 
Merge pull request #15877 from rgacogne/ddist20-backport-15869

dnsdist-2.0.x: Backport 15869 - Small speedup for getEDNSUDPPayloadSizeAndZ()

3 weeks agoMerge pull request #15876 from rgacogne/ddist20-backport-15868
Remi Gacogne [Mon, 21 Jul 2025 09:47:08 +0000 (11:47 +0200)] 
Merge pull request #15876 from rgacogne/ddist20-backport-15868

dnsdist-2.0.x: Backport 15868 - Improve the scalability of the MAC address cache

3 weeks agoMerge pull request #15875 from rgacogne/ddist20-backport-15861
Remi Gacogne [Mon, 21 Jul 2025 09:43:57 +0000 (11:43 +0200)] 
Merge pull request #15875 from rgacogne/ddist20-backport-15861

dnsdist-2.0.x: Backport 15861 - Fix out-of-tree builds with autotools

3 weeks agodnsdist: Only parse EDNS Z once 15880/head
Remi Gacogne [Thu, 17 Jul 2025 15:11:11 +0000 (17:11 +0200)] 
dnsdist: Only parse EDNS Z once

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit d071f0027e663206fedaa433496c4e3bd49718ee)

3 weeks agodnsdist: Use an unordered map for pools 15879/head
Remi Gacogne [Fri, 18 Jul 2025 10:06:29 +0000 (12:06 +0200)] 
dnsdist: Use an unordered map for pools

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 516c3156553f874e31926671c2afed0b53b3ef19)

3 weeks agodnsdist: Avoid constructing a DNSResponse object when not really needed 15878/head
Remi Gacogne [Tue, 15 Jul 2025 14:27:31 +0000 (16:27 +0200)] 
dnsdist: Avoid constructing a DNSResponse object when not really needed

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 4843b77823b100d652d9116165da4b4913a48ad3)

3 weeks agodnsparser: Add a comment explaining that the OPT RR has to be in additional 15877/head
Remi Gacogne [Fri, 18 Jul 2025 15:05:37 +0000 (17:05 +0200)] 
dnsparser: Add a comment explaining that the OPT RR has to be in additional

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 336a601b2bd2d6475eca39a6ad1489a02354cdca)

3 weeks agodnsdist: Small speedup for getEDNSUDPPayloadSizeAndZ()
Remi Gacogne [Fri, 18 Jul 2025 10:07:12 +0000 (12:07 +0200)] 
dnsdist: Small speedup for getEDNSUDPPayloadSizeAndZ()

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 4e7c4d06db5f6421bc33ccf7d7e72b36fe4e68db)

3 weeks agodnsdist: Improve the scalability of the MAC address cache 15876/head
Remi Gacogne [Fri, 18 Jul 2025 10:06:48 +0000 (12:06 +0200)] 
dnsdist: Improve the scalability of the MAC address cache

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 574075d9a9204d44f41982fd78bb5b90a2bcfb89)

3 weeks agodnsdist: Fix out-of-tree builds with autotools 15875/head
Remi Gacogne [Thu, 17 Jul 2025 10:16:31 +0000 (12:16 +0200)] 
dnsdist: Fix out-of-tree builds with autotools

Stolen from Habbie, many thanks!

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 412e0da107a9c6e8df4f6ad7958f6705d5e975fc)

3 weeks agoMerge pull request #15842 from rgacogne/ddist20-backport-15823 dnsdist-2.0.0-rc2
Remi Gacogne [Thu, 17 Jul 2025 07:40:34 +0000 (09:40 +0200)] 
Merge pull request #15842 from rgacogne/ddist20-backport-15823

dnsdist-2.0.x: Backport 15823 - Bring back listening on multiple web server addresses

3 weeks agoMerge pull request #15841 from rgacogne/ddist20-backport-15822
Remi Gacogne [Thu, 17 Jul 2025 07:40:21 +0000 (09:40 +0200)] 
Merge pull request #15841 from rgacogne/ddist20-backport-15822

dnsdist-2.0.x: Backport 15822 - Allow registering NMG objects from YAML

3 weeks agodnsdist: Document that negative entries in netmask lists are supported 15841/head
Remi Gacogne [Wed, 16 Jul 2025 15:55:58 +0000 (17:55 +0200)] 
dnsdist: Document that negative entries in netmask lists are supported

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit aa18df7da0df93890100f2c82e79ed5eeee78e6b)

3 weeks agodnsdist: Apply Otto's suggestion
Remi Gacogne [Wed, 16 Jul 2025 15:55:44 +0000 (17:55 +0200)] 
dnsdist: Apply Otto's suggestion

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 08d790466b2e465700f193b503ff0a76a3a0680e)

3 weeks agodnsdist: Allow registering NMG objects from YAML
Remi Gacogne [Thu, 10 Jul 2025 15:11:08 +0000 (17:11 +0200)] 
dnsdist: Allow registering NMG objects from YAML

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit f158a09f2d82c305a8297cd36713decb2cadb8f0)

3 weeks agoMerge pull request #15837 from rgacogne/ddist20-backport-15829
Remi Gacogne [Wed, 16 Jul 2025 15:45:31 +0000 (17:45 +0200)] 
Merge pull request #15837 from rgacogne/ddist20-backport-15829

dnsdist-2.0.x: Backport 15829 - dnsdist-rust-lib: honor RUSTC_TARGET_ARCH

3 weeks agoMerge pull request #15838 from rgacogne/ddist20-backport-15819
Remi Gacogne [Wed, 16 Jul 2025 15:45:21 +0000 (17:45 +0200)] 
Merge pull request #15838 from rgacogne/ddist20-backport-15819

dnsdist-2.0.x: Backport 15819 - Handle named rcodes in the YAML configuration

3 weeks agoMerge pull request #15839 from rgacogne/ddist20-backport-15815
Remi Gacogne [Wed, 16 Jul 2025 15:45:10 +0000 (17:45 +0200)] 
Merge pull request #15839 from rgacogne/ddist20-backport-15815

dnsdist-2.0.x: Backport 15815 - Properly process the YAML source parameter for backends

3 weeks agoMerge pull request #15840 from rgacogne/ddist20-backport-15813
Remi Gacogne [Wed, 16 Jul 2025 15:45:01 +0000 (17:45 +0200)] 
Merge pull request #15840 from rgacogne/ddist20-backport-15813

dnsdist-2.0.x: Backport 15813 - Properly link with `libdl` when building with `autotools`

3 weeks agoMerge pull request #15843 from rgacogne/ddist20-backport-15833
Remi Gacogne [Wed, 16 Jul 2025 15:44:53 +0000 (17:44 +0200)] 
Merge pull request #15843 from rgacogne/ddist20-backport-15833

dnsdist-2.0.x: Backport 15833 - Fix narrowing conversion on 32-bit systems by using uint64_t instead of size_t

3 weeks agoFix narrowing conversion on 32-bit systems by using uint64_t instead of size_t 15843/head
Darwin4053 [Mon, 14 Jul 2025 12:06:42 +0000 (17:36 +0530)] 
Fix narrowing conversion on 32-bit systems by using uint64_t instead of size_t

(cherry picked from commit 83ac5035c5676ee9bd75b79ecfb7778f0e9d599a)

3 weeks agodnsdist: Fix a clang-tidy warning 15842/head
Remi Gacogne [Fri, 11 Jul 2025 10:05:28 +0000 (12:05 +0200)] 
dnsdist: Fix a clang-tidy warning

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit a5b8fe9689a4fa5ca4974f2fb17336d7327b54f2)

3 weeks agodnsdist: Bring back listening on multiple web server addresses
Remi Gacogne [Fri, 11 Jul 2025 08:47:26 +0000 (10:47 +0200)] 
dnsdist: Bring back listening on multiple web server addresses

This was broken during the refactoring of the configuration between
1.9.x and 2.0.x.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 11f9083073119595c655988a3981ab5f1ccc2e40)

4 weeks agodnsdist: Properly link with `libdl` when building with `autotools` 15840/head
Remi Gacogne [Thu, 10 Jul 2025 07:55:13 +0000 (09:55 +0200)] 
dnsdist: Properly link with `libdl` when building with `autotools`

Depending on the system we might actually need to link with `libdl`
when our Rust library is used, and the mechanism to do that was not
properly set up when building with `autotools` (we were adding `LIBDL`
to the the libraries we need but the variable was not properly filled).
Unfortunately the systems we are exercising in our CI do not need to
explicitly link with `libdl` so we did not notice.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 83416a76b6df3af560514caea8c45e750f1fd24b)

4 weeks agodnsdist: Properly process the YAML source parameter for backends 15839/head
Remi Gacogne [Thu, 10 Jul 2025 08:53:19 +0000 (10:53 +0200)] 
dnsdist: Properly process the YAML source parameter for backends

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 451a06cd0065fbd1364347cece5335bf921402af)

4 weeks agodns: Fix another clang-tidy warning 15838/head
Remi Gacogne [Fri, 11 Jul 2025 12:13:55 +0000 (14:13 +0200)] 
dns: Fix another clang-tidy warning

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 1ba566f50364a09d7ffa7391f4928fa8019157d1)

4 weeks agodns: Add short descriptions for extended rcodes as well
Remi Gacogne [Fri, 11 Jul 2025 09:27:38 +0000 (11:27 +0200)] 
dns: Add short descriptions for extended rcodes as well

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 4a1a3e3ed7ea4b5b9d42657c74b90b821dc95421)

4 weeks agodns: Fix a clang-tidy warning
Remi Gacogne [Fri, 11 Jul 2025 09:26:28 +0000 (11:26 +0200)] 
dns: Fix a clang-tidy warning

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 24570745905593be704ceaa990ecaa442d842d95)

4 weeks agodnsdist: The ability to use RCode names in YAML will be backported to 2.0
Remi Gacogne [Fri, 11 Jul 2025 08:05:34 +0000 (10:05 +0200)] 
dnsdist: The ability to use RCode names in YAML will be backported to 2.0

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit f593ec1327e74c6916502c4d2ad9039e1342d7ee)

4 weeks agodns: Add unit tests for the RCode/ERCode/Opcode helpers
Remi Gacogne [Fri, 11 Jul 2025 08:05:04 +0000 (10:05 +0200)] 
dns: Add unit tests for the RCode/ERCode/Opcode helpers

(cherry picked from commit d147b9dbd5df717c4dd299d05037b6e7a78b1061)

4 weeks agodns: Add short description for the Not Zone rcode
Remi Gacogne [Fri, 11 Jul 2025 08:04:20 +0000 (10:04 +0200)] 
dns: Add short description for the Not Zone rcode

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 3e114916d5efd1cd35f8f1e25f7bba02f647a1d7)

4 weeks agodns: Rewrite `RCode::from_short` with `std::find` and `std::distance`
Remi Gacogne [Fri, 11 Jul 2025 08:03:18 +0000 (10:03 +0200)] 
dns: Rewrite `RCode::from_short` with `std::find` and `std::distance`

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 978fca63b078da822c15d1a9bdee9bd0bb4a7349)

4 weeks agodnsdist: Fix a typo in the upgrade guide
Remi Gacogne [Thu, 10 Jul 2025 14:03:17 +0000 (16:03 +0200)] 
dnsdist: Fix a typo in the upgrade guide

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit e5db082886b36f30d9780439249c656ad0738605)

4 weeks agodnsdist: Document changed YAML parameters
Remi Gacogne [Thu, 10 Jul 2025 13:47:58 +0000 (15:47 +0200)] 
dnsdist: Document changed YAML parameters

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 852772af5e54aa2c5aeb17a4565c57a5251aba40)

4 weeks agodnsdist: Handle named rcodes in all YAML configuration items
Remi Gacogne [Thu, 10 Jul 2025 13:31:54 +0000 (15:31 +0200)] 
dnsdist: Handle named rcodes in all YAML configuration items

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit d442fb9443d7b89afd95f3f56e85d62931217841)

4 weeks agodnsdist: Handle named rcodes in the dynamic block YAML configuration
Remi Gacogne [Thu, 10 Jul 2025 10:05:02 +0000 (12:05 +0200)] 
dnsdist: Handle named rcodes in the dynamic block YAML configuration

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit f84cc5ad3e19c73cc45b393d0934d9c4579bde10)

4 weeks agodnsdist: Add a Dynamic block rcode rate test using YAML
Remi Gacogne [Thu, 10 Jul 2025 08:35:29 +0000 (10:35 +0200)] 
dnsdist: Add a Dynamic block rcode rate test using YAML

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 24691dd78daa343d17280dc8b44b54770430affc)

4 weeks agodnsdist-rust-lib: honor RUSTC_TARGET_ARCH 15837/head
Chris Hofstaedtler [Sat, 12 Jul 2025 13:28:40 +0000 (15:28 +0200)] 
dnsdist-rust-lib: honor RUSTC_TARGET_ARCH

Like for pdns-recursor and also like in the meson build.

Necessary as Debian's cargo always puts the output files into target/<arch>/...

(cherry picked from commit d6515621f452557e45e4498d508c6b6c60e7660a)

4 weeks agoMerge pull request #15805 from rgacogne/ddist20-backport-15639
Remi Gacogne [Tue, 8 Jul 2025 10:17:00 +0000 (12:17 +0200)] 
Merge pull request #15805 from rgacogne/ddist20-backport-15639

dnsdist-2.0.x: Backport 15639 - Add el-10 target

4 weeks agobuilder: avoid duplicate installation of meson/quiche/rust 15805/head
Peter van Dijk [Fri, 6 Jun 2025 13:23:23 +0000 (15:23 +0200)] 
builder: avoid duplicate installation of meson/quiche/rust

(cherry picked from commit adc4a45244c64cfcd52d03b8a392224c3851e1ff)

4 weeks agobuilder: add el-10 target, based on rockylinux:10 for now
Remi Gacogne [Tue, 8 Jul 2025 09:38:56 +0000 (11:38 +0200)] 
builder: add el-10 target, based on rockylinux:10 for now

cherry-picked from 32a5ef17f4aa04822b79aafd2c783c19433955a5

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
5 weeks agoMerge pull request #15787 from rgacogne/ddist20-remove-more-workflows dnsdist-2.0.0-rc1
Remi Gacogne [Mon, 7 Jul 2025 13:04:22 +0000 (15:04 +0200)] 
Merge pull request #15787 from rgacogne/ddist20-remove-more-workflows

dnsdist-2.0.x: Remove more useless workflows

5 weeks agoMerge pull request #15784 from rgacogne/ddist20-backport-15747
Remi Gacogne [Mon, 7 Jul 2025 13:04:06 +0000 (15:04 +0200)] 
Merge pull request #15784 from rgacogne/ddist20-backport-15747

dnsdist-2.0.x: Backport 15747 - Add a Lua binding to get objects declared in YAML

5 weeks agodnsdist-2.0.x: Remove more useless workflows 15787/head
Remi Gacogne [Thu, 3 Jul 2025 15:26:32 +0000 (17:26 +0200)] 
dnsdist-2.0.x: Remove more useless workflows

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
5 weeks agodnsdist: Add an explicit return type to getObjectFromYAMLConfiguration 15784/head
Remi Gacogne [Tue, 1 Jul 2025 08:01:06 +0000 (10:01 +0200)] 
dnsdist: Add an explicit return type to getObjectFromYAMLConfiguration

As suggested by Otto.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 9263b481855ffc6e3324f2d342ce66b57e4ac0fa)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
5 weeks agodnsdist: Add a regression test for `getObjectFromYAMLConfiguration`
Remi Gacogne [Mon, 30 Jun 2025 11:37:20 +0000 (13:37 +0200)] 
dnsdist: Add a regression test for `getObjectFromYAMLConfiguration`

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 80f292fc5d96ab59afea63aaf8323267081b9114)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
5 weeks agodnsdist: Add a Lua binding to get objects declared in YAML
Remi Gacogne [Mon, 30 Jun 2025 10:23:56 +0000 (12:23 +0200)] 
dnsdist: Add a Lua binding to get objects declared in YAML

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit d98d50b1939016d03a522cb6a79834088949e913)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
5 weeks agoMerge pull request #15780 from rgacogne/ddist20-backport-15751
Remi Gacogne [Thu, 3 Jul 2025 12:05:05 +0000 (14:05 +0200)] 
Merge pull request #15780 from rgacogne/ddist20-backport-15751

dnsdist-2.0.x: Backport to 15751 - Error on unsupported backend protocols from YAML

5 weeks agoMerge pull request #15779 from rgacogne/ddist20-backport-15750
Remi Gacogne [Thu, 3 Jul 2025 12:04:53 +0000 (14:04 +0200)] 
Merge pull request #15779 from rgacogne/ddist20-backport-15750

dnsdist-2.0.x: Backport 15750 - Fix logging and XSK YAML settings being ignored

5 weeks agoMerge pull request #15778 from rgacogne/ddist20-backport-15739
Remi Gacogne [Thu, 3 Jul 2025 12:04:39 +0000 (14:04 +0200)] 
Merge pull request #15778 from rgacogne/ddist20-backport-15739

dnsdist-2.0.x: Backport 15739 - lmdb-safe: Fix a small race in `getMDBEnv`

5 weeks agoMerge pull request #15777 from rgacogne/ddist20-backport-15738
Remi Gacogne [Thu, 3 Jul 2025 12:04:27 +0000 (14:04 +0200)] 
Merge pull request #15777 from rgacogne/ddist20-backport-15738

dnsdist-2.0.x: Backport 15738 - Prevent users from opening the same LMDB twice

5 weeks agoMerge pull request #15776 from rgacogne/ddist20-backport-15735
Remi Gacogne [Thu, 3 Jul 2025 12:04:13 +0000 (14:04 +0200)] 
Merge pull request #15776 from rgacogne/ddist20-backport-15735

dnsdist-2.0.x: Backport 15735 - lmdb-safe: Improve the scalability of transaction maps

5 weeks agoMerge pull request #15775 from rgacogne/ddist20-backport-15718
Remi Gacogne [Thu, 3 Jul 2025 12:04:00 +0000 (14:04 +0200)] 
Merge pull request #15775 from rgacogne/ddist20-backport-15718

dnsdist-2.0.x: Backport 15718 - Return nil for non-existing Lua objects

5 weeks agoMerge pull request #15774 from rgacogne/ddist20-backport-15707
Remi Gacogne [Thu, 3 Jul 2025 12:03:48 +0000 (14:03 +0200)] 
Merge pull request #15774 from rgacogne/ddist20-backport-15707

dnsdist-2.0.x: Backport 15707 - Prevent Lua bindings for backend from crashing on empty backend

5 weeks agoMerge pull request #15781 from rgacogne/ddist20-backport-15754
Remi Gacogne [Thu, 3 Jul 2025 12:02:37 +0000 (14:02 +0200)] 
Merge pull request #15781 from rgacogne/ddist20-backport-15754

dnsdist-2.0.x: Backport 15754 - Error if backend certificate validation is enabled without a subject name

5 weeks agodnsdist: Lowercase the TLS provider name for YAML-originated backends 15781/head
Remi Gacogne [Mon, 30 Jun 2025 13:58:07 +0000 (15:58 +0200)] 
dnsdist: Lowercase the TLS provider name for YAML-originated backends

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 7106cda315dff6969062899ecb6360768e9f3fee)

5 weeks agodnsdist: Error if backend certificate validation is enabled without a subject name
Remi Gacogne [Mon, 30 Jun 2025 13:57:10 +0000 (15:57 +0200)] 
dnsdist: Error if backend certificate validation is enabled without a subject name

We can only validate if a proper subject name or subject address is passed,
and we do not want to silently disable validation, so let's refuse to start.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 8a9142058f82e0fd70b428ddc50848f00a59d2c4)

5 weeks agodnsdist: Error on unsupported backend protocols from YAML 15780/head
Remi Gacogne [Mon, 30 Jun 2025 13:15:46 +0000 (15:15 +0200)] 
dnsdist: Error on unsupported backend protocols from YAML

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit def4733d1eb32c80ccc79f7f6ed39ab7be49f33f)

5 weeks agodnsdist: Fix logging and XSK YAML settings being ignored 15779/head
Remi Gacogne [Mon, 30 Jun 2025 13:00:51 +0000 (15:00 +0200)] 
dnsdist: Fix logging and XSK YAML settings being ignored

It turns out that the configuration we receive from the
serde parser was not correctly translated to our own
configuration.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit f18dbfa050241f925b19c53653b3ef4061afa1e1)

5 weeks agolmdb-safe: Do not use strerror() which is not thread-safe 15778/head
Remi Gacogne [Fri, 27 Jun 2025 19:54:41 +0000 (21:54 +0200)] 
lmdb-safe: Do not use strerror() which is not thread-safe

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 7ad3b74ea624b47441f717ad7ced209ef01869c8)

5 weeks agolmdb-safe: Fix a small race in `getMDBEnv`
Remi Gacogne [Fri, 27 Jun 2025 14:40:38 +0000 (16:40 +0200)] 
lmdb-safe: Fix a small race in `getMDBEnv`

I believe there is a small race in the `getMDBEnv`: if the database
file does not exist when we first try to get the file metadata, we
acquire the lock then create a new `MDBEnv` and store it in the map.
But what happens if a different thread created the database between
our first check and the call to `MDBEnv`? I believe we would create
a new environment and override the existing entry in the map, bypassing
the check.
This commit introduces a second check right after acquiring the lock
to prevent that.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 57224e94d9189f4916bbd7b2aaf61fa0821b1a2c)

5 weeks agodnsdist: Prevent users from opening the same LMDB twice 15777/head
Remi Gacogne [Fri, 27 Jun 2025 14:37:46 +0000 (16:37 +0200)] 
dnsdist: Prevent users from opening the same LMDB twice

As noted by Peter: "LMBD requires that database is opened
exactly once per process. Opening multiple times breaks file
locks silently, which leads to corrupting the database."

While I don't expect users to actually do that, we already have
a nice helper function to prevent this mistake in the lmdb-safe
code base, so let's use it.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 0cfa000e3f7a47c96a3129d5ef27ce13022707f6)

5 weeks agolmdb-safe: Use unordered maps for the transaction maps 15776/head
Remi Gacogne [Fri, 27 Jun 2025 10:15:48 +0000 (12:15 +0200)] 
lmdb-safe: Use unordered maps for the transaction maps

We don't need the maps to be ordered, and unordered maps are usually
slightly faster.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 883aec59cf56f9345b0a229ed7af35490a113494)

5 weeks agolmdb-safe: Improve the scalability of transaction maps
Remi Gacogne [Fri, 27 Jun 2025 10:12:29 +0000 (12:12 +0200)] 
lmdb-safe: Improve the scalability of transaction maps

This commit improves the scalability of the transaction maps by
moving from a `mutex` to a `shared_mutex` and making the stored value
atomic. This allows accessing the maps concurrently from different threads
as long as the entry for the thread exists, and we fall back to
taking a full lock otherwise.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit c340aa91bf37d8105d2b2390eecbadfca88c1d27)

5 weeks agodnsdist: Rely upon type deduction, as suggested by Miod 15775/head
Remi Gacogne [Mon, 23 Jun 2025 12:55:34 +0000 (14:55 +0200)] 
dnsdist: Rely upon type deduction, as suggested by Miod

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit a5ede88eea4c55f8e5536ca17b4fbb2992bb6271)

5 weeks agodnsdist: Return `nil` for non-existing Lua objects
Remi Gacogne [Mon, 23 Jun 2025 12:30:33 +0000 (14:30 +0200)] 
dnsdist: Return `nil` for non-existing Lua objects

Until now we were returning an empty shared pointer, but unfortunately
LuaWrapper is currently not smart enough to turn that into a `nil`
value.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 4b07e08e8b5aeef617c016c00ca344669870a8ce)

5 weeks agodnsdist: Prevent Lua bindings for backend from crashing on empty backend 15774/head
Remi Gacogne [Fri, 20 Jun 2025 12:06:22 +0000 (14:06 +0200)] 
dnsdist: Prevent Lua bindings for backend from crashing on empty backend

We currently return an empty `std::shared_ptr` when the backend is not
set (self-answered response, for example), and unfortunately LuaWrapper
is not smart enough to make that equivalent to `nil`, so testing whether
the backend is valid from Lua is not possible. While I would prefer to
fix that, this fix prevents us from crashing when calling the bindings
associated to a backend with an empty shared pointer.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit a12bea636790a3be73516a2a24af1a8351c016c5)

5 weeks agoMerge pull request #15760 from rgacogne/ddist20-disable-unneeded-workflows
Remi Gacogne [Wed, 2 Jul 2025 13:58:00 +0000 (15:58 +0200)] 
Merge pull request #15760 from rgacogne/ddist20-disable-unneeded-workflows

dnsdist-2.0.x: Disable non-dnsdist workflows

5 weeks agodnsdist-2.0.x: Disable non-dnsdist workflows 15760/head
Remi Gacogne [Tue, 1 Jul 2025 08:28:48 +0000 (10:28 +0200)] 
dnsdist-2.0.x: Disable non-dnsdist workflows

6 weeks agoMerge pull request #15734 from rgacogne/ddist20-15729
Remi Gacogne [Tue, 1 Jul 2025 07:52:07 +0000 (09:52 +0200)] 
Merge pull request #15734 from rgacogne/ddist20-15729

dnsdist-2.0.x: Backport 15729 - Enforce that additional addresses are DoT/DoH only

6 weeks agodnsdist: Remove useless empty line 15734/head
Remi Gacogne [Thu, 26 Jun 2025 12:24:10 +0000 (14:24 +0200)] 
dnsdist: Remove useless empty line

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 8f90541906c3040727bca08bafbe63ce38a23153)

6 weeks agodnsdist: Reduce the complexity of the YAML frontend code
Remi Gacogne [Thu, 26 Jun 2025 12:21:38 +0000 (14:21 +0200)] 
dnsdist: Reduce the complexity of the YAML frontend code

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit d64936e33c62fda11e5b5cd2832b2daefae67b26)

6 weeks agodnsdist: Enforce that additional addresses are DoT/DoH only
Remi Gacogne [Thu, 26 Jun 2025 10:46:49 +0000 (12:46 +0200)] 
dnsdist: Enforce that additional addresses are DoT/DoH only

I want to support additional addresses on frontends for all protocols,
but the amount of code to change is too important for the 2.0 branch.
So for now, let's document and enforce the current limitation to prevent
surprises.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit df7cbdb3d7f66e3bfe788d149661101bcac36647)

7 weeks agodnsdist: Generate files when building the release tarball
Remi Gacogne [Mon, 23 Jun 2025 08:42:56 +0000 (10:42 +0200)] 
dnsdist: Generate files when building the release tarball

Some build systems are very unhappy with `dnsdist-rust-lib/rust/src/lib.rs`
not existing before actually starting the build process (mostly because
of `cargo-vendor`), so let's make their life easier.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 weeks agoMerge pull request #15709 from omoerbeek/libssl-depends-on-libcrypto
Otto Moerbeek [Fri, 20 Jun 2025 14:23:23 +0000 (16:23 +0200)] 
Merge pull request #15709 from omoerbeek/libssl-depends-on-libcrypto

libssl depends on libcrypto

7 weeks agolibssl depends on libcrypto 15709/head
Otto Moerbeek [Fri, 20 Jun 2025 13:50:14 +0000 (15:50 +0200)] 
libssl depends on libcrypto

Otherwise all kinds of meson setup logic goes wrong,
symptom: DoH connection from 127.0.0.1:44825 expected ALPN value 'h2', got ''

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
7 weeks agoMerge pull request #15706 from rgacogne/rec-fix-zonetocache-unit-tests
Otto Moerbeek [Fri, 20 Jun 2025 12:03:49 +0000 (14:03 +0200)] 
Merge pull request #15706 from rgacogne/rec-fix-zonetocache-unit-tests

rec: Prevent a crash in the ZoneToCache unit tests

7 weeks agoMerge pull request #15703 from rgacogne/ddist-fix-documentation-workflow
Remi Gacogne [Fri, 20 Jun 2025 11:49:07 +0000 (13:49 +0200)] 
Merge pull request #15703 from rgacogne/ddist-fix-documentation-workflow

dnsdist: Fix the documentation workflow

7 weeks agoMerge pull request #15705 from omoerbeek/lmdb-unsafe
Otto Moerbeek [Fri, 20 Jun 2025 11:30:04 +0000 (13:30 +0200)] 
Merge pull request #15705 from omoerbeek/lmdb-unsafe

auth: rename bswap64 to pdns_bswap64.

7 weeks agorec: Prevent a crash in the ZoneToCache unit tests 15706/head
Remi Gacogne [Fri, 20 Jun 2025 11:23:01 +0000 (13:23 +0200)] 
rec: Prevent a crash in the ZoneToCache unit tests

Since 753ad2390bfbc90f6bc1b68f980ef4bcdc2cfddc ZoneToCache checks
whether a given zone has a recursive forward rule, so we need the
Domain map to be properly initialized in all tests, as they can be
executed in random order.

Fixes:
```
ThreadSanitizer:DEADLYSIGNAL
==35969==ERROR: ThreadSanitizer: SEGV on unknown address 0x000000000018 (pc 0x5568e9f8bb04 bp 0x4c00000000000 sp 0x7ffcc13b77f0 T35969)
==35969==The signal is caused by a READ memory access.
==35969==Hint: address points to the zero page.
    #0 std::_Hashtable<DNSName, std::pair<DNSName const, SyncRes::AuthDomain>, std::allocator<std::pair<DNSName const, SyncRes::AuthDomain> >, std::__detail::_Select1st, std::equal_to<DNSName>, std::hash<DNSName>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::empty() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/hashtable.h:653:23 (testrunner+0x47fb04)
    #1 std::unordered_map<DNSName, SyncRes::AuthDomain, std::hash<DNSName>, std::equal_to<DNSName>, std::allocator<std::pair<DNSName const, SyncRes::AuthDomain> > >::empty() const /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unordered_map.h:306:21 (testrunner+0x47fb04)
    #2 SyncRes::getBestAuthZone(DNSName*) /__w/pdns/pdns/pdns/recursordist/pdns-recursor-0.0.0-git1/syncres.cc:2464:29 (testrunner+0x47fb04)
    #3 SyncRes::isRecursiveForward(DNSName const&) /__w/pdns/pdns/pdns/recursordist/pdns-recursor-0.0.0-git1/syncres.cc:1098:21 (testrunner+0x47fb04)
    #4 ZoneData::ZoneToCache(RecZoneToCache::Config const&) /__w/pdns/pdns/pdns/recursordist/pdns-recursor-0.0.0-git1/rec-zonetocache.cc:423:28 (testrunner+0x404931)
    #5 RecZoneToCache::ZoneToCache(RecZoneToCache::Config const&, RecZoneToCache::State&) /__w/pdns/pdns/pdns/recursordist/pdns-recursor-0.0.0-git1/rec-zonetocache.cc:473:10 (testrunner+0x4059fd)
    #6 rec_zonetocache::zonemdGenericTest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pdns::ZoneMD::Config, pdns::ZoneMD::Config, unsigned long) /__w/pdns/pdns/pdns/recursordist/pdns-recursor-0.0.0-git1/test-rec-zonetocache.cc:157:3 (testrunner+0x7a7113)
    #7 rec_zonetocache::test_zonetocachegeneric::test_method() /__w/pdns/pdns/pdns/recursordist/pdns-recursor-0.0.0-git1/test-rec-zonetocache.cc:177:3 (testrunner+0x7a60a5)
    #8 rec_zonetocache::test_zonetocachegeneric_invoker() /__w/pdns/pdns/pdns/recursordist/pdns-recursor-0.0.0-git1/test-rec-zonetocache.cc:173:1 (testrunner+0x7a60a5)
    #9 boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /usr/include/boost/function/function_template.hpp:117:11 (testrunner+0x57dfab)
    #10 <null> <null> (libboost_unit_test_framework.so.1.74.0+0x323fd)
    #11 boost::execution_monitor::catch_signals(boost::function<int ()> const&) <null> (libboost_unit_test_framework.so.1.74.0+0x30b0c)
    #12 boost::execution_monitor::execute(boost::function<int ()> const&) <null> (libboost_unit_test_framework.so.1.74.0+0x30b90)
    #13 boost::execution_monitor::vexecute(boost::function<void ()> const&) <null> (libboost_unit_test_framework.so.1.74.0+0x30c60)
    #14 boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) <null> (libboost_unit_test_framework.so.1.74.0+0x5f1a0)
    #15 <null> <null> (libboost_unit_test_framework.so.1.74.0+0x37cdf)
    #16 <null> <null> (libboost_unit_test_framework.so.1.74.0+0x381d0)
    #17 <null> <null> (libboost_unit_test_framework.so.1.74.0+0x381d0)
    #18 boost::unit_test::framework::run(unsigned long, bool) <null> (libboost_unit_test_framework.so.1.74.0+0x3bf36)
    #19 boost::unit_test::unit_test_main(bool (*)(), int, char**) <null> (libboost_unit_test_framework.so.1.74.0+0x5e10d)
    #20 main /__w/pdns/pdns/pdns/recursordist/pdns-recursor-0.0.0-git1/testrunner.cc:84:10 (testrunner+0xc85591)
    #21 <null> <null> (libc.so.6+0x27249)
    #22 __libc_start_main <null> (libc.so.6+0x27304)
    #23 _start <null> (testrunner+0x1b79e0)
```

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 weeks agoTypo in comment 15705/head
Otto Moerbeek [Fri, 20 Jun 2025 10:48:45 +0000 (12:48 +0200)] 
Typo in comment

Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
7 weeks agoauth: rename bswap64 to pdns_bswap64.
Otto Moerbeek [Fri, 20 Jun 2025 10:44:48 +0000 (12:44 +0200)] 
auth: rename bswap64 to pdns_bswap64.

Using bswap64 causes infinite reursion if your system has a #define bswap64 __builtin_bswap64

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
7 weeks agodocumentation: DNSdist needs python-yaml 15703/head
Remi Gacogne [Fri, 20 Jun 2025 09:54:50 +0000 (11:54 +0200)] 
documentation: DNSdist needs python-yaml

7 weeks agodnsdist: Fix the documentation workflow
Remi Gacogne [Fri, 20 Jun 2025 09:43:18 +0000 (11:43 +0200)] 
dnsdist: Fix the documentation workflow

We need to generate the parts of the documentation sources that are no
longer present in the repository before building it.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 weeks agoMerge pull request #15701 from rgacogne/ddist-20-b1-changelog-secpoll
Remi Gacogne [Fri, 20 Jun 2025 09:32:42 +0000 (11:32 +0200)] 
Merge pull request #15701 from rgacogne/ddist-20-b1-changelog-secpoll

dnsdist: Update ChangeLog and security polling zone for 2.0.0-beta1

7 weeks agoMerge pull request #15700 from omoerbeek/coverity-20250620
Otto Moerbeek [Fri, 20 Jun 2025 08:23:31 +0000 (10:23 +0200)] 
Merge pull request #15700 from omoerbeek/coverity-20250620

Two Coverity issues, the truncation is meant to be

7 weeks agoTwo Coverity issues, the truncation is meant to be 15700/head
Otto Moerbeek [Fri, 20 Jun 2025 07:15:34 +0000 (09:15 +0200)] 
Two Coverity issues, the truncation is meant to be

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
7 weeks agoMerge pull request #15697 from Habbie/pickselfweighted-added-5 dnsdist-2.0.0-beta1
Peter van Dijk [Thu, 19 Jun 2025 15:24:09 +0000 (17:24 +0200)] 
Merge pull request #15697 from Habbie/pickselfweighted-added-5

auth docs: note that pickselfweighted() is new in auth 5

7 weeks agoauth docs: note that pickselfweighted() is new in auth 5 15697/head
Peter van Dijk [Thu, 19 Jun 2025 14:53:18 +0000 (16:53 +0200)] 
auth docs: note that pickselfweighted() is new in auth 5

7 weeks agoMerge pull request #15684 from PowerDNS/dependabot/pip/regression-tests.recursor...
Otto Moerbeek [Thu, 19 Jun 2025 14:17:38 +0000 (16:17 +0200)] 
Merge pull request #15684 from PowerDNS/dependabot/pip/regression-tests.recursor-dnssec/protobuf-5.29.5

build(deps): bump protobuf from 5.28.2 to 5.29.5 in /regression-tests.recursor-dnssec

7 weeks agoMerge pull request #15693 from miodvallat/rmdb
Miod Vallat [Thu, 19 Jun 2025 14:05:55 +0000 (16:05 +0200)] 
Merge pull request #15693 from miodvallat/rmdb

better rm in LMDB

7 weeks agodnsdist: Update ChangeLog and security polling zone for 2.0.0-beta1 15701/head
Remi Gacogne [Thu, 19 Jun 2025 13:41:34 +0000 (15:41 +0200)] 
dnsdist: Update ChangeLog and security polling zone for 2.0.0-beta1

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 weeks agoUse faster logic in deleteDomainRecords(). 15693/head
Miod Vallat [Thu, 19 Jun 2025 13:30:26 +0000 (15:30 +0200)] 
Use faster logic in deleteDomainRecords().

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
7 weeks agoMerge pull request #15692 from omoerbeek/rec-yaml-aliases
Otto Moerbeek [Thu, 19 Jun 2025 08:47:59 +0000 (10:47 +0200)] 
Merge pull request #15692 from omoerbeek/rec-yaml-aliases

rec: introduce aliases for camelCase field names

7 weeks agoMerge pull request #15690 from rgacogne/ddist-meta-api
Remi Gacogne [Thu, 19 Jun 2025 08:40:27 +0000 (10:40 +0200)] 
Merge pull request #15690 from rgacogne/ddist-meta-api

dnsdist: Add Lua APIs to set Meta tags in protobuf messages

7 weeks agodnsdist: Apply Otto's suggestions (thanks!) 15690/head
Remi Gacogne [Thu, 19 Jun 2025 07:56:07 +0000 (09:56 +0200)] 
dnsdist: Apply Otto's suggestions (thanks!)

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>