]>
git.ipfire.org Git - thirdparty/pdns.git/log
Remi Gacogne [Mon, 1 Sep 2025 10:22:55 +0000 (12:22 +0200)]
dnsdist: Test that the configuration is correctly reloaded
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
a139d6ddef76cabc203d0e9786110a6f3d3b3f2f )
Remi Gacogne [Mon, 1 Sep 2025 10:22:06 +0000 (12:22 +0200)]
dnsdist: Refresh configuration after `recv` which may have blocked for a long time
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
4f70dcdd60826448b4bcad5a44335de0c45dbeea )
Remi Gacogne [Mon, 8 Sep 2025 14:53:30 +0000 (16:53 +0200)]
Merge pull request #16096 from rgacogne/ddist20-backport-16082
dnsdist-2.0.x: Backport #16082 - Fix the IO reentry guard in outgoing DoH
Remi Gacogne [Fri, 5 Sep 2025 07:35:44 +0000 (09:35 +0200)]
dnsdist: Fix the IO reentry guard in outgoing DoH
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
81f0706bdf91c01ee26f8bb18315206af7a70b31 )
Remi Gacogne [Mon, 8 Sep 2025 13:47:18 +0000 (15:47 +0200)]
Merge pull request #16095 from rgacogne/ddist20-backport-16090
dnsdist-2.0.x: Backport 16090 - Fix access to frontends while in client mode
Remi Gacogne [Fri, 5 Sep 2025 14:38:49 +0000 (16:38 +0200)]
dnsdist: Fix access to frontends while in client mode
Since 2.0 we return `nil` instead of an object containing a `NULL`
pointer when the requested object does not exist, to make it possible
to check the validity of the returned object from `Lua`. It makes
sense in all contexts except when we are in client mode, because
then accessing the object in the remaining parts of the configuration
will trigger an error. Our DNS over HTTPS documentation itself contains
such a Lua configuration snippet, which is now broken.
This commit reverts back to sending an object containg a `NULL`
pointer when accessing the frontends in the client mode case.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
e6b9a30bbe1e198702308d9904d067eb89b646f1 )
Remi Gacogne [Mon, 8 Sep 2025 09:50:39 +0000 (11:50 +0200)]
Merge pull request #16093 from rgacogne/ddist20-backport-15737
dnsdist-2.0.x: Backport 15737 - dnsdist-resolver: Fix a bug when we get new IPs for a server
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>
(cherry picked from commit
e306ec7a085282893b93214a75ba3aac4d9435b4 )
Remi Gacogne [Fri, 5 Sep 2025 07:55:29 +0000 (09:55 +0200)]
Merge pull request #16080 from rgacogne/ddist20-backport-16015
dnsdist-2.0.x: Backport 16015 - Don't call `nghttp2_session_send` from a callback
Remi Gacogne [Fri, 5 Sep 2025 07:55:21 +0000 (09:55 +0200)]
Merge pull request #16081 from rgacogne/ddist20-backport-16064
dnsdist-2.0.x: Backport 16064 - Properly handle truncation for UDP responses sent via `sendmmsg`
Remi Gacogne [Mon, 1 Sep 2025 12:00:09 +0000 (14:00 +0200)]
dnsdist: Properly handle truncation for UDP responses sent via `sendmmsg`
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
bf06a3d6b2f517b0cf365e218c752548029ea4a6 )
Remi Gacogne [Fri, 22 Aug 2025 12:38:35 +0000 (14:38 +0200)]
dnsdist: Fix a typo is an exception message spotted by Miod
Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Remi Gacogne <github@coredump.fr>
(cherry picked from commit
28238ca3fb9fab245b90d912a30355567aa7266d )
Remi Gacogne [Fri, 22 Aug 2025 12:38:03 +0000 (14:38 +0200)]
dnsdist: Apply Miod's suggestion
Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Remi Gacogne <github@coredump.fr>
(cherry picked from commit
0cf2668a8c625f72944f682010befbe3089b9dd0 )
Remi Gacogne [Fri, 22 Aug 2025 12:22:29 +0000 (14:22 +0200)]
dnsdist: Fix clang-tidy warnings
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
baad31c2b9db48acd1874db743a1764beaa05931 )
Remi Gacogne [Fri, 22 Aug 2025 08:33:14 +0000 (10:33 +0200)]
dnsdist: Don't call `nghttp2_session_send` from a callback
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
a917d158c3f8994e84b38cacbaec5668b1745460 )
Remi Gacogne [Fri, 22 Aug 2025 07:57:57 +0000 (09:57 +0200)]
dnsdist: Fix a memory access violation in the nghttp2 unit tests
Calling `nghttp2_session_send` from a callback does not work well
when ``nghttp2_session_send`` ends up closing the current stream,
triggering a use-after-free.
It's not clear from the API documentation, but it is mentioned in
the programmers' guide's remarks:
> Do not call `nghttp2_session_send()`, `nghttp2_session_mem_send2()`,
`nghttp2_session_recv()` or `nghttp2_session_mem_recv2()` from the
nghttp2 callback functions directly or indirectly. It will lead to the
crash. You can submit requests or frames in the callbacks then call
these functions outside the callbacks.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
346d37abe3beedcec8c856ea4421311de4df1d24 )
Remi Gacogne [Fri, 29 Aug 2025 11:29:32 +0000 (13:29 +0200)]
Merge pull request #16053 from rgacogne/ddist20-backport-15874
dnsdist-2.0.x: Backport 15874 - Only check the freshness of the configuration when needed
Remi Gacogne [Thu, 28 Aug 2025 12:10:18 +0000 (14:10 +0200)]
Merge pull request #16052 from rgacogne/ddist20-backport-16043
dnsdist-2.0.x: Backport 16043 - Allow building wth gcc8, which needs -lstdc++fs as link argument
Remi Gacogne [Thu, 28 Aug 2025 12:10:01 +0000 (14:10 +0200)]
Merge pull request #16049 from rgacogne/ddist20-backport-16042
dnsdist-2.0.x: Backport 16042 - Don't increment in a potential macro argument
Remi Gacogne [Thu, 28 Aug 2025 09:38:49 +0000 (11:38 +0200)]
Merge pull request #16048 from rgacogne/ddist20-backport-16038
dnsdist-2.0.x: Backport 16038 - Add missing generated files to the dist tarball
Remi Gacogne [Mon, 25 Aug 2025 13:22:39 +0000 (15:22 +0200)]
dnsdist: Expose `refreshRuntimeConfiguration` to Lua
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
6ac7c5514aa28d63e0d46e06c4c37df4213585d4 )
Remi Gacogne [Fri, 22 Aug 2025 13:20:04 +0000 (15:20 +0200)]
dnsdist: Also refresh the configuration when `recvmmsg` is used
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
8539d039f68d7e7c256d2575191a364664ae882b )
Remi Gacogne [Tue, 29 Jul 2025 08:34:48 +0000 (10:34 +0200)]
dnsdist: Better config refresh logic in the TCP/DoH threads
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
51d2c34c0e209120a4692697a56e3a8bcaeb9af0 )
Remi Gacogne [Fri, 25 Jul 2025 14:28:56 +0000 (16:28 +0200)]
dnsdist: Ensure the runtime configuration is updated in the SNMP thread
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
a7da19df49ebd0745449eb206ca035a18500d251 )
Remi Gacogne [Thu, 17 Jul 2025 15:10:04 +0000 (17:10 +0200)]
dnsdist: Explicitly update the configuration thread-local copy
This commits ensures that all DNSdist threads are regularly checking
if there is a new version of the runtime-modifiable configuration and
update their local copy if necessary. Regular accesses to the copy
are now fully read-only, meaning they do not invalidate the current copy.
It prevents the case where a function is invalidating the copy that the
caller is holding, and makes accessing the configuration cheaper.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
c08ba9f1f2fe743c3e05313b2c329446e2e2d1b1 )
Otto Moerbeek [Thu, 28 Aug 2025 08:15:16 +0000 (10:15 +0200)]
dnsdist: allow building wth gcc8, which needs -lstdc++fs as link argument
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit
d74d63d0963bdb2790a95cfc6ef1564c1f176745 )
Remi Gacogne [Thu, 28 Aug 2025 09:11:31 +0000 (11:11 +0200)]
Merge pull request #16045 from rgacogne/ddist20-backport-16007
dnsdist-2.0.x: Backport 16007 - Add mitigations for the HTTP/2 MadeYouReset attack
Otto Moerbeek [Thu, 28 Aug 2025 07:53:53 +0000 (09:53 +0200)]
dnsdist: don't increment in a potential macro argument
Fixes g++ 8: ../dnsdist-crypto.cc:291:16: warning: operation on 'count' may be undefined [-Wsequence-point]
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit
6a269e10520ffd5431830e8c1ee87e464d458663 )
Remi Gacogne [Tue, 26 Aug 2025 11:58:54 +0000 (13:58 +0200)]
dnsdist: Add missing generated files to the dist tarball
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
847331c4fe8b55a704889e0861f4f95b5e9e163e )
Remi Gacogne [Mon, 25 Aug 2025 11:08:41 +0000 (13:08 +0200)]
dnsdist: Fix invalid log formatters spotted by Otto
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
36aeac05daeffcbc41443b47660982f65d73b7da )
Remi Gacogne [Thu, 21 Aug 2025 13:43:01 +0000 (15:43 +0200)]
dnsdist: Apply Miod and clang-tidy's suggestions
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
f2bee342a4b53cd4ea4896e280ccafeb9f24db34 )
Remi Gacogne [Mon, 28 Jul 2025 14:33:46 +0000 (16:33 +0200)]
dnsdist: Stop reading on incoming DoH sockets if we are done
If the underlying library doesn't want to read, we have nothing
to send at the moment, but we are still waiting for responses,
there is no need to keep polling the socket.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
e0a5a6dc4ab9557442ddbba56d03f6e4fb132bf2 )
Remi Gacogne [Mon, 28 Jul 2025 14:31:36 +0000 (16:31 +0200)]
dnsdist: Fix the accounting of "killed" streams
The way the nghttp2 library works means that we can get notified
that a stream has been closed while we are still in the function
sending the actual response. This is not a "killed" stream, but
just a regular closure.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
b81ed956d2f0b6bc538b34ee7e7ad304be233e7a )
Remi Gacogne [Fri, 20 Jun 2025 11:44:33 +0000 (13:44 +0200)]
dnsdist: Define `dnsdist::doh::MAX_INCOMING_CONCURRENT_STREAMS`
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
866c8f3fff753d3b2a03c1da50e8d53056880a46 )
Remi Gacogne [Thu, 19 Jun 2025 10:39:11 +0000 (12:39 +0200)]
dnsdist: Tentative h2o fix for MadeYouReset
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
2406bc461dbac384b07ed7dbb73a87def6354bd6 )
Remi Gacogne [Thu, 19 Jun 2025 09:18:27 +0000 (11:18 +0200)]
dnsdist: Enforce concurrent streams count for pending queries
The gist of the `MadeYouRest` attack is that streams can be reset
by the client, and thus no longer count towards the maximum number
of a streams as far as the library is concerned, while the server
is still processing the query and doing actual work.
This pull request introduces a counter for "killed but still being
processed streams" to prevent it.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
0214032c5f09fcfb440e5c5120f1491cb4f0fda4 )
Remi Gacogne [Mon, 25 Aug 2025 11:07:38 +0000 (13:07 +0200)]
Merge pull request #16032 from rgacogne/ddist20-backport-15881
dnsdist-2.0.x: Backport 15881 - Support mnemonics for the Opcode selector
Remi Gacogne [Mon, 25 Aug 2025 09:44:39 +0000 (11:44 +0200)]
Merge pull request #16031 from rgacogne/ddist20-backport-15817
dnsdist-2.0.x: Backport 15817: switch Docker images to Debian Trixie
Remi Gacogne [Mon, 25 Aug 2025 09:44:29 +0000 (11:44 +0200)]
Merge pull request #16030 from rgacogne/ddist20-backport-15915
dnsdist-2.0.x: Backport 15915: Properly set up env vars with meson
Remi Gacogne [Thu, 24 Jul 2025 09:11:24 +0000 (11:11 +0200)]
dns: Get rid of the ugly special case for OpCode 3
As suggested by Miod.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
b6898b5f3787e2528225fd5e22927f2e5ba3cc2b )
Remi Gacogne [Mon, 21 Jul 2025 09:56:47 +0000 (11:56 +0200)]
dnsdist: Support mnemonics for the Opcode selector
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
1a37caf4bcef0ad8362ce5b2bf8f01e90c81986d )
Remi Gacogne [Mon, 25 Aug 2025 09:18:59 +0000 (11:18 +0200)]
Merge pull request #16029 from rgacogne/ddist20-backport-15959
dnsdist-2.0.x: Backport 15959: dnsdist --version: report yaml support
Peter van Dijk [Thu, 10 Jul 2025 12:05:41 +0000 (14:05 +0200)]
switch Docker images to Debian Trixie
(cherry picked from commit
4a92c4bbda9c5a0d0b9b30865dff71d70226cfcf )
Otto Moerbeek [Thu, 24 Jul 2025 13:41:50 +0000 (15:41 +0200)]
rec and dnsdist: properly set up env vars
env.append() appends to an existing value
Should fix the error in #15896, but the reported location of cargo
still might be wrong.
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit
6d3c2334aa84258eaee409eb7e545eb67121a4a5 )
Peter van Dijk [Mon, 4 Aug 2025 11:56:05 +0000 (13:56 +0200)]
dnsdist --version: report yaml support
(cherry picked from commit
8ac38640efa2c90f1db59fddcd32cdb6c29d41db )
Remi Gacogne [Mon, 25 Aug 2025 07:35:29 +0000 (09:35 +0200)]
Merge pull request #16020 from rgacogne/ddist20-backport-15931
dnsdist-2.0.x: Backport 15931- Speed up response content matching
Remi Gacogne [Fri, 22 Aug 2025 13:46:57 +0000 (15:46 +0200)]
Merge pull request #16019 from rgacogne/ddist20-backport-15935
dnsdist-2.0.x: Backport 15935 - Clean up incoming TCP connections counters once per minute
Remi Gacogne [Fri, 22 Aug 2025 13:26:39 +0000 (15:26 +0200)]
Merge pull request #16018 from rgacogne/ddist20-backport-15904
dnsdist-2.0.x: Backport 15904 - Fix systemd template unit and restricted network families when building with meson
Remi Gacogne [Fri, 22 Aug 2025 13:16:01 +0000 (15:16 +0200)]
Merge pull request #16017 from rgacogne/ddist20-backport-15902
dnsdist-2.0.x: Backport 15902 - Fix QType rate dynamic block with YAML
Remi Gacogne [Thu, 21 Aug 2025 14:40:29 +0000 (16:40 +0200)]
Refactor `DNSName::matches` around `pdns_ilexicographical_compare_three_way`
And rename it to hopefully prevent any confusion regarding when it can be used.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
f78521d7f73d1f176602e33d03fae6e40fa86602 )
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
Remi Gacogne [Tue, 29 Jul 2025 07:45:33 +0000 (09:45 +0200)]
dnsdist: Yet another clang-tidy warning
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
aa5ca15a59efa4602efc5d78e17514dfe4edab16 )
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
Remi Gacogne [Mon, 28 Jul 2025 15:12:14 +0000 (17:12 +0200)]
dnsname: Fix clang-tidy warnings
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
afbae807a3dbb00b9ac8e20daa8b5bef353a1764 )
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
Remi Gacogne [Mon, 28 Jul 2025 09:29:40 +0000 (11:29 +0200)]
dnsname: Add a comment about what `DNSName::matches` accepts
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
7394dd09afce13c1cd287c2b63f8d129e8be22af )
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
Remi Gacogne [Fri, 25 Jul 2025 14:55:18 +0000 (16:55 +0200)]
dnsdist: Fix clang-tidy warnings
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
93e1cbbc014526ce4f39b54dd084cfa040980dbe )
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
Remi Gacogne [Fri, 25 Jul 2025 14:12:39 +0000 (16:12 +0200)]
dnsdist: Speed up response content matching
This commit introduces a new method to compare a `DNSName`
against a view of raw, wire-format bytes, skipping the
allocation and copy that is usually required to get a
second `DNSName` object to compare against.
This signifitcantly reduces the amount of time matching
a DNS response received from a backend against the content
we expect to find.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
67eb73850f3141c44963d95ef815fe6a0586d2a8 )
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
Remi Gacogne [Fri, 22 Aug 2025 13:11:40 +0000 (15:11 +0200)]
dnsdist-2.0.x: Backport pdns_ilexicographical_compare_three_way
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
Remi Gacogne [Thu, 21 Aug 2025 13:49:43 +0000 (15:49 +0200)]
dnsdist: Fix error in comment spotted by Otto (seconds -> minutes)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
e5a0cc4475cb668824d7d5a45086665f038f3b16 )
Remi Gacogne [Tue, 29 Jul 2025 07:55:38 +0000 (09:55 +0200)]
dnsdist: Fix clang-tidy warnings
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
d80362d7d2f1d50d0cd449b62ef7fdea4354eed3 )
Remi Gacogne [Mon, 28 Jul 2025 14:50:12 +0000 (16:50 +0200)]
dnsdist: Clean up incoming TCP connections counters once per minute
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
df406c37e23974d4fa1575dcf54ef53ef8276fa6 )
Remi Gacogne [Thu, 24 Jul 2025 09:42:03 +0000 (11:42 +0200)]
dnsdist: Fix restricted network families when building with meson
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
84da8caf2bb5e0c74f706b7248d9abf379485180 )
Remi Gacogne [Thu, 24 Jul 2025 09:41:38 +0000 (11:41 +0200)]
dnsdist: Fix systemd template unit when building with meson
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
b8b86d5644f46b2f07cd7f633cbfd98395ec8ec6 )
Remi Gacogne [Thu, 21 Aug 2025 11:20:21 +0000 (13:20 +0200)]
Merge pull request #16003 from rgacogne/ddist20-quiche-0.24.5
dnsdist-2.0.x: Backport 16002 - Update Cloudflare's Quiche to 0.24.5 in our packages
Remi Gacogne [Thu, 21 Aug 2025 08:12:11 +0000 (10:12 +0200)]
dnsdist: Update Cloudflare's Quiche to 0.24.5 in our packages
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
e9af7f9c2f9e2b8969fc6be7bc35d0de2decdb77 )
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
Remi Gacogne [Mon, 28 Jul 2025 07:34:23 +0000 (09:34 +0200)]
Merge pull request #15925 from rgacogne/ddist20-backport-15916
dnsdist-2.0.x: backport 15916 - Update rings' atomic counter without holding the lock
Remi Gacogne [Mon, 28 Jul 2025 07:33:34 +0000 (09:33 +0200)]
Merge pull request #15926 from rgacogne/ddist20-backport-15917
dnsdist-2.0.x: Backport 15917 - Return early when a rule chain is empty
Remi Gacogne [Mon, 28 Jul 2025 07:33:25 +0000 (09:33 +0200)]
Merge pull request #15927 from rgacogne/ddist20-backport-15918
dnsdist-2.0.x: Backport 15918 - Update a cache's atomic counter without holding the lock
Remi Gacogne [Mon, 28 Jul 2025 07:32:22 +0000 (09:32 +0200)]
Merge pull request #15920 from rgacogne/ddist20-upgrade-quiche
dnsdist-2.0.x: Upgrade Cloudflare's Quiche to 0.24.4
Remi Gacogne [Tue, 22 Jul 2025 09:18:38 +0000 (11:18 +0200)]
dnsdist: Update rings' atomic counter without holding the lock
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
f30e5ca0993defc6bacd5584d5ce19d32900d71d )
Remi Gacogne [Thu, 24 Jul 2025 14:02:39 +0000 (16:02 +0200)]
dnsdist: Update a cache's atomic counter without holding the lock
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
e579d8f2977f17efcf5f7f158500a9df53c2370d )
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 )
Remi Gacogne [Thu, 24 Jul 2025 09:17:04 +0000 (11:17 +0200)]
dnsdist: Apply Miod's suggestions (thanks!)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
3b6b96bdd38d6ef380140aa95702d9ab7e706b67 )
Remi Gacogne [Thu, 24 Jul 2025 08:57:28 +0000 (10:57 +0200)]
dnsdist: Fix QType rate dynamic block with YAML
The YAML configuration for the the "QType rate" dynamic block was
totally broken, trying to configure a rcode rate rule instead of a
qtype rate one.
Thanks to HellSpawn for reporting this the issue!
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit
eb01c11a5418da08d5e11acdd519e2816e937835 )
Remi Gacogne [Thu, 24 Jul 2025 14:49:52 +0000 (16:49 +0200)]
dnsdist: Upgrade Cloudflare's Quiche to 0.24.4
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
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
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
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
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()
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
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
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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
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
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 )
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 )
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 )
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
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
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
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`
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
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 )
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 )
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 )
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 )