]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
7 months agodnsdist: Allow selecting a specific version of Lua with meson 16256/head
Remi Gacogne [Mon, 13 Oct 2025 14:54:07 +0000 (16:54 +0200)] 
dnsdist: Allow selecting a specific version of Lua with meson

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 months agoiputils: Make static addresses static in `ComboAddress::isUnspecified`
Remi Gacogne [Mon, 13 Oct 2025 14:44:15 +0000 (16:44 +0200)] 
iputils: Make static addresses static in `ComboAddress::isUnspecified`

Prevent having to instantiate them again and again, as suggested by
Otto.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 months agoMerge pull request #16244 from rgacogne/ddist-dnsheader-timeout-response
Remi Gacogne [Mon, 13 Oct 2025 14:24:35 +0000 (16:24 +0200)] 
Merge pull request #16244 from rgacogne/ddist-dnsheader-timeout-response

dnsdist: Set up the dns header for timeout response rules

7 months agodnsdist: Fix a memory link with OCSP and OpenSSL 3.6.0
Remi Gacogne [Mon, 13 Oct 2025 14:18:13 +0000 (16:18 +0200)] 
dnsdist: Fix a memory link with OCSP and OpenSSL 3.6.0

See https://github.com/openssl/openssl/issues/28888
I'm not very happy with the fix, but I don't really have a better idea at this point.

Reported by LeakSanitizer:
```
=================================================================
==121188==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1132 byte(s) in 2 object(s) allocated from:
    #0 0x7f9278720cb5 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:67
    #1 0x7f9277f9189e in CRYPTO_malloc (/usr/lib/libcrypto.so.3+0x19189e) (BuildId: 9943e383d1a8a3cdcf8786b70a4abbf903e67661)
    #2 0x561ed5dfcfe8 in libssl_ocsp_stapling_callback(ssl_st*, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) ../libssl.cc:378
    #3 0x7f92779c965a  (/usr/lib/libssl.so.3+0xb065a) (BuildId: 05d6e27a4ef1635017caf539e4d5b5687767d20b)
    #4 0x7f92779b2b2d  (/usr/lib/libssl.so.3+0x99b2d) (BuildId: 05d6e27a4ef1635017caf539e4d5b5687767d20b)
    #5 0x7f92779b579d  (/usr/lib/libssl.so.3+0x9c79d) (BuildId: 05d6e27a4ef1635017caf539e4d5b5687767d20b)
    #6 0x561ed5f94e44 in OpenSSLTLSConnection::tryHandshake() ../tcpiohandler.cc:375
    #7 0x561ed58d690d in TCPIOHandler::tryHandshake() ../tcpiohandler.hh:369
    #8 0x561ed58d690d in IncomingTCPConnectionState::handleHandshake(timeval const&) ../dnsdist-tcp.cc:1070
    #9 0x561ed593118d in IncomingTCPConnectionState::handleIO() ../dnsdist-tcp.cc:1251
    #10 0x561ed58fc420 in handleIncomingTCPQuery ../dnsdist-tcp.cc:1468
    #11 0x561ed3b21d72 in std::function<void (int, boost::any&)>::operator()(int, boost::any&) const /usr/include/c++/15.2.1/bits/std_function.h:593
    #12 0x561ed3b21d72 in EpollFDMultiplexer::run(timeval*, int) ../epollmplexer.cc:188
    #13 0x561ed591a6e8 in tcpClientThread ../dnsdist-tcp.cc:1698
    #14 0x561ed593d147 in void std::__invoke_impl<void, void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >(std::__invoke_other, void (*&&)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/15.2.1/bits/invoke.h:63
    #15 0x561ed593d147 in std::__invoke_result<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >::type std::__invoke<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > >(void (*&&)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/15.2.1/bits/invoke.h:98
    #16 0x561ed593d147 in void std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul>) /usr/include/c++/15.2.1/bits/std_thread.h:303
    #17 0x561ed593d147 in std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > >::operator()() /usr/include/c++/15.2.1/bits/std_thread.h:310
    #18 0x561ed593d147 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >&&, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >&&, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >&&, std::vector<ClientState*, std::allocator<ClientState*> >), pdns::channel::Receiver<ConnectionInfo, std::default_delete<ConnectionInfo> >, pdns::channel::Receiver<CrossProtocolQuery, std::default_delete<CrossProtocolQuery> >, pdns::channel::Receiver<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, pdns::channel::Sender<TCPCrossProtocolResponse, std::default_delete<TCPCrossProtocolResponse> >, std::vector<ClientState*, std::allocator<ClientState*> > > > >::_M_run() /usr/include/c++/15.2.1/bits/std_thread.h:255
    #19 0x7f92772e55a3 in execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
    #20 0x7f927865e11a in asan_thread_start /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:239
    #21 0x7f92766969ca  (/usr/lib/libc.so.6+0x969ca) (BuildId: 4fe011c94a88e8aeb6f2201b9eb369f42b4a1e9e)

SUMMARY: AddressSanitizer: 1132 byte(s) leaked in 2 allocation(s).
```

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 months agoComboAddress: Fix "unspecified address" test when the port is set
Remi Gacogne [Mon, 13 Oct 2025 14:13:03 +0000 (16:13 +0200)] 
ComboAddress: Fix "unspecified address" test when the port is set

This fixes the QUIC issue reported on FreeBSD: the frontend
was not considered to be bound to an `ANY`/unspecified address
because the port was set, causing the address selection address
to fail.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 months agoMerge pull request #16209 from miodvallat/declined_to_comment
Miod Vallat [Mon, 13 Oct 2025 14:10:04 +0000 (16:10 +0200)] 
Merge pull request #16209 from miodvallat/declined_to_comment

pdnsutil: fix b2b-migrate to from sql to non-sql

7 months agoMerge pull request #16251 from omoerbeek/rec-rust-warning
Otto Moerbeek [Mon, 13 Oct 2025 13:53:03 +0000 (15:53 +0200)] 
Merge pull request #16251 from omoerbeek/rec-rust-warning

rec: silence rust warning

7 months agoAdd more DoT tests using a local responder
Otto Moerbeek [Mon, 13 Oct 2025 12:12:25 +0000 (14:12 +0200)] 
Add more DoT tests using a local responder

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
7 months agoMerge pull request #16213 from miodvallat/tertiary
Miod Vallat [Mon, 13 Oct 2025 11:54:04 +0000 (13:54 +0200)] 
Merge pull request #16213 from miodvallat/tertiary

auth: fix a secondary domain type check in bind backend

7 months agoIn zone copy, proceed anyway if --force even if target doesn't support comments. 16209/head
Miod Vallat [Mon, 13 Oct 2025 11:52:48 +0000 (13:52 +0200)] 
In zone copy, proceed anyway if --force even if target doesn't support comments.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
7 months agoMerge pull request #16243 from miodvallat/meet_your_maker
Miod Vallat [Mon, 13 Oct 2025 11:49:32 +0000 (13:49 +0200)] 
Merge pull request #16243 from miodvallat/meet_your_maker

auth: remove and delete dead code which turns out to be dead and also not alive

7 months agoMerge pull request #16240 from miodvallat/lua_and_order
Miod Vallat [Mon, 13 Oct 2025 11:49:04 +0000 (13:49 +0200)] 
Merge pull request #16240 from miodvallat/lua_and_order

auth: boring changes to lua backend

7 months agoauth sdist: include additional files/dirs 16253/head
Peter van Dijk [Mon, 13 Oct 2025 09:37:33 +0000 (11:37 +0200)] 
auth sdist: include additional files/dirs

Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com>
7 months agodnsdist: Don't choke on invalid DNS payload when generating protobuf messages 16244/head
Remi Gacogne [Fri, 10 Oct 2025 14:40:25 +0000 (16:40 +0200)] 
dnsdist: Don't choke on invalid DNS payload when generating protobuf messages

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 months agodnsdist: Properly zero-initialize the "fake" DNS header
Remi Gacogne [Fri, 10 Oct 2025 14:39:56 +0000 (16:39 +0200)] 
dnsdist: Properly zero-initialize the "fake" DNS header

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 months agodnsdist: Set up the dns header for timeout response rules
Remi Gacogne [Fri, 10 Oct 2025 09:45:25 +0000 (11:45 +0200)] 
dnsdist: Set up the dns header for timeout response rules

Response actions expect that there is a DNS payload containing at
least a DNS header, as an incoming packet smaller than a DNS header
would have been discarded early in the processing path.
Unfortunately this is not true for timeout response rules, where we
no longer have the DNS payload from the query and obviously don't
have a response either. This commit restores a DNS header from the
information we have (query ID, flags) so that most actions can
proceed normally.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
7 months agoMerge pull request #16123 from pieterlexis/dnsdist-ipcrypt-16110
Pieter Lexis [Mon, 13 Oct 2025 07:15:31 +0000 (09:15 +0200)] 
Merge pull request #16123 from pieterlexis/dnsdist-ipcrypt-16110

dnsdist: Add IPCrypt2 PFX to Remote(Response)LogAction

7 months agoMerge pull request #16215 from romeroalx/fix-pip-name-normalization
Alexis Romero [Mon, 13 Oct 2025 05:59:16 +0000 (07:59 +0200)] 
Merge pull request #16215 from romeroalx/fix-pip-name-normalization

gh actions - misc-dailies: fix test that validates hashes of Python packages

8 months agoMerge pull request #16245 from miodvallat/matriochka_exception
Miod Vallat [Fri, 10 Oct 2025 14:16:36 +0000 (16:16 +0200)] 
Merge pull request #16245 from miodvallat/matriochka_exception

auth: yet another logic botch

8 months agoAppease clang-tidy 16245/head
Miod Vallat [Fri, 10 Oct 2025 12:16:04 +0000 (14:16 +0200)] 
Appease clang-tidy

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agoIn getUpdatedPrimaries(), parse zone name first.
Miod Vallat [Fri, 10 Oct 2025 12:12:04 +0000 (14:12 +0200)] 
In getUpdatedPrimaries(), parse zone name first.

Otherwise, if another field is not parsed correctly, we risk triggering
another exception while attempting to use the unset zone name in the
error report.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agoMerge pull request #16242 from rgacogne/ddist-xsk-large-payload
Remi Gacogne [Fri, 10 Oct 2025 11:45:04 +0000 (13:45 +0200)] 
Merge pull request #16242 from rgacogne/ddist-xsk-large-payload

dnsdist: Fix handling of large XSK frames

8 months agodnsdist: Fix handling of large XSK frames 16242/head
Remi Gacogne [Tue, 7 Oct 2025 11:34:49 +0000 (13:34 +0200)] 
dnsdist: Fix handling of large XSK frames

There was a bug in the way we were computing the remaining capacity
of a XSK frame, because we forgot to account for the network headers.
This caused some XSK responses to be discarded by the kernel (`tx_invalid_descs`)
because there was not enough space left in the frame (less than
`XDP_PACKET_HEADROOM`).

Thanks to `ednaq` for reporting this via ou YesWeHack program.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agoRemove leftover DNSBackend::maker() routines. 16243/head
Miod Vallat [Fri, 10 Oct 2025 09:22:04 +0000 (11:22 +0200)] 
Remove leftover DNSBackend::maker() routines.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agoMerge pull request #16241 from rgacogne/ddist-round-robin-atomic
Remi Gacogne [Fri, 10 Oct 2025 09:15:40 +0000 (11:15 +0200)] 
Merge pull request #16241 from rgacogne/ddist-round-robin-atomic

dnsdist: Make the round-robin LB policy internal counter atomic

8 months agodnsdist: Make the round-robin LB policy internal counter atomic 16241/head
Remi Gacogne [Fri, 10 Oct 2025 08:18:40 +0000 (10:18 +0200)] 
dnsdist: Make the round-robin LB policy internal counter atomic

Otherwise TSAN is rightfully complaining that there is a data race
because several threads are updating at the same time. While the
impact of this counter being corrupted is almost zero, and there is
an actual overhead to making it atomic, I believe this is the only
correct way to ensure the expected behaviour of this policy.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agoMerge pull request #16239 from hhoffstaette/roundrobin-fastpath
Remi Gacogne [Fri, 10 Oct 2025 07:15:38 +0000 (09:15 +0200)] 
Merge pull request #16239 from hhoffstaette/roundrobin-fastpath

dnsdist: add fast path to roundrobin load balancing policy

8 months agoMerge pull request #16238 from rgacogne/ddist-fix-crash-handling-timeout
Remi Gacogne [Fri, 10 Oct 2025 07:12:48 +0000 (09:12 +0200)] 
Merge pull request #16238 from rgacogne/ddist-fix-crash-handling-timeout

dnsdist: Properly handle exceptions when processing timeout rules

8 months agoExpand the logCall and logResult macros. 16240/head
Miod Vallat [Fri, 10 Oct 2025 06:36:53 +0000 (08:36 +0200)] 
Expand the logCall and logResult macros.

They are in the way of structured logging and can't remain in this form.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agoClearance sale on {} brackets, which clang-tidy will require eventually.
Miod Vallat [Fri, 10 Oct 2025 06:24:49 +0000 (08:24 +0200)] 
Clearance sale on {} brackets, which clang-tidy will require eventually.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agodnsdist: add fast path to roundrobin load balancing policy 16239/head
Holger Hoffstätte [Thu, 9 Oct 2025 20:04:07 +0000 (22:04 +0200)] 
dnsdist: add fast path to roundrobin load balancing policy

There is no need to collect all servers that are up when the current
server is already a good candidate. This avoids needless heap allocation
and deallocation in the vast majority of cases.

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
8 months agoMerge pull request #16236 from jsoref/indent-list
Miod Vallat [Thu, 9 Oct 2025 18:03:19 +0000 (20:03 +0200)] 
Merge pull request #16236 from jsoref/indent-list

docs: Indent list

8 months agoMerge pull request #16237 from jsoref/add-period
Miod Vallat [Thu, 9 Oct 2025 17:30:44 +0000 (19:30 +0200)] 
Merge pull request #16237 from jsoref/add-period

docs: Add trailing period

8 months agoMerge pull request #16235 from horazont/fix/doc-dnssec-link-algo-rollover
Miod Vallat [Thu, 9 Oct 2025 17:28:11 +0000 (19:28 +0200)] 
Merge pull request #16235 from horazont/fix/doc-dnssec-link-algo-rollover

docs: link algorithm rollover from DNSSEC operational instructions

8 months agoMerge pull request #16233 from horazont/fix/doc-dnssec-soa-edit-notes
Miod Vallat [Thu, 9 Oct 2025 17:22:15 +0000 (19:22 +0200)] 
Merge pull request #16233 from horazont/fix/doc-dnssec-soa-edit-notes

docs: fix markup for list of "Important Notes"

8 months agobuild-scripts: Remove unused dist-{dist,recursor} 16165/head
Remi Gacogne [Thu, 9 Oct 2025 15:30:33 +0000 (17:30 +0200)] 
build-scripts: Remove unused dist-{dist,recursor}

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Fix formatting, ignore complexity for now
Remi Gacogne [Thu, 9 Oct 2025 15:27:30 +0000 (17:27 +0200)] 
dnsdist: Fix formatting, ignore complexity for now

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodocs: Add trailing period 16237/head
Josh Soref [Thu, 9 Oct 2025 15:13:38 +0000 (11:13 -0400)] 
docs: Add trailing period

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
8 months agodocs: Indent list 16236/head
Josh Soref [Thu, 9 Oct 2025 15:07:24 +0000 (11:07 -0400)] 
docs: Indent list

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
8 months agodocs: link algorithm rollover from DNSSEC operational instructions 16235/head
Jonas Schäfer [Thu, 9 Oct 2025 15:04:14 +0000 (17:04 +0200)] 
docs: link algorithm rollover from DNSSEC operational instructions

I probably would've missed it anyway, because that section of the
document has strong "motivational / introductory text" vibes which make
my brain auto-skip it, but at least there's a chance now.

Signed-off-by: Jonas Schäfer <jonas@zombofant.net>
8 months agodocs: fix markup for list of "Important Notes" 16233/head
Jonas Schäfer [Thu, 9 Oct 2025 14:57:48 +0000 (16:57 +0200)] 
docs: fix markup for list of "Important Notes"

This had me confused while reading, because the list wasn't rendered as
list (but as a paragraph) and I wondered why starting with 00 would
increase the chance of overflow...

Signed-off-by: Jonas Schäfer <jonas@zombofant.net>
8 months agorec: silence rust warning 16251/head
Otto Moerbeek [Thu, 9 Oct 2025 14:56:40 +0000 (16:56 +0200)] 
rec: silence rust warning

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoluawrapper: don't segfault on failure in traceback handler 16230/head
Peter van Dijk [Thu, 9 Oct 2025 11:41:29 +0000 (13:41 +0200)] 
luawrapper: don't segfault on failure in traceback handler

Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com>
8 months agoMerge pull request #16231 from omoerbeek/rec-unit-test-test
Otto Moerbeek [Thu, 9 Oct 2025 14:17:13 +0000 (16:17 +0200)] 
Merge pull request #16231 from omoerbeek/rec-unit-test-test

ci: Check return status of rec unit test run when using meson

8 months agoMerge pull request #16227 from omoerbeek/unkeep-keeper-in-rec
Otto Moerbeek [Thu, 9 Oct 2025 13:50:45 +0000 (15:50 +0200)] 
Merge pull request #16227 from omoerbeek/unkeep-keeper-in-rec

Do not include dnsseckeeper.hh and ueberbackend.hh  in rec

8 months agoFirts stab at docs
Otto Moerbeek [Thu, 9 Oct 2025 11:54:03 +0000 (13:54 +0200)] 
Firts stab at docs

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoAdd tests, list gnutls as dependency
Otto Moerbeek [Thu, 9 Oct 2025 10:19:18 +0000 (12:19 +0200)] 
Add tests, list gnutls as dependency

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoAllow runtime setting of TLS config tables by using rec_control reload-yaml
Otto Moerbeek [Mon, 6 Oct 2025 11:11:31 +0000 (13:11 +0200)] 
Allow runtime setting of TLS config tables by using rec_control reload-yaml

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoProvide TLS config by lookup on name or subnet.
Otto Moerbeek [Mon, 6 Oct 2025 10:14:58 +0000 (12:14 +0200)] 
Provide TLS config by lookup on name or subnet.

With settable verification mode, provider, subject name and some more.

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoLink in gnutls provider and provide verify error status method for it
Otto Moerbeek [Mon, 6 Oct 2025 10:01:49 +0000 (12:01 +0200)] 
Link in gnutls provider and provide verify error status method for it

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoAdd code to get certificate validation status (openssl only ATM)
Otto Moerbeek [Wed, 1 Oct 2025 07:40:04 +0000 (09:40 +0200)] 
Add code to get certificate validation status (openssl only ATM)

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agodnsdist: Hopefully slightly reduce the complexity of `processQueryAfterRules`
Remi Gacogne [Thu, 9 Oct 2025 13:02:12 +0000 (15:02 +0200)] 
dnsdist: Hopefully slightly reduce the complexity of `processQueryAfterRules`

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Properly handle exceptions when processing timeout rules 16238/head
Remi Gacogne [Thu, 9 Oct 2025 12:53:51 +0000 (14:53 +0200)] 
dnsdist: Properly handle exceptions when processing timeout rules

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agoCheck return status of rec unit test run when using meson 16231/head
Otto Moerbeek [Thu, 9 Oct 2025 12:12:46 +0000 (14:12 +0200)] 
Check return status of rec unit test run when using meson

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoExplicitly include file for openssl version number 16227/head
Otto Moerbeek [Thu, 9 Oct 2025 10:23:39 +0000 (12:23 +0200)] 
Explicitly include file for openssl version number

Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agodnsdist: Add regression tests for the pool's zero scope bindings
Remi Gacogne [Tue, 7 Oct 2025 09:26:46 +0000 (11:26 +0200)] 
dnsdist: Add regression tests for the pool's zero scope bindings

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Do not use inverted logic for the pool's zero scope state
Remi Gacogne [Tue, 7 Oct 2025 09:26:02 +0000 (11:26 +0200)] 
dnsdist: Do not use inverted logic for the pool's zero scope state

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Add unit tests for server consistency
Remi Gacogne [Tue, 23 Sep 2025 13:06:58 +0000 (15:06 +0200)] 
dnsdist: Add unit tests for server consistency

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Try to appease clang-tidy
Remi Gacogne [Tue, 26 Aug 2025 15:04:07 +0000 (17:04 +0200)] 
dnsdist: Try to appease clang-tidy

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Fix a caching bug when all servers are down and the query was received over TCP
Remi Gacogne [Tue, 26 Aug 2025 12:42:38 +0000 (14:42 +0200)] 
dnsdist: Fix a caching bug when all servers are down and the query was received over TCP

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Speed up cache hits by skipping the LB policy when possible
Remi Gacogne [Tue, 26 Aug 2025 12:00:26 +0000 (14:00 +0200)] 
dnsdist: Speed up cache hits by skipping the LB policy when possible

We use to execute the load-balancing policy to select a backend before
doing the cache lookup, because in some corner cases the selected
backend might have settings that impact our cache lookup. In practice
most configurations have a consistent set of settings for all servers
in a given pool, so it makes no sense to waste CPU cycles selecting a
backend if we are going to get a hit from the cache.
This PR adds a bit of code to check if a pool is in a consistent state,
and if it is it delays the execution of the load-balancing policy to
after the cache lookup, skipping it entirely for cache hits.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agoMerge pull request #16225 from miodvallat/a_ldap_oddity
Miod Vallat [Thu, 9 Oct 2025 10:15:33 +0000 (12:15 +0200)] 
Merge pull request #16225 from miodvallat/a_ldap_oddity

auth: logic botch in ldap backend

8 months agoMerge pull request #16226 from miodvallat/ldap_punk
Miod Vallat [Thu, 9 Oct 2025 09:49:42 +0000 (11:49 +0200)] 
Merge pull request #16226 from miodvallat/ldap_punk

auth: remove dead ldap code

8 months agoFix test-signers: if there's no ref to OpenSSL it fails
Otto Moerbeek [Thu, 9 Oct 2025 08:47:47 +0000 (10:47 +0200)] 
Fix test-signers: if there's no ref to OpenSSL it fails

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoMerge pull request #16224 from rgacogne/ddist-xsk-typo-doc
Remi Gacogne [Thu, 9 Oct 2025 09:33:43 +0000 (11:33 +0200)] 
Merge pull request #16224 from rgacogne/ddist-xsk-typo-doc

dnsdist: Fix a typo in the XSK documentation

8 months agoMerge pull request #15924 from rgacogne/ddist-refactor-server-pools
Remi Gacogne [Thu, 9 Oct 2025 09:22:20 +0000 (11:22 +0200)] 
Merge pull request #15924 from rgacogne/ddist-refactor-server-pools

dnsdist: Refactor server pools and load-balancing policies

8 months agoCorrectly handle reconnection in several routines. 16225/head
Miod Vallat [Thu, 9 Oct 2025 08:40:52 +0000 (10:40 +0200)] 
Correctly handle reconnection in several routines.

If the search failed with a LDAPNoConnection exception and reconnection
is successful, we would recurse to reiterate the operation, but then would
proceed with the exist logic operating on uninitialized data.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agoRemove long deprecated and/or unused code. 16226/head
Miod Vallat [Thu, 9 Oct 2025 08:55:19 +0000 (10:55 +0200)] 
Remove long deprecated and/or unused code.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agodnsdist: Add actual link to `newServer` in the XSK docs 16224/head
Remi Gacogne [Thu, 9 Oct 2025 08:40:06 +0000 (10:40 +0200)] 
dnsdist: Add actual link to `newServer` in the XSK docs

Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agoauth/rec: seperate out dnssec constants from DNSSECKeeper by moving them to a DNSSEC...
Otto Moerbeek [Thu, 9 Oct 2025 07:27:51 +0000 (09:27 +0200)] 
auth/rec: seperate out dnssec constants from DNSSECKeeper by moving them to a DNSSEC class

This allows not having ueberbackend.hh in rec, it makes no sense including that file in rec

A bit of churn in rec, but all mechanical

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoMerge pull request #16223 from miodvallat/doctweaks
Miod Vallat [Thu, 9 Oct 2025 07:52:49 +0000 (09:52 +0200)] 
Merge pull request #16223 from miodvallat/doctweaks

auth: minor doc tweak

8 months agoMention that unix socket support for webserver-address requires 5.0. 16223/head
Miod Vallat [Thu, 9 Oct 2025 06:53:16 +0000 (08:53 +0200)] 
Mention that unix socket support for webserver-address requires 5.0.

Fixes: #16222
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agoMove test-protozero-trace.cc to toplevel and add it in the autotools build where... 16220/head
Otto Moerbeek [Wed, 8 Oct 2025 11:25:56 +0000 (13:25 +0200)] 
Move test-protozero-trace.cc to toplevel and add it in the autotools build where it was missing

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agoprotobuf logger: print opentelemetry id's in hex, implement proper arg parser 16219/head
Otto Moerbeek [Wed, 8 Oct 2025 11:16:07 +0000 (13:16 +0200)] 
protobuf logger: print opentelemetry id's in hex, implement proper arg parser

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agodnsdist: Add package urls to our SBOMs 16217/head
Remi Gacogne [Tue, 7 Oct 2025 14:03:00 +0000 (16:03 +0200)] 
dnsdist: Add package urls to our SBOMs

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Yet another clang-tidy fix 15924/head
Remi Gacogne [Tue, 7 Oct 2025 11:40:14 +0000 (13:40 +0200)] 
dnsdist: Yet another clang-tidy fix

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Fix a typo in the XSK documentation
Remi Gacogne [Tue, 7 Oct 2025 11:33:53 +0000 (13:33 +0200)] 
dnsdist: Fix a typo in the XSK documentation

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: add support for TCP Fast Open on macOS 16071/head
Karel Bilek [Wed, 3 Sep 2025 07:54:45 +0000 (09:54 +0200)] 
dnsdist: add support for TCP Fast Open on macOS

This uses Apple's connectx() API instead of UNIX connect() API.

Signed-off-by: Karel Bilek <kb@karelbilek.com>
8 months agodnsdist: Appease clang-tidy
Remi Gacogne [Tue, 7 Oct 2025 08:46:23 +0000 (10:46 +0200)] 
dnsdist: Appease clang-tidy

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Fix typo
Remi Gacogne [Mon, 6 Oct 2025 15:16:15 +0000 (17:16 +0200)] 
dnsdist: Fix typo

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agospell-check: Remove 'splitsetup'
Remi Gacogne [Mon, 6 Oct 2025 14:53:55 +0000 (16:53 +0200)] 
spell-check: Remove 'splitsetup'

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Add regression tests for Lua pool bindings
Remi Gacogne [Mon, 6 Oct 2025 14:34:03 +0000 (16:34 +0200)] 
dnsdist: Add regression tests for Lua pool bindings

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Remove a very outdated example of how to do split-setup
Remi Gacogne [Mon, 6 Oct 2025 14:17:49 +0000 (16:17 +0200)] 
dnsdist: Remove a very outdated example of how to do split-setup

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Apply suggestions from code review
Remi Gacogne [Mon, 6 Oct 2025 14:11:51 +0000 (16:11 +0200)] 
dnsdist: Apply suggestions from code review

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Document the new behaviour for custom LB policies written in Lua
Remi Gacogne [Mon, 6 Oct 2025 14:06:32 +0000 (16:06 +0200)] 
dnsdist: Document the new behaviour for custom LB policies written in Lua

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Fix CodeQL warnings
Remi Gacogne [Fri, 25 Jul 2025 10:05:12 +0000 (12:05 +0200)] 
dnsdist: Fix CodeQL warnings

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Simplify the least outstanding policy
Remi Gacogne [Tue, 22 Jul 2025 09:19:47 +0000 (11:19 +0200)] 
dnsdist: Simplify the least outstanding policy

The servers can no longer be updated under our feet, so we only need
one pass.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Refactor load-balancing policies
Remi Gacogne [Mon, 21 Jul 2025 15:04:40 +0000 (17:04 +0200)] 
dnsdist: Refactor load-balancing policies

Since we no longer need to increase the reference counter of the
returned backend (the runtime configuration cannot be updated be
updated under our feet anymore), we can return the position of the
selected backend in the initial array instead, significantly
reducing the performance cost of the load-balancing policies.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Only set the DNSQuestion packet cache after a cache miss
Remi Gacogne [Fri, 18 Jul 2025 14:15:53 +0000 (16:15 +0200)] 
dnsdist: Only set the DNSQuestion packet cache after a cache miss

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Server pools are no longer ref counted
Remi Gacogne [Fri, 18 Jul 2025 08:15:36 +0000 (10:15 +0200)] 
dnsdist: Server pools are no longer ref counted

Since the refactoring of the runtime configuration, the content of
a Server Pool is now in effect immutable, we have to create a new
copy and update it, so we no longer have to lock and reference count
Server Pools and their content.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agorec: Prevent generating release tarballs via autotools
Otto Moerbeek [Mon, 6 Oct 2025 14:44:17 +0000 (16:44 +0200)] 
rec: Prevent generating release tarballs via autotools

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
8 months agodnsdist: Prevent generating release tarballs via autotools
Remi Gacogne [Tue, 23 Sep 2025 08:10:16 +0000 (10:10 +0200)] 
dnsdist: Prevent generating release tarballs via autotools

Using the hook found by Otto, thanks!

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agoMerge pull request #16191 from rgacogne/ddist-test-meson-dist
Remi Gacogne [Mon, 6 Oct 2025 13:59:28 +0000 (15:59 +0200)] 
Merge pull request #16191 from rgacogne/ddist-test-meson-dist

build-and-test-all: Build dnsdist and recursor via a release tarball

8 months agodnsdist: Fix parameter names in `dnsdist_ffi_dnsquestion_set_alternate_name` 16214/head
Remi Gacogne [Mon, 6 Oct 2025 13:58:22 +0000 (15:58 +0200)] 
dnsdist: Fix parameter names in `dnsdist_ffi_dnsquestion_set_alternate_name`

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Remove empty trailing line
Remi Gacogne [Mon, 6 Oct 2025 12:28:46 +0000 (14:28 +0200)] 
dnsdist: Remove empty trailing line

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Fix clang-tidy warnings, test more cases
Remi Gacogne [Mon, 6 Oct 2025 12:26:47 +0000 (14:26 +0200)] 
dnsdist: Fix clang-tidy warnings, test more cases

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agodnsdist: Refactor the FFI "alternate name" interface
Remi Gacogne [Mon, 6 Oct 2025 10:56:01 +0000 (12:56 +0200)] 
dnsdist: Refactor the FFI "alternate name" interface

So we can use it without making the query asynchronous when we
don't have to.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
8 months agogh actions - misc-dailies: fix pip name normalization when validating hashes 16215/head
romeroalx [Mon, 6 Oct 2025 10:50:31 +0000 (12:50 +0200)] 
gh actions - misc-dailies: fix pip name normalization when validating hashes

8 months agoFix a secondary domain type check. 16213/head
Miod Vallat [Mon, 6 Oct 2025 09:56:53 +0000 (11:56 +0200)] 
Fix a secondary domain type check.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
8 months agoMerge pull request #16205 from rgacogne/ddist-fix-settag-dynblock-doc
Remi Gacogne [Fri, 3 Oct 2025 10:50:43 +0000 (12:50 +0200)] 
Merge pull request #16205 from rgacogne/ddist-fix-settag-dynblock-doc

dnsdist: The dynamic block tag name is set via `tagName`, not `tagKey`