]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
2 months agodnsdist: As suggested by Miod, add the date to the comment so we know when it is... 15557/head
Remi Gacogne [Sun, 18 May 2025 09:54:47 +0000 (11:54 +0200)] 
dnsdist: As suggested by Miod, add the date to the comment so we know when it is outdated

2 months agodnsdist: Fix backend discovery regression test on GH action (again)
Remi Gacogne [Thu, 15 May 2025 08:11:23 +0000 (10:11 +0200)] 
dnsdist: Fix backend discovery regression test on GH action (again)

Apparently IPv6 is very flaky on GH actions these days, and I see
this test failing again and again because DNSdist cannot reliably
reach the servers over IPv6. IPv4 is fine from GH actions, v4 and
v6 are fine locally, so let's not fail in that case.

2 months agoMerge pull request #15554 from rgacogne/ddist-fix-concurrent-connections-shards
Remi Gacogne [Tue, 13 May 2025 09:33:18 +0000 (11:33 +0200)] 
Merge pull request #15554 from rgacogne/ddist-fix-concurrent-connections-shards

dnsdist: Fix a crash in the TCP concurrent connections map

2 months agodnsdist: Fix a crash in the TCP concurrent connections map 15554/head
Remi Gacogne [Tue, 13 May 2025 07:20:22 +0000 (09:20 +0200)] 
dnsdist: Fix a crash in the TCP concurrent connections map

The bug was introduced in 99d1e8f044d43b9a75ffc70fed22ea674a9b7859.
Thanks to Robert Edmonds for finding, reporting and proposing a patch
fixing the issue!

2 months agoMerge pull request #15534 from rgacogne/ddist-fix-invalid-proxy-protocol-payload...
Remi Gacogne [Mon, 12 May 2025 12:22:34 +0000 (14:22 +0200)] 
Merge pull request #15534 from rgacogne/ddist-fix-invalid-proxy-protocol-payload-size

dnsdist: Only set the proxy protocol payload size when actually added

2 months agoMerge pull request #15539 from rgacogne/ddist-fix-set-api-writable
Remi Gacogne [Mon, 12 May 2025 10:18:41 +0000 (12:18 +0200)] 
Merge pull request #15539 from rgacogne/ddist-fix-set-api-writable

dnsdist: The second parameter to `setAPIWritable()` is optional

2 months agodnsdist: Add a regression test for "restart query w/o proxy protocol" 15534/head
Remi Gacogne [Mon, 12 May 2025 10:17:18 +0000 (12:17 +0200)] 
dnsdist: Add a regression test for "restart query w/o proxy protocol"

2 months agodnsdist: The PP mock backend has to copy the response before editing it
Remi Gacogne [Mon, 12 May 2025 10:16:37 +0000 (12:16 +0200)] 
dnsdist: The PP mock backend has to copy the response before editing it

2 months agodnsdist: Reset the PP payload size when resetting the payload (restart)
Remi Gacogne [Mon, 12 May 2025 10:15:24 +0000 (12:15 +0200)] 
dnsdist: Reset the PP payload size when resetting the payload (restart)

We fixed that for UDP backends in a previous commit, but this was still
an issue for TCP-based backends.

2 months agodnsdist: Apply better syntax suggestion from Otto (thanks) 15539/head
Remi Gacogne [Mon, 12 May 2025 08:58:42 +0000 (10:58 +0200)] 
dnsdist: Apply better syntax suggestion from Otto (thanks)

2 months agodnsdist: As suggested by Miod's, add the new payload size to the initial value of...
Remi Gacogne [Wed, 7 May 2025 12:56:23 +0000 (14:56 +0200)] 
dnsdist: As suggested by Miod's, add the new payload size to the initial value of zero

Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
2 months agodnsdist: Only set the proxy protocol payload size when actually added
Remi Gacogne [Wed, 7 May 2025 08:52:56 +0000 (10:52 +0200)] 
dnsdist: Only set the proxy protocol payload size when actually added

I can think of two cases where we got this wrong:
- the query was initially assigned to a backend using the proxy protocol
  payload, then later restarted and assigned to a backend not using it.
  The proxy protocol payload size was then kept from the first assignment.
- we failed to actually prepend the proxy protocol payload but the payload
  size was updated.

Both cases could cause a corrupted payload to be sent, or an exception to
be raised if the size of the proxy protocol payload was larger than the
size of the initial query.

2 months agodnsdist: The second parameter to `setAPIWritable()` is optional
Remi Gacogne [Wed, 7 May 2025 13:06:43 +0000 (15:06 +0200)] 
dnsdist: The second parameter to `setAPIWritable()` is optional

This was broken 93cd7bf30d and not noticed because our regression
tests provide the optional parameter.

2 months agoMerge pull request #15541 from rgacogne/ddist-gracefully-handle-missing-v6-in-backend...
Peter van Dijk [Thu, 8 May 2025 13:29:53 +0000 (15:29 +0200)] 
Merge pull request #15541 from rgacogne/ddist-gracefully-handle-missing-v6-in-backend-discovery

dnsdist: Gracefully handle missing v6 in backend discovery test

2 months agoMerge pull request #15544 from jpmens/patch-16
Otto Moerbeek [Thu, 8 May 2025 09:54:54 +0000 (11:54 +0200)] 
Merge pull request #15544 from jpmens/patch-16

typo in pdns_server manpage

2 months agotypo in pdns_server manpage 15544/head
Jan-Piet Mens [Thu, 8 May 2025 09:17:37 +0000 (11:17 +0200)] 
typo in pdns_server manpage

2 months agodnsdist: Be a bit more patient in the Backend Discovery test 15541/head
Remi Gacogne [Wed, 7 May 2025 15:00:28 +0000 (17:00 +0200)] 
dnsdist: Be a bit more patient in the Backend Discovery test

2 months agodnsdist: Gracefully handle missing v6 in backend discovery test
Remi Gacogne [Wed, 7 May 2025 14:18:25 +0000 (16:18 +0200)] 
dnsdist: Gracefully handle missing v6 in backend discovery test

This test has been randomly failing on GH actions lately, and it looks
like it is because we sometimes do not get the IPv6 addresses when
resolving `dns.quad9.net` via the system resolver.

2 months agoMerge pull request #15530 from miodvallat/CDXCV
Miod Vallat [Wed, 7 May 2025 10:32:55 +0000 (12:32 +0200)] 
Merge pull request #15530 from miodvallat/CDXCV

auth-4.9.5 changelog & secpoll update

2 months agoauth-4.9.5 changelog & secpoll update 15530/head
Miod Vallat [Mon, 28 Apr 2025 12:24:08 +0000 (14:24 +0200)] 
auth-4.9.5 changelog & secpoll update

2 months agoMerge pull request #15526 from rgacogne/ddist-deprecate-httpstatusaction-options
Remi Gacogne [Wed, 7 May 2025 07:23:20 +0000 (09:23 +0200)] 
Merge pull request #15526 from rgacogne/ddist-deprecate-httpstatusaction-options

dnsdist: Deprecate the `options` parameter of `HTTPStatusAction`

2 months agoMerge pull request #15528 from rgacogne/ddist-doc-fix-1.10-2.0.0
Remi Gacogne [Tue, 6 May 2025 15:36:30 +0000 (17:36 +0200)] 
Merge pull request #15528 from rgacogne/ddist-doc-fix-1.10-2.0.0

dnsdist: Fix references to 1.10 in the documentation: it's 2.0.0

2 months agoMerge pull request #15527 from rgacogne/ddist-fix-yaml-doc
Remi Gacogne [Tue, 6 May 2025 15:36:18 +0000 (17:36 +0200)] 
Merge pull request #15527 from rgacogne/ddist-fix-yaml-doc

dnsdist: Fix outdated YAML settings documentation

2 months agodnsdist: Fix references to 1.10 in the documentation: it's 2.0.0 15528/head
Remi Gacogne [Tue, 6 May 2025 13:51:10 +0000 (15:51 +0200)] 
dnsdist: Fix references to 1.10 in the documentation: it's 2.0.0

2 months agodnsdist: Fix outdated YAML settings documentation 15527/head
Remi Gacogne [Tue, 6 May 2025 13:45:19 +0000 (15:45 +0200)] 
dnsdist: Fix outdated YAML settings documentation

The version present in our repository was not in sync with recently
made changes.

2 months agodnsdist: Deprecate the `options` parameter of `HTTPStatusAction` 15526/head
Remi Gacogne [Tue, 6 May 2025 13:07:31 +0000 (15:07 +0200)] 
dnsdist: Deprecate the `options` parameter of `HTTPStatusAction`

As noted in #14791, it is probably not working as expected and there
is no practical use for it anyway.

2 months agoMerge pull request #15525 from omoerbeek/protozero-upgrade
Otto Moerbeek [Tue, 6 May 2025 10:13:16 +0000 (12:13 +0200)] 
Merge pull request #15525 from omoerbeek/protozero-upgrade

Upgrade to protozero 1.8.0

2 months agoUpgrade to protozero 1.8.0: https://github.com/mapbox/protozero/releases/tag/v1.8.0 15525/head
Otto Moerbeek [Tue, 6 May 2025 08:20:35 +0000 (10:20 +0200)] 
Upgrade to protozero 1.8.0: https://github.com/mapbox/protozero/releases/tag/v1.8.0

2 months agoMerge pull request #15518 from Habbie/tsig-lowercase
Peter van Dijk [Tue, 6 May 2025 08:07:56 +0000 (10:07 +0200)] 
Merge pull request #15518 from Habbie/tsig-lowercase

TSIG payload: use canonical (lowercase) name format

2 months agoMerge pull request #15521 from rgacogne/ddist-fix-libedit-meson
Remi Gacogne [Mon, 5 May 2025 11:58:48 +0000 (13:58 +0200)] 
Merge pull request #15521 from rgacogne/ddist-fix-libedit-meson

dnsdist: Don't build with `libedit` if disabled via `meson`

2 months agoMerge pull request #15520 from rgacogne/fix-gcc151-build
Remi Gacogne [Mon, 5 May 2025 09:17:57 +0000 (11:17 +0200)] 
Merge pull request #15520 from rgacogne/fix-gcc151-build

Fix building with GCC 15.1: missing `cstdint` include

2 months agodnsdist: Don't build with `libedit` if disabled via `meson` 15521/head
Remi Gacogne [Mon, 5 May 2025 09:05:39 +0000 (11:05 +0200)] 
dnsdist: Don't build with `libedit` if disabled via `meson`

Based on a patch by Robert Edmonds (thanks!).

2 months agoFix building with GCC 15.1: missing `cstdint` include 15520/head
Remi Gacogne [Mon, 5 May 2025 08:42:20 +0000 (10:42 +0200)] 
Fix building with GCC 15.1: missing `cstdint` include

GCC 15.1 complains about a missing `cstdint` include when building
`DNSdist`:
```
In file included from ../doh3.hh:29,
                 from ../doh3.cc:23:
../noinitvector.hh:67:35: error: ‘uint8_t’ was not declared in this scope
   67 | using PacketBuffer = NoInitVector<uint8_t>;
      |                                   ^~~~~~~
../noinitvector.hh:7:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
    6 | #include <vector>
  +++ |+#include <cstdint>
    7 |
../noinitvector.hh:67:42: error: template argument 1 is invalid
   67 | using PacketBuffer = NoInitVector<uint8_t>;
      |                                          ^
In file included from ../dnsdist-idstate.hh:27,
                 from ../doh3.hh:48:
../dnscrypt.hh:247:20: error: ‘PacketBuffer’ has not been declared
  247 |   void parsePacket(PacketBuffer& packet, bool tcp, time_t now);
      |                    ^~~~~~~~~~~~
../dnscrypt.hh:248:31: error: ‘PacketBuffer’ has not been declared
  248 |   void getDecrypted(bool tcp, PacketBuffer& packet);
      |                               ^~~~~~~~~~~~
../dnscrypt.hh:249:43: error: ‘PacketBuffer’ has not been declared
  249 |   void getCertificateResponse(time_t now, PacketBuffer& response) const;
      |                                           ^~~~~~~~~~~~
../dnscrypt.hh:250:23: err
```

2 months agoMerge pull request #15477 from nokia/master
Remi Gacogne [Mon, 5 May 2025 07:41:55 +0000 (09:41 +0200)] 
Merge pull request #15477 from nokia/master

dnsdist: Provide runtime update API for some health check params

2 months agoMerge pull request #15474 from miodvallat/apollo
Miod Vallat [Mon, 5 May 2025 05:53:50 +0000 (07:53 +0200)] 
Merge pull request #15474 from miodvallat/apollo

Use a unique type for domain ids

2 months agoUse new domainid_t type for domain ids. 15474/head
Miod Vallat [Fri, 25 Apr 2025 13:16:17 +0000 (15:16 +0200)] 
Use new domainid_t type for domain ids.

Also use UnknownDomainID instead of -1.

Update all users, remove casts and lint conversion annotations.

3 months agoTSIG payload: use canonical (lowercase) name format 15518/head
Peter van Dijk [Sun, 4 May 2025 14:21:38 +0000 (16:21 +0200)] 
TSIG payload: use canonical (lowercase) name format

3 months agoMerge pull request #15514 from rgacogne/ddist-fix-getaddrinfo-crash
Remi Gacogne [Thu, 1 May 2025 10:50:33 +0000 (12:50 +0200)] 
Merge pull request #15514 from rgacogne/ddist-fix-getaddrinfo-crash

dnsdist: Fix memory corruption when using `getAddressInfo`

3 months agoMerge pull request #15513 from miodvallat/attrnone
Miod Vallat [Wed, 30 Apr 2025 14:51:55 +0000 (16:51 +0200)] 
Merge pull request #15513 from miodvallat/attrnone

[trivial] Remove dead data

3 months agodnsdist: Fix memory corruption when using `getAddressInfo` 15514/head
Remi Gacogne [Wed, 30 Apr 2025 14:51:04 +0000 (16:51 +0200)] 
dnsdist: Fix memory corruption when using `getAddressInfo`

The object holding the callback function, which is translated into
a `LuaContext::LuaFunctionCaller`, needs to be destroyed while holding
the Lua mutex because it will unregister itself from the Lua context,
causing a corruption if a different thread is accessing the Lua context
at the same time.

3 months agoMove ldap_attrany[] definition from a header file to its only user. 15513/head
Miod Vallat [Wed, 30 Apr 2025 13:17:34 +0000 (15:17 +0200)] 
Move ldap_attrany[] definition from a header file to its only user.

3 months agoHappy source code formatting verification tool 15477/head
Oliver Chen [Wed, 30 Apr 2025 14:00:14 +0000 (14:00 +0000)] 
Happy source code formatting verification tool

3 months agoCorrect indentation in documentation
Oliver Chen [Wed, 30 Apr 2025 12:57:29 +0000 (12:57 +0000)] 
Correct indentation in documentation

3 months agoMerge pull request #15509 from rgacogne/ddist-doc-get-incoming-interface
Remi Gacogne [Wed, 30 Apr 2025 11:45:05 +0000 (13:45 +0200)] 
Merge pull request #15509 from rgacogne/ddist-doc-get-incoming-interface

dnsdist: Document that DNSQuestion::getIncomingInterface was backported

3 months agodnsdist: Document that DNSQuestion::getIncomingInterface was backported 15509/head
Remi Gacogne [Wed, 30 Apr 2025 11:03:24 +0000 (13:03 +0200)] 
dnsdist: Document that DNSQuestion::getIncomingInterface was backported

3 months agoMerge pull request #15496 from rgacogne/ddist-fix-building-without-ssl
Remi Gacogne [Wed, 30 Apr 2025 09:41:46 +0000 (11:41 +0200)] 
Merge pull request #15496 from rgacogne/ddist-fix-building-without-ssl

dnsdist: Fix building with YAML enabled but without TLS support

3 months agodnsdist: Fix a few "unused parameter" warnings without dnstap support 15496/head
Remi Gacogne [Wed, 30 Apr 2025 08:49:58 +0000 (10:49 +0200)] 
dnsdist: Fix a few "unused parameter" warnings without dnstap support

3 months agodnsdist: Fix building with YAML enabled but without TLS support
Remi Gacogne [Wed, 30 Apr 2025 08:49:06 +0000 (10:49 +0200)] 
dnsdist: Fix building with YAML enabled but without TLS support

Based on a patch from Robert Edmonds, thanks!

3 months agoMerge pull request #15470 from miodvallat/friday_combing
Miod Vallat [Wed, 30 Apr 2025 05:46:54 +0000 (07:46 +0200)] 
Merge pull request #15470 from miodvallat/friday_combing

More low-hanging fruits from the views work

3 months agoUse atomic type for potential read/write race condition
Oliver Chen [Wed, 30 Apr 2025 03:40:22 +0000 (03:40 +0000)] 
Use atomic type for potential read/write race condition

Only a few numerical healthcheck parameters are selected,
and changed to use atomic type for those parameters so as to
avoid potential read/write race conditions.

3 months agoMerge pull request #15487 from romeroalx/update-packaging-version
Alexis Romero [Tue, 29 Apr 2025 15:48:11 +0000 (17:48 +0200)] 
Merge pull request #15487 from romeroalx/update-packaging-version

Docs: update Python3 dependencies to fix CI failure

3 months agoMerge pull request #15409 from rgacogne/ddist-ssl-switch-sni
Remi Gacogne [Tue, 29 Apr 2025 12:57:29 +0000 (14:57 +0200)] 
Merge pull request #15409 from rgacogne/ddist-ssl-switch-sni

dnsdist: Add support for switching certificates based on SNI w/ OpenSSL

3 months agoMerge pull request #15463 from rgacogne/ddist-fix-getdnscryptbind
Remi Gacogne [Tue, 29 Apr 2025 12:56:54 +0000 (14:56 +0200)] 
Merge pull request #15463 from rgacogne/ddist-fix-getdnscryptbind

dnsdist: Fix a confusion about contexts/frontends in `getDNSCryptBind`

3 months agoMerge pull request #15489 from rgacogne/fix-advisory-dnsdist-2022-02
Remi Gacogne [Tue, 29 Apr 2025 11:13:45 +0000 (13:13 +0200)] 
Merge pull request #15489 from rgacogne/fix-advisory-dnsdist-2022-02

dnsdist: Fix syntax of advisory 2025-02

3 months agodnsdist: Fix syntax of advisory 2025-02 15489/head
Remi Gacogne [Tue, 29 Apr 2025 11:06:11 +0000 (13:06 +0200)] 
dnsdist: Fix syntax of advisory 2025-02

3 months agoMerge pull request #15488 from rgacogne/ddist-changelog-secpoll-1.9.9
Remi Gacogne [Tue, 29 Apr 2025 10:51:50 +0000 (12:51 +0200)] 
Merge pull request #15488 from rgacogne/ddist-changelog-secpoll-1.9.9

dnsdist: Update ChangeLog and secpoll for DNSdist 1.9.9

3 months agoFix advisory path, spelling 15488/head
Remi Gacogne [Tue, 29 Apr 2025 10:31:37 +0000 (12:31 +0200)] 
Fix advisory path, spelling

3 months agospell-check: Allow CWE
Remi Gacogne [Tue, 29 Apr 2025 10:23:42 +0000 (12:23 +0200)] 
spell-check: Allow CWE

3 months agodnsdist: Update ChangeLog and secpoll for DNSdist 1.9.9
Remi Gacogne [Tue, 29 Apr 2025 08:20:42 +0000 (10:20 +0200)] 
dnsdist: Update ChangeLog and secpoll for DNSdist 1.9.9

3 months agodnsdist: Fix typos reported by Josh Soref (thanks!) 15409/head
Remi Gacogne [Tue, 29 Apr 2025 09:21:37 +0000 (11:21 +0200)] 
dnsdist: Fix typos reported by Josh Soref (thanks!)

3 months agolibssl: Properly handle the different return types of `sk_GENERAL_NAME_num`
Remi Gacogne [Tue, 29 Apr 2025 09:20:46 +0000 (11:20 +0200)] 
libssl: Properly handle the different return types of `sk_GENERAL_NAME_num`

3 months agodocs: update python dependencies 15487/head
romeroalx [Tue, 29 Apr 2025 09:17:31 +0000 (11:17 +0200)] 
docs: update python dependencies

3 months agodnsdist: Document the return value of `DNSCryptContext::generateAndLoadInMemoryCertif... 15463/head
Remi Gacogne [Tue, 29 Apr 2025 08:57:02 +0000 (10:57 +0200)] 
dnsdist: Document the return value of `DNSCryptContext::generateAndLoadInMemoryCertificate`

3 months agoMerge pull request #15431 from rgacogne/ddist-resume-health-checks-really
Remi Gacogne [Mon, 28 Apr 2025 16:02:39 +0000 (18:02 +0200)] 
Merge pull request #15431 from rgacogne/ddist-resume-health-checks-really

dnsdist: Be consistent with regard to health-check modes transition

3 months agoMerge pull request #15440 from omoerbeek/quiche-soname
Otto Moerbeek [Mon, 28 Apr 2025 12:40:44 +0000 (14:40 +0200)] 
Merge pull request #15440 from omoerbeek/quiche-soname

If SONAME is present in the generated quiche lib set it to the correct value

3 months agoUse grep -F instead of fgrep 15440/head
Otto Moerbeek [Mon, 28 Apr 2025 12:08:48 +0000 (14:08 +0200)] 
Use grep -F instead of fgrep

Co-authored-by: Remi Gacogne <github@coredump.fr>
3 months agoMerge pull request #15481 from rgacogne/ddist-fix-closed-doh-stream
Remi Gacogne [Mon, 28 Apr 2025 12:05:03 +0000 (14:05 +0200)] 
Merge pull request #15481 from rgacogne/ddist-fix-closed-doh-stream

dnsdist: Gracefully handle timeout/response for a closed HTTP stream

3 months agoMerge pull request #15480 from rgacogne/ddist-fix-doh-timeout-double-f
Remi Gacogne [Mon, 28 Apr 2025 12:02:27 +0000 (14:02 +0200)] 
Merge pull request #15480 from rgacogne/ddist-fix-doh-timeout-double-f

dnsdist: Fix a crash when processing timeouts for incoming DoH queries

3 months agoMerge pull request #15435 from omoerbeek/rec-lua-getconfig
Otto Moerbeek [Mon, 28 Apr 2025 11:41:57 +0000 (13:41 +0200)] 
Merge pull request #15435 from omoerbeek/rec-lua-getconfig

rec: add a Lua function to get the config dir and name

3 months agoMerge pull request #15455 from omoerbeek/rec-docs-yaml
Otto Moerbeek [Mon, 28 Apr 2025 11:41:34 +0000 (13:41 +0200)] 
Merge pull request #15455 from omoerbeek/rec-docs-yaml

rec docs: prefer ref to YAML settings and show sections in YAML snippets

3 months agodnsdist: Gracefully handle timeout/response for a closed HTTP stream 15481/head
Remi Gacogne [Mon, 28 Apr 2025 10:47:39 +0000 (12:47 +0200)] 
dnsdist: Gracefully handle timeout/response for a closed HTTP stream

The remote end might very well have already closed the HTTP stream
corresponding to the timeout or response we are processing. While
this means we need to discard the event we were processing, it is
not an unexpected event and we should thus not raise an exception
since the caller cannot do anything about it.

3 months agodnsdist: Fix a crash when processing timeouts for incoming DoH queries 15480/head
Remi Gacogne [Mon, 28 Apr 2025 10:41:00 +0000 (12:41 +0200)] 
dnsdist: Fix a crash when processing timeouts for incoming DoH queries

This commit fixes a double-free triggered by an exception being raised
while we are processing a timeout for an incoming DoH query. The exception
bypasses the call releasing the smart pointer, and thus the destructor
is called when we reach the end of the function since we own the smart
pointer, but unfortunately it has already been destroyed by the function
that raised the exception. The fix is to release the pointer first,
then call the function, so even if an exception is raised we no longer
own the pointer, and it's clear that the function has taken ownership of it.

3 months agodnsdist: Fix clang-tidy warnings 15431/head
Remi Gacogne [Tue, 15 Apr 2025 08:56:09 +0000 (10:56 +0200)] 
dnsdist: Fix clang-tidy warnings

3 months agodnsdist: Fix typos spotted by Miod in the documentation
Remi Gacogne [Tue, 15 Apr 2025 08:06:31 +0000 (10:06 +0200)] 
dnsdist: Fix typos spotted by Miod in the documentation

Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
3 months agodnsdist: Be consistent with regard to health-check modes transition
Remi Gacogne [Mon, 14 Apr 2025 15:28:28 +0000 (17:28 +0200)] 
dnsdist: Be consistent with regard to health-check modes transition

Calling `setAuto()` on a backend used to set the health-check mode
to `active`, even if it had been set to `lazy` before, which was
quite confusing.
This commit introduces a new method, `setAutoActive()` which can
be used to change the health-check mode to `active`, and alters the
behaviour of `setAuto()` to restore the previous health-check mode
instead. This is a breaking change but since the default health-check
mode is `active` I don't expect to break any existing configurations.
It also introduces a new method, `getHealthCheckMode()`, to inspect
the current mode.

3 months agoMerge pull request #15438 from rgacogne/ddist-fix-quic-freebsd-2
Remi Gacogne [Mon, 28 Apr 2025 08:50:02 +0000 (10:50 +0200)] 
Merge pull request #15438 from rgacogne/ddist-fix-quic-freebsd-2

dnsdist: Only pass source addresses on sockets bound to ANY

3 months agoMerge pull request #15473 from rgacogne/ddist-fix-tcp-limits-test
Remi Gacogne [Mon, 28 Apr 2025 07:36:36 +0000 (09:36 +0200)] 
Merge pull request #15473 from rgacogne/ddist-fix-tcp-limits-test

dnsdist: Fix spurious failure of the TCP limits regression tests

3 months agoRemove no use code in the test file
Oliver Chen [Sun, 27 Apr 2025 11:01:35 +0000 (11:01 +0000)] 
Remove no use code in the test file

3 months agoProvide runtime update API for some health check params
Oliver Chen [Sun, 27 Apr 2025 03:55:33 +0000 (03:55 +0000)] 
Provide runtime update API for some health check params

3 months agodnsdist: Fix spurious failure of the TCP limits regression tests 15473/head
Remi Gacogne [Fri, 25 Apr 2025 14:55:11 +0000 (16:55 +0200)] 
dnsdist: Fix spurious failure of the TCP limits regression tests

The "maximum duration" test used to trigger the maximum number of
TCP read IOs, preventing the next test from being run. This commit
sets the maximum number of TCP read IOs to "unlimited" for this test.

3 months agodnsdist: Allow setting an unlimited number of TCP read IOs (`0`)
Remi Gacogne [Fri, 25 Apr 2025 14:54:23 +0000 (16:54 +0200)] 
dnsdist: Allow setting an unlimited number of TCP read IOs (`0`)

3 months agodrop upgradeToSchemav3 15470/head
Peter van Dijk [Fri, 25 Apr 2025 08:30:11 +0000 (10:30 +0200)] 
drop upgradeToSchemav3

3 months agoUse string_view to avoid new string creation...
Miod Vallat [Fri, 25 Apr 2025 08:28:23 +0000 (10:28 +0200)] 
Use string_view to avoid new string creation...

...in apiCheckQNameAllowedCharacters().

3 months agodnsdist: Only pass source addresses on sockets bound to ANY 15438/head
Remi Gacogne [Tue, 15 Apr 2025 08:34:47 +0000 (10:34 +0200)] 
dnsdist: Only pass source addresses on sockets bound to ANY

FreeBSD refuses the use of `IP_SENDSRCADDR` on a socket that is
bound to a specific address, returning `EINVAL` in that case.

3 months agodnsdist: Test that we can iterate on DNSCrypt binds and reload their certificates
Remi Gacogne [Thu, 24 Apr 2025 13:04:35 +0000 (15:04 +0200)] 
dnsdist: Test that we can iterate on DNSCrypt binds and reload their certificates

3 months agodnsdist: Add a return value when generating and loading a DNSCrypt certificate
Remi Gacogne [Thu, 24 Apr 2025 13:03:18 +0000 (15:03 +0200)] 
dnsdist: Add a return value when generating and loading a DNSCrypt certificate

3 months agodnsdist: Fix a confusion about contexts/frontends in `getDNSCryptBind`
Remi Gacogne [Thu, 24 Apr 2025 12:57:34 +0000 (14:57 +0200)] 
dnsdist: Fix a confusion about contexts/frontends in `getDNSCryptBind`

We internally keep two different frontends (UDP and TCP) for DNSCrypt
configuration binds, but the frontends should not be exposed to the user.
`getDNSCryptBind` should return distinct DNSCrypt contexts, one per
DNSCrypt configuration bind. This was broken during the refactoring
of how frontends are internally kept.

3 months agoMerge pull request #15471 from rgacogne/ddist-fix-crash-removing-tcponly-server
Remi Gacogne [Fri, 25 Apr 2025 11:26:42 +0000 (13:26 +0200)] 
Merge pull request #15471 from rgacogne/ddist-fix-crash-removing-tcponly-server

dnsdist: Fix an iterator out-of-bound read when removing a TCP-only server

3 months agoVarious move vs copy improvements pointed by Coverity.
Miod Vallat [Fri, 25 Apr 2025 07:39:38 +0000 (09:39 +0200)] 
Various move vs copy improvements pointed by Coverity.

3 months agodnsdist: Fix an iterator out-of-bound read when removing a TCP-only server 15471/head
Remi Gacogne [Fri, 25 Apr 2025 10:14:04 +0000 (12:14 +0200)] 
dnsdist: Fix an iterator out-of-bound read when removing a TCP-only server

Introduced in https://github.com/PowerDNS/pdns/pull/15418

3 months agoMerge pull request #15468 from miodvallat/growing_up_the_hard_way
Miod Vallat [Fri, 25 Apr 2025 08:25:40 +0000 (10:25 +0200)] 
Merge pull request #15468 from miodvallat/growing_up_the_hard_way

Document mysql foreign keys being incompatible with group replication

3 months agoMerge pull request #15462 from rgacogne/ddist-fix-tcplimits-readio-test
Remi Gacogne [Fri, 25 Apr 2025 08:18:46 +0000 (10:18 +0200)] 
Merge pull request #15462 from rgacogne/ddist-fix-tcplimits-readio-test

dnsdist: Properly handle buffering in the "max read IOs" test

3 months agoMerge pull request #15467 from nokia/master
Remi Gacogne [Fri, 25 Apr 2025 07:53:00 +0000 (09:53 +0200)] 
Merge pull request #15467 from nokia/master

dnsdist: Add indicator for cache hit rules to know if hit a stale entry

3 months agoMerge pull request #15465 from jsoref/improve-descriptions
Remi Gacogne [Fri, 25 Apr 2025 07:30:56 +0000 (09:30 +0200)] 
Merge pull request #15465 from jsoref/improve-descriptions

Remove period

3 months agoMention foreign keys constraints are incompatible with group replication. 15468/head
Miod Vallat [Fri, 25 Apr 2025 05:27:30 +0000 (07:27 +0200)] 
Mention foreign keys constraints are incompatible with group replication.

3 months agoFix clang-tidy warning of inconsistent parameter name 15467/head
Oliver Chen [Fri, 25 Apr 2025 02:27:39 +0000 (02:27 +0000)] 
Fix clang-tidy warning of inconsistent parameter name

3 months agoFix clang-tidy warning of too short parameter name
Oliver Chen [Fri, 25 Apr 2025 01:49:52 +0000 (01:49 +0000)] 
Fix clang-tidy warning of too short parameter name

3 months agoAdd indicator for cache hit rules to know if hit a stale entry
Oliver Chen [Fri, 25 Apr 2025 01:04:25 +0000 (01:04 +0000)] 
Add indicator for cache hit rules to know if hit a stale entry

3 months agoRemove period 15465/head
Josh Soref [Thu, 24 Apr 2025 14:35:00 +0000 (10:35 -0400)] 
Remove period

3 months agoMerge pull request #15439 from nokia/master
Remi Gacogne [Thu, 24 Apr 2025 13:52:41 +0000 (15:52 +0200)] 
Merge pull request #15439 from nokia/master

dnsdist: Support DSCP marking towards downstream server