]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
4 weeks agoUpgrade check-spelling to v0.0.25 15577/head
Josh Soref [Tue, 20 May 2025 12:22:14 +0000 (08:22 -0400)] 
Upgrade check-spelling to v0.0.25

Refresh metadata based on
https://github.com/check-spelling/spell-check-this/commit/8749d8d8b30b5dfb272ae9b4579c07a8165fc273

- SARIF reporting is enabled by default
  - When active, public repositories will need to add a code scanning ruleset
  - For private repositories, unless you're using GHEC and paying for Advanced Security, you'll want to set a repository actions variable `DO_NOT_USE_SARIF_REPORTING` (see `/settings/variables/actions`) to `1` to disable SARIF

- Extend checking
  - `.rst` docs
  - pdns/dnsdistdist/dnsdist-settings-definitions.yml

4 weeks agospelling: www.linuxnetworks.de
Josh Soref [Tue, 20 May 2025 15:03:31 +0000 (11:03 -0400)] 
spelling: www.linuxnetworks.de

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: www.infosecinstitute.com
Josh Soref [Tue, 20 May 2025 15:35:32 +0000 (11:35 -0400)] 
spelling: www.infosecinstitute.com

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: www.gutenberg.org
Josh Soref [Tue, 20 May 2025 15:20:28 +0000 (11:20 -0400)] 
spelling: www.gutenberg.org

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: web.archive.org
Josh Soref [Tue, 20 May 2025 14:12:57 +0000 (10:12 -0400)] 
spelling: web.archive.org

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: was
Josh Soref [Tue, 20 May 2025 12:45:57 +0000 (08:45 -0400)] 
spelling: was

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: to
Josh Soref [Tue, 20 May 2025 12:53:00 +0000 (08:53 -0400)] 
spelling: to

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: sourceware.org
Josh Soref [Tue, 20 May 2025 15:14:29 +0000 (11:14 -0400)] 
spelling: sourceware.org

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: sourceforge.io
Josh Soref [Tue, 20 May 2025 15:13:14 +0000 (11:13 -0400)] 
spelling: sourceforge.io

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: setup,
Josh Soref [Tue, 20 May 2025 12:51:45 +0000 (08:51 -0400)] 
spelling: setup,

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: set up
Josh Soref [Tue, 20 May 2025 12:50:55 +0000 (08:50 -0400)] 
spelling: set up

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: restriction
Josh Soref [Tue, 20 May 2025 14:41:49 +0000 (10:41 -0400)] 
spelling: restriction

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: red hat
Josh Soref [Tue, 20 May 2025 12:46:12 +0000 (08:46 -0400)] 
spelling: red hat

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: pdns
Josh Soref [Tue, 20 May 2025 13:42:14 +0000 (09:42 -0400)] 
spelling: pdns

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: otherwise,
Josh Soref [Tue, 20 May 2025 12:45:06 +0000 (08:45 -0400)] 
spelling: otherwise,

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: or
Josh Soref [Tue, 1 Jul 2025 13:13:44 +0000 (09:13 -0400)] 
spelling: or

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: metronome.powerdns.com
Josh Soref [Tue, 20 May 2025 15:29:25 +0000 (11:29 -0400)] 
spelling: metronome.powerdns.com

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: mailarchive.ietf.org
Josh Soref [Tue, 20 May 2025 15:21:47 +0000 (11:21 -0400)] 
spelling: mailarchive.ietf.org

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: incompatibility
Josh Soref [Fri, 23 May 2025 12:05:16 +0000 (08:05 -0400)] 
spelling: incompatibility

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: https
Josh Soref [Tue, 20 May 2025 13:35:22 +0000 (09:35 -0400)] 
spelling: https

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: geoip backend
Josh Soref [Tue, 20 May 2025 13:20:39 +0000 (09:20 -0400)] 
spelling: geoip backend

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: for
Josh Soref [Tue, 20 May 2025 12:47:26 +0000 (08:47 -0400)] 
spelling: for

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: fall back
Josh Soref [Tue, 20 May 2025 12:49:23 +0000 (08:49 -0400)] 
spelling: fall back

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: export
Josh Soref [Tue, 20 May 2025 14:36:36 +0000 (10:36 -0400)] 
spelling: export

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: evanjones.ca
Josh Soref [Tue, 20 May 2025 15:16:03 +0000 (11:16 -0400)] 
spelling: evanjones.ca

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: equal
Josh Soref [Tue, 20 May 2025 12:48:43 +0000 (08:48 -0400)] 
spelling: equal

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: “edited_serial”
Josh Soref [Tue, 1 Jul 2025 13:13:12 +0000 (09:13 -0400)] 
spelling: “edited_serial”

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: big-endian
Josh Soref [Tue, 1 Jul 2025 13:12:31 +0000 (09:12 -0400)] 
spelling: big-endian

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: berthub.eu
Josh Soref [Tue, 20 May 2025 14:03:22 +0000 (10:03 -0400)] 
spelling: berthub.eu

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: bert-hubert.blogspot.com
Josh Soref [Tue, 20 May 2025 14:05:52 +0000 (10:05 -0400)] 
spelling: bert-hubert.blogspot.com

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: benchmarking
Josh Soref [Tue, 20 May 2025 13:28:00 +0000 (09:28 -0400)] 
spelling: benchmarking

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: addresses
Josh Soref [Tue, 20 May 2025 13:26:14 +0000 (09:26 -0400)] 
spelling: addresses

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: additional
Josh Soref [Tue, 20 May 2025 13:26:00 +0000 (09:26 -0400)] 
spelling: additional

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: a
Josh Soref [Tue, 20 May 2025 12:41:26 +0000 (08:41 -0400)] 
spelling: a

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: 8b1ed87
Josh Soref [Tue, 20 May 2025 13:52:34 +0000 (09:52 -0400)] 
spelling: 8b1ed87

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: 30
Josh Soref [Tue, 20 May 2025 13:43:29 +0000 (09:43 -0400)] 
spelling: 30

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: ; otherwise,
Josh Soref [Tue, 20 May 2025 12:31:02 +0000 (08:31 -0400)] 
spelling: ; otherwise,

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agospelling: , or
Josh Soref [Tue, 1 Jul 2025 13:14:54 +0000 (09:14 -0400)] 
spelling: , or

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agoRemove obsolete download links
Josh Soref [Tue, 20 May 2025 15:45:05 +0000 (11:45 -0400)] 
Remove obsolete download links

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
4 weeks agoMerge pull request #15758 from omoerbeek/rec-listen-v6-by-default
Otto Moerbeek [Tue, 1 Jul 2025 11:57:10 +0000 (13:57 +0200)] 
Merge pull request #15758 from omoerbeek/rec-listen-v6-by-default

rec: start to listen on ::1 by default, but don't consider it an error if that fails

4 weeks agoMerge pull request #15683 from PowerDNS/dependabot/pip/regression-tests.dnsdist/proto...
Remi Gacogne [Tue, 1 Jul 2025 11:08:23 +0000 (13:08 +0200)] 
Merge pull request #15683 from PowerDNS/dependabot/pip/regression-tests.dnsdist/protobuf-6.31.1

build(deps): bump protobuf from 6.30.2 to 6.31.1 in /regression-tests.dnsdist

4 weeks agoMerge pull request #15754 from rgacogne/ddist-warn-on-backend-certificate-validation...
Remi Gacogne [Tue, 1 Jul 2025 10:26:57 +0000 (12:26 +0200)] 
Merge pull request #15754 from rgacogne/ddist-warn-on-backend-certificate-validation-without-subject-name

dnsdist: Error if backend certificate validation is enabled without a subject name

4 weeks agoMerge pull request #15747 from rgacogne/ddist-get-object-from-yaml-config
Remi Gacogne [Tue, 1 Jul 2025 10:26:44 +0000 (12:26 +0200)] 
Merge pull request #15747 from rgacogne/ddist-get-object-from-yaml-config

dnsdist: Add a Lua binding to get objects declared in YAML

4 weeks agoOnly allow the failure if the incoming.listen settings is default 15758/head
Otto Moerbeek [Tue, 1 Jul 2025 09:51:10 +0000 (11:51 +0200)] 
Only allow the failure if the incoming.listen settings is default

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
4 weeks agorec: start to listen on ::1 by default, but don't consider it an error if it fails
Otto Moerbeek [Tue, 3 Jun 2025 14:56:38 +0000 (16:56 +0200)] 
rec: start to listen on ::1 by default, but don't consider it an error if it fails

4 weeks agoMerge pull request #15751 from rgacogne/ddist-yaml-error-on-unsupported-backend-protocol
Remi Gacogne [Tue, 1 Jul 2025 08:51:32 +0000 (10:51 +0200)] 
Merge pull request #15751 from rgacogne/ddist-yaml-error-on-unsupported-backend-protocol

dnsdist: Error on unsupported backend protocols from YAML

4 weeks agoMerge pull request #15755 from omoerbeek/rec-compile-docs
Otto Moerbeek [Tue, 1 Jul 2025 08:46:05 +0000 (10:46 +0200)] 
Merge pull request #15755 from omoerbeek/rec-compile-docs

rec: Mention meson in compile instructions

4 weeks agoMerge pull request #15707 from rgacogne/ddist-no-backend-crash
Remi Gacogne [Tue, 1 Jul 2025 08:12:48 +0000 (10:12 +0200)] 
Merge pull request #15707 from rgacogne/ddist-no-backend-crash

dnsdist: Prevent Lua bindings for backend from crashing on empty backend

4 weeks agodnsdist: Lowercase the TLS provider name for YAML-originated backends 15754/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>
4 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>
4 weeks agodnsdist: Add an explicit return type to getObjectFromYAMLConfiguration 15747/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>
4 weeks agoMerge pull request #15750 from rgacogne/ddist-fix-logging-yaml
Remi Gacogne [Tue, 1 Jul 2025 07:52:22 +0000 (09:52 +0200)] 
Merge pull request #15750 from rgacogne/ddist-fix-logging-yaml

dnsdist: Fix logging and XSK YAML settings being ignored

4 weeks agoMerge pull request #15718 from rgacogne/ddist-return-nil-for-non-existing-lua-objects
Remi Gacogne [Tue, 1 Jul 2025 07:51:55 +0000 (09:51 +0200)] 
Merge pull request #15718 from rgacogne/ddist-return-nil-for-non-existing-lua-objects

dnsdist: Return `nil` for non-existing Lua objects

4 weeks agorec: Mention meson in compile instructions 15755/head
Otto Moerbeek [Tue, 1 Jul 2025 07:23:00 +0000 (09:23 +0200)] 
rec: Mention meson in compile instructions

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
4 weeks agoMerge pull request #15752 from omoerbeek/rec-rustweb-vs-handler
Otto Moerbeek [Mon, 30 Jun 2025 18:28:03 +0000 (20:28 +0200)] 
Merge pull request #15752 from omoerbeek/rec-rustweb-vs-handler

rec: don't let rust code and handler use thread pipes simultaneously

4 weeks agodnsdist: Prevent Lua bindings for backend from crashing on empty backend 15707/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>
4 weeks agodnsdist: Fix logging and XSK YAML settings being ignored 15750/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>
4 weeks agodnsdist: Error on unsupported backend protocols from YAML 15751/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>
4 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>
4 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>
4 weeks agoMerge pull request #15745 from miodvallat/nsec3_to_deceive
Miod Vallat [Mon, 30 Jun 2025 14:34:51 +0000 (16:34 +0200)] 
Merge pull request #15745 from miodvallat/nsec3_to_deceive

"simple" lmdb code factoring

4 weeks agoMerge pull request #15753 from miodvallat/clever_breakage
Miod Vallat [Mon, 30 Jun 2025 14:34:04 +0000 (16:34 +0200)] 
Merge pull request #15753 from miodvallat/clever_breakage

Unbreak auth tests

4 weeks agoMerge pull request #15744 from bagasme/dnsdist-installing-update
Remi Gacogne [Mon, 30 Jun 2025 13:59:42 +0000 (15:59 +0200)] 
Merge pull request #15744 from bagasme/dnsdist-installing-update

dnsdist: Mention compiling with meson

4 weeks agoFix oracle after merge of #15417. 15753/head
Miod Vallat [Mon, 30 Jun 2025 13:27:19 +0000 (15:27 +0200)] 
Fix oracle after merge of #15417.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoMerge pull request #15748 from omoerbeek/rec-meson-python-version
Otto Moerbeek [Mon, 30 Jun 2025 13:25:13 +0000 (15:25 +0200)] 
Merge pull request #15748 from omoerbeek/rec-meson-python-version

rec meson: check python version to be at least 3.8

4 weeks agoMerge pull request #15417 from miodvallat/some_other_afternoon
Miod Vallat [Mon, 30 Jun 2025 12:58:57 +0000 (14:58 +0200)] 
Merge pull request #15417 from miodvallat/some_other_afternoon

[tools] Let pdnsutil always setup a SOA-EDIT-API metadata when creating zones

4 weeks agoMore logic worth factoring in getBeforeAndAfterNames(). 15745/head
Miod Vallat [Mon, 30 Jun 2025 12:54:14 +0000 (14:54 +0200)] 
More logic worth factoring in getBeforeAndAfterNames().

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoRewrite the now-deobfuscated logic into two getAfterForward calls.
Miod Vallat [Mon, 30 Jun 2025 10:53:08 +0000 (12:53 +0200)] 
Rewrite the now-deobfuscated logic into two getAfterForward calls.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agorec meson: check python version to be at least 3.8 15748/head
Otto Moerbeek [Mon, 30 Jun 2025 11:41:04 +0000 (13:41 +0200)] 
rec meson: check python version to be at least 3.8

Fixes #15732

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
4 weeks agoMerge pull request #15746 from omoerbeek/rec-fix-sysconf-debian
Otto Moerbeek [Mon, 30 Jun 2025 11:42:00 +0000 (13:42 +0200)] 
Merge pull request #15746 from omoerbeek/rec-fix-sysconf-debian

rec: Fix sysconfdir in debian packages built by meson

4 weeks agorec: don't let rust code and handler use thread pipes simultaneously 15752/head
Otto Moerbeek [Mon, 30 Jun 2025 11:02:35 +0000 (13:02 +0200)] 
rec: don't let rust code and handler use thread pipes simultaneously

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
4 weeks agoDeobfuscate a loop variable.
Miod Vallat [Mon, 30 Jun 2025 10:24:59 +0000 (12:24 +0200)] 
Deobfuscate a loop variable.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoFactor trailing code of getBeforeAndAfterNamesAbsolute(). NFCI
Miod Vallat [Mon, 30 Jun 2025 10:11:10 +0000 (12:11 +0200)] 
Factor trailing code of getBeforeAndAfterNamesAbsolute(). NFCI

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoRemove duplicate assignment.
Miod Vallat [Mon, 30 Jun 2025 09:44:53 +0000 (11:44 +0200)] 
Remove duplicate assignment.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoMerge pull request #15730 from renaudallard/patch-1
Otto Moerbeek [Mon, 30 Jun 2025 09:30:38 +0000 (11:30 +0200)] 
Merge pull request #15730 from renaudallard/patch-1

rec: Correct zonetocaches settings example

4 weeks agorec: Fix sysconfdir in debian packages built by meson 15746/head
Otto Moerbeek [Mon, 30 Jun 2025 07:54:23 +0000 (09:54 +0200)] 
rec: Fix sysconfdir in debian packages built by meson

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
4 weeks agodnsdist: Mention compiling with meson 15744/head
Bagas Sanjaya [Mon, 30 Jun 2025 04:37:49 +0000 (11:37 +0700)] 
dnsdist: Mention compiling with meson

While the installation docs covers building dnsdist with autotools and
GNU make, there is none for meson and ninja. Describe how to do the latter.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
4 weeks agoRewrite some for(;;) loops as while loops. NFC
Miod Vallat [Mon, 30 Jun 2025 06:58:06 +0000 (08:58 +0200)] 
Rewrite some for(;;) loops as while loops. NFC

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoFactor code checking for a NSEC3 back chain record.
Miod Vallat [Mon, 30 Jun 2025 06:54:29 +0000 (08:54 +0200)] 
Factor code checking for a NSEC3 back chain record.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoMerge pull request #15737 from rgacogne/dnsdist-resolver-same-number-different-ips
Remi Gacogne [Mon, 30 Jun 2025 07:52:03 +0000 (09:52 +0200)] 
Merge pull request #15737 from rgacogne/dnsdist-resolver-same-number-different-ips

dnsdist-resolver: Fix a bug when we get new IPs for a server

4 weeks agoMerge pull request #15739 from rgacogne/lmdb-safe-getmdbenv-race
Remi Gacogne [Mon, 30 Jun 2025 07:51:26 +0000 (09:51 +0200)] 
Merge pull request #15739 from rgacogne/lmdb-safe-getmdbenv-race

lmdb-safe: Fix a small race in `getMDBEnv`

4 weeks agoFactor code responsible for writing matching NSEC3 entries.
Miod Vallat [Mon, 30 Jun 2025 06:36:02 +0000 (08:36 +0200)] 
Factor code responsible for writing matching NSEC3 entries.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoMerge pull request #15735 from rgacogne/lmdb-safe-scalability
Remi Gacogne [Fri, 27 Jun 2025 19:56:55 +0000 (21:56 +0200)] 
Merge pull request #15735 from rgacogne/lmdb-safe-scalability

lmdb-safe: Improve the scalability of transaction maps

4 weeks agoMerge pull request #15738 from rgacogne/ddist-lmdb-use-getmdbenv
Remi Gacogne [Fri, 27 Jun 2025 19:55:12 +0000 (21:55 +0200)] 
Merge pull request #15738 from rgacogne/ddist-lmdb-use-getmdbenv

dnsdist: Prevent users from opening the same LMDB twice

4 weeks agolmdb-safe: Do not use strerror() which is not thread-safe 15739/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>
4 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>
4 weeks agodnsdist: Prevent users from opening the same LMDB twice 15738/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>
4 weeks agodnsdist-resolver: Fix a bug when we get new IPs for a server 15737/head
Remi Gacogne [Fri, 27 Jun 2025 14:09:18 +0000 (16:09 +0200)] 
dnsdist-resolver: Fix a bug when we get new IPs for a server

The `dnsdist-resolver` script regularly checks the IPs corresponding
to a backend `hostname`, and updates our backend accordingly:
- if an IP we previously received vanishes, it removes the backend
  corresponding to that IP
- if a new IP shows up, it adds a new backend

The existing code tries to avoid some work by keeping track of the
number of IPs associated to a given server, skipping the comparisons
of recently received IPs to existing ones if the number did not change.
This unfortunately does not work well if we get the same number of IPs
but with different IPs in the set.
This caused some backends to never get removed and stay along as ghosts,
as well as some new IPs to never be picked up.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
4 weeks agoMerge pull request #15727 from miodvallat/spaceships'r'us
Miod Vallat [Fri, 27 Jun 2025 13:35:07 +0000 (15:35 +0200)] 
Merge pull request #15727 from miodvallat/spaceships'r'us

Spaceships'r'us

4 weeks agoAdd a few comments. 15727/head
Miod Vallat [Fri, 27 Jun 2025 12:59:41 +0000 (14:59 +0200)] 
Add a few comments.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoMerge pull request #15731 from lucasRolff/master
Remi Gacogne [Fri, 27 Jun 2025 10:52:56 +0000 (12:52 +0200)] 
Merge pull request #15731 from lucasRolff/master

Add :getQueries() method to Server class

4 weeks agoMerge pull request #15617 from Habbie/views-no-delete
Peter van Dijk [Fri, 27 Jun 2025 10:52:00 +0000 (12:52 +0200)] 
Merge pull request #15617 from Habbie/views-no-delete

remove mistaken doc section - you cannot delete views

4 weeks agolmdb-safe: Use unordered maps for the transaction maps 15735/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>
4 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>
4 weeks agoMerge pull request #15733 from miodvallat/ENOSPC
Miod Vallat [Fri, 27 Jun 2025 09:06:06 +0000 (11:06 +0200)] 
Merge pull request #15733 from miodvallat/ENOSPC

Reduce ZoneName::toString mess

4 weeks agoadd test 15733/head
Peter van Dijk [Fri, 27 Jun 2025 07:41:36 +0000 (09:41 +0200)] 
add test

4 weeks agoRemove ZoneName::toStringFull() now that it is identical to toString().
Miod Vallat [Fri, 27 Jun 2025 06:35:02 +0000 (08:35 +0200)] 
Remove ZoneName::toStringFull() now that it is identical to toString().

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoLet ZoneName::toString*() output the variant, if any.
Miod Vallat [Fri, 27 Jun 2025 06:33:58 +0000 (08:33 +0200)] 
Let ZoneName::toString*() output the variant, if any.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoLet apiZoneNameToId() also encode the variant name, if any.
Miod Vallat [Fri, 27 Jun 2025 06:33:32 +0000 (08:33 +0200)] 
Let apiZoneNameToId() also encode the variant name, if any.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
4 weeks agoChange versionadded to 2.0.0 15731/head
Lucas Rolff [Fri, 27 Jun 2025 08:05:58 +0000 (10:05 +0200)] 
Change versionadded to 2.0.0

Co-authored-by: Remi Gacogne <github@coredump.fr>
Signed-off-by: Lucas Rolff <lucas@slcoding.com>