]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
2 years agogeoipbackend: Move geo2.example.com to separate file
Aki Tuomi [Sun, 1 May 2022 18:48:29 +0000 (21:48 +0300)] 
geoipbackend: Move geo2.example.com to separate file

Tests the new feature of loading zones from dir.

2 years agogeoipbackend: Add zones_dir key for geoipbackend file
Aki Tuomi [Sun, 1 May 2022 18:36:25 +0000 (21:36 +0300)] 
geoipbackend: Add zones_dir key for geoipbackend file

Allows loading zones from a directory.

Based on code by mason-chase <sid@moontius.com>

2 years agogeoipbackend: Emit error and discard errorneus zones instead of failing completely
Aki Tuomi [Sun, 1 May 2022 18:17:59 +0000 (21:17 +0300)] 
geoipbackend: Emit error and discard errorneus zones instead of failing completely

2 years agogeoipbackend: Move domain loading to separate function
Aki Tuomi [Sun, 1 May 2022 17:50:59 +0000 (20:50 +0300)] 
geoipbackend: Move domain loading to separate function

Simplifies next change

2 years agogeoipbackend: Move global custom mapping and format to object
Aki Tuomi [Sun, 1 May 2022 18:03:42 +0000 (21:03 +0300)] 
geoipbackend: Move global custom mapping and format to object

Simplifies following change

2 years agoMerge pull request #13154 from rgacogne/ddist-parallel-tests
Remi Gacogne [Mon, 28 Aug 2023 11:34:27 +0000 (13:34 +0200)] 
Merge pull request #13154 from rgacogne/ddist-parallel-tests

dnsdist: Switch to pytest for our regression tests, run them in parallel

2 years agodnsdist: Add missing 'sys' import in the Async regression test 13154/head
Remi Gacogne [Mon, 28 Aug 2023 10:33:21 +0000 (12:33 +0200)] 
dnsdist: Add missing 'sys' import in the Async regression test

As noticed by Charles-Henri (thanks!).

2 years agoMerge pull request #13143 from rgacogne/ddist-cache-metrics-tsan-warning
Remi Gacogne [Mon, 28 Aug 2023 09:22:44 +0000 (11:22 +0200)] 
Merge pull request #13143 from rgacogne/ddist-cache-metrics-tsan-warning

dnsdist: Try to fix a data race warning reported by TSAN

2 years agoMerge pull request #13167 from rgacogne/tcpiohandler-fix-conn-index-race
Remi Gacogne [Mon, 28 Aug 2023 08:55:20 +0000 (10:55 +0200)] 
Merge pull request #13167 from rgacogne/tcpiohandler-fix-conn-index-race

TCPIOHandler: Fix a race when creating the first TLS connections

2 years agoMerge pull request #13175 from omoerbeek/ssh_compat_getentropy
Otto Moerbeek [Mon, 28 Aug 2023 08:16:43 +0000 (10:16 +0200)] 
Merge pull request #13175 from omoerbeek/ssh_compat_getentropy

Declare ssh_compat_getentropy in the right spot.

2 years agoMerge pull request #13174 from omoerbeek/rec-include-cstdint
Otto Moerbeek [Mon, 28 Aug 2023 08:13:59 +0000 (10:13 +0200)] 
Merge pull request #13174 from omoerbeek/rec-include-cstdint

rec: Include cstdint in mtasker_ucontext.cc, noted by @zeha

2 years agoDeclare ssh_compat_getentropy in the right spot. 13175/head
Otto Moerbeek [Fri, 25 Aug 2023 13:00:37 +0000 (15:00 +0200)] 
Declare ssh_compat_getentropy in the right spot.

Avoiding a redundant and/or missing declaration (depending HAVE_* defines)

2 years agoInclude cstdint in mtasker_ucontext.cc, noted by @zeha 13174/head
Otto Moerbeek [Fri, 25 Aug 2023 12:08:36 +0000 (14:08 +0200)] 
Include cstdint in mtasker_ucontext.cc, noted by @zeha

2 years agoMerge pull request #13165 from omoerbeek/rec-prep-20230825
Otto Moerbeek [Fri, 25 Aug 2023 08:34:06 +0000 (10:34 +0200)] 
Merge pull request #13165 from omoerbeek/rec-prep-20230825

rec: Prep for upcoming rec 4.7.6, 4.8.5 and 4.9.1 releases

2 years agoMerge pull request #13097 from romeroalx/build-pkgs-add-pkghashes-check
Remi Gacogne [Thu, 24 Aug 2023 10:29:12 +0000 (12:29 +0200)] 
Merge pull request #13097 from romeroalx/build-pkgs-add-pkghashes-check

GH actions. build-packages.yml: check if hash entries were created for all targets

2 years agoMerge pull request #13168 from rgacogne/default-net-snmp-to-no
Remi Gacogne [Wed, 23 Aug 2023 15:55:33 +0000 (17:55 +0200)] 
Merge pull request #13168 from rgacogne/default-net-snmp-to-no

Change the default for building with net-snmp from `auto` to `no`

2 years agoChange the default for building with net-snmp from `auto` to `no` 13168/head
Remi Gacogne [Wed, 23 Aug 2023 15:00:17 +0000 (17:00 +0200)] 
Change the default for building with net-snmp from `auto` to `no`

We have had a fair amount of issues with `net-snmp` adding unexpected
and unwanted values to both `CXXFLAGS` and `LDFLAGS`, and it was just
reported to also define `HAVE_LIBSSL` is in public header, which messes
up our own feature detection. Therefore it is likely better for everyone
to prevent net-snmp from being enabled without the user intending it.
For our own packages we explicitly enable net-snmp when supported,
and this commit also enables it in our CI for dnsdist (it was already
done for the recursor) so it should not have any impact.

2 years agoTCPIOHandler: Fix a race when creating the first TLS connections 13167/head
Remi Gacogne [Wed, 23 Aug 2023 14:46:55 +0000 (16:46 +0200)] 
TCPIOHandler: Fix a race when creating the first TLS connections

We used to get a index from OpenSSL when the first incoming or
outgoing TLS connection was created. That index is later used
to store application-related data along the TLS connection, to
be able to access it in callbacks called from inside the OpenSSL
library.
Unfortunately the atomic flag construction used was racy: if a second
connection is created while the first one is still getting the index,
it could be reading the initial value (-1) instead of the actual index,
which might prevent the callback from working properly because they
cannot retrieve the necessary data. The good news is that this should
not have a serious impact: a TLS session might not be properly resumed
while it should have been, leading to a full TLS session negotiation.
This commit fixes the race by using a full mutex and only releasing
it once the value has been computed. In order to avoid a performance
penalty, the index is now computed when a TLS connection _context_
is created, instead of a TLS connection. TLS contexts should be
reused for a large number of connections, and mostly created during
startup or in the first few seconds of the application.

The race was reported by Thread Sanitizer during the
`test_TLS.py::TestTLSFrontendLimits::testTCPConnsPerTLSFrontend`
regression test as:
```
WARNING: ThreadSanitizer: data race (pid=120466)
  Read of size 4 at 0x55a12bf3d758 by thread T4:
    #0 OpenSSLTLSConnection::OpenSSLTLSConnection(int, timeval const&, std::shared_ptr<OpenSSLFrontendContext>) /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:106 (dnsdist+0x97ece8) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #1 std::__detail::_MakeUniq<OpenSSLTLSConnection>::__single_object std::make_unique<OpenSSLTLSConnection, int&, timeval const&, std::shared_ptr<OpenSSLFrontendContext>&>(int&, timeval const&, std::shared_ptr<OpenSSLFrontendContext>&) /usr/include/c++/13.2.1/bits/unique_ptr.h:1070 (dnsdist+0x97eff6) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #2 OpenSSLTLSIOCtx::getConnection(int, timeval const&, long) /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:797 (dnsdist+0x97eff6)
    #3 TCPIOHandler::TCPIOHandler(int, timeval const&, std::shared_ptr<TLSCtx>, long) /work/pdns/pdns/dnsdistdist/tcpiohandler.hh:246 (dnsdist+0x88c24f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #4 IncomingTCPConnectionState::IncomingTCPConnectionState(ConnectionInfo&&, TCPClientThreadData&, timeval const&) /work/pdns/pdns/dnsdistdist/dnsdist-tcp-upstream.hh:29 (dnsdist+0x88c24f)
    #5 void std::_Construct<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(IncomingTCPConnectionState*, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/stl_construct.h:119 (dnsdist+0x878b1e) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #6 void std::allocator_traits<std::allocator<void> >::construct<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(std::allocator<void>&, IncomingTCPConnectionState*, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/alloc_traits.h:660 (dnsdist+0x878b1e)
    #7 std::_Sp_counted_ptr_inplace<IncomingTCPConnectionState, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<ConnectionInfo, TCPClientThreadData&, timeval&>(std::allocator<void>, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:604 (dnsdist+0x878b1e)
    #8 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<IncomingTCPConnectionState, std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(IncomingTCPConnectionState*&, std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:971 (dnsdist+0x878b1e)
    #9 std::__shared_ptr<IncomingTCPConnectionState, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:1712 (dnsdist+0x878b1e)
    #10 std::shared_ptr<IncomingTCPConnectionState>::shared_ptr<std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr.h:464 (dnsdist+0x878b1e)
    #11 std::shared_ptr<std::enable_if<!std::is_array<IncomingTCPConnectionState>::value, IncomingTCPConnectionState>::type> std::make_shared<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr.h:1010 (dnsdist+0x878b1e)
    #12 handleIncomingTCPQuery /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:1118 (dnsdist+0x878b1e)
    #13 void std::__invoke_impl<void, void (*&)(int, boost::any&), int, boost::any&>(std::__invoke_other, void (*&)(int, boost::any&), int&&, boost::any&) /usr/include/c++/13.2.1/bits/invoke.h:61 (dnsdist+0x32d951) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #14 std::enable_if<is_invocable_r_v<void, void (*&)(int, boost::any&), int, boost::any&>, void>::type std::__invoke_r<void, void (*&)(int, boost::any&), int, boost::any&>(void (*&)(int, boost::any&), int&&, boost::any&) /usr/include/c++/13.2.1/bits/invoke.h:111 (dnsdist+0x32d951)
    #15 std::_Function_handler<void (int, boost::any&), void (*)(int, boost::any&)>::_M_invoke(std::_Any_data const&, int&&, boost::any&) /usr/include/c++/13.2.1/bits/std_function.h:290 (dnsdist+0x32d951)
    #16 std::function<void (int, boost::any&)>::operator()(int, boost::any&) const /usr/include/c++/13.2.1/bits/std_function.h:591 (dnsdist+0x98fc0f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #17 EpollFDMultiplexer::run(timeval*, int) /work/pdns/pdns/dnsdistdist/epollmplexer.cc:190 (dnsdist+0x98fc0f)
    #18 tcpClientThread /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:1251 (dnsdist+0x86cb7f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #19 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++/13.2.1/bits/invoke.h:61 (dnsdist+0x87aab1) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #20 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++/13.2.1/bits/invoke.h:96 (dnsdist+0x87aab1)
    #21 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++/13.2.1/bits/std_thread.h:292 (dnsdist+0x87aab1)
    #22 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++/13.2.1/bits/std_thread.h:299 (dnsdist+0x87aab1)
    #23 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++/13.2.1/bits/std_thread.h:244 (dnsdist+0x87aab1)
    #24 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104 (libstdc++.so.6+0xe1942) (BuildId: 207eb738c5976dd9aac1ae0640fc4de5946b547e)

  Previous write of size 4 at 0x55a12bf3d758 by thread T3:
    #0 OpenSSLTLSConnection::OpenSSLTLSConnection(int, timeval const&, std::shared_ptr<OpenSSLFrontendContext>) /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:88 (dnsdist+0x97ed98) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #1 std::__detail::_MakeUniq<OpenSSLTLSConnection>::__single_object std::make_unique<OpenSSLTLSConnection, int&, timeval const&, std::shared_ptr<OpenSSLFrontendContext>&>(int&, timeval const&, std::shared_ptr<OpenSSLFrontendContext>&) /usr/include/c++/13.2.1/bits/unique_ptr.h:1070 (dnsdist+0x97eff6) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #2 OpenSSLTLSIOCtx::getConnection(int, timeval const&, long) /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:797 (dnsdist+0x97eff6)
    #3 TCPIOHandler::TCPIOHandler(int, timeval const&, std::shared_ptr<TLSCtx>, long) /work/pdns/pdns/dnsdistdist/tcpiohandler.hh:246 (dnsdist+0x88c24f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #4 IncomingTCPConnectionState::IncomingTCPConnectionState(ConnectionInfo&&, TCPClientThreadData&, timeval const&) /work/pdns/pdns/dnsdistdist/dnsdist-tcp-upstream.hh:29 (dnsdist+0x88c24f)
    #5 void std::_Construct<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(IncomingTCPConnectionState*, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/stl_construct.h:119 (dnsdist+0x878b1e) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #6 void std::allocator_traits<std::allocator<void> >::construct<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(std::allocator<void>&, IncomingTCPConnectionState*, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/alloc_traits.h:660 (dnsdist+0x878b1e)
    #7 std::_Sp_counted_ptr_inplace<IncomingTCPConnectionState, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<ConnectionInfo, TCPClientThreadData&, timeval&>(std::allocator<void>, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:604 (dnsdist+0x878b1e)
    #8 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<IncomingTCPConnectionState, std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(IncomingTCPConnectionState*&, std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:971 (dnsdist+0x878b1e)
    #9 std::__shared_ptr<IncomingTCPConnectionState, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr_base.h:1712 (dnsdist+0x878b1e)
    #10 std::shared_ptr<IncomingTCPConnectionState>::shared_ptr<std::allocator<void>, ConnectionInfo, TCPClientThreadData&, timeval&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr.h:464 (dnsdist+0x878b1e)
    #11 std::shared_ptr<std::enable_if<!std::is_array<IncomingTCPConnectionState>::value, IncomingTCPConnectionState>::type> std::make_shared<IncomingTCPConnectionState, ConnectionInfo, TCPClientThreadData&, timeval&>(ConnectionInfo&&, TCPClientThreadData&, timeval&) /usr/include/c++/13.2.1/bits/shared_ptr.h:1010 (dnsdist+0x878b1e)
    #12 handleIncomingTCPQuery /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:1118 (dnsdist+0x878b1e)
    #13 void std::__invoke_impl<void, void (*&)(int, boost::any&), int, boost::any&>(std::__invoke_other, void (*&)(int, boost::any&), int&&, boost::any&) /usr/include/c++/13.2.1/bits/invoke.h:61 (dnsdist+0x32d951) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #14 std::enable_if<is_invocable_r_v<void, void (*&)(int, boost::any&), int, boost::any&>, void>::type std::__invoke_r<void, void (*&)(int, boost::any&), int, boost::any&>(void (*&)(int, boost::any&), int&&, boost::any&) /usr/include/c++/13.2.1/bits/invoke.h:111 (dnsdist+0x32d951)
    #15 std::_Function_handler<void (int, boost::any&), void (*)(int, boost::any&)>::_M_invoke(std::_Any_data const&, int&&, boost::any&) /usr/include/c++/13.2.1/bits/std_function.h:290 (dnsdist+0x32d951)
    #16 std::function<void (int, boost::any&)>::operator()(int, boost::any&) const /usr/include/c++/13.2.1/bits/std_function.h:591 (dnsdist+0x98fc0f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #17 EpollFDMultiplexer::run(timeval*, int) /work/pdns/pdns/dnsdistdist/epollmplexer.cc:190 (dnsdist+0x98fc0f)
    #18 tcpClientThread /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:1251 (dnsdist+0x86cb7f) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #19 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++/13.2.1/bits/invoke.h:61 (dnsdist+0x87aab1) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #20 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++/13.2.1/bits/invoke.h:96 (dnsdist+0x87aab1)
    #21 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++/13.2.1/bits/std_thread.h:292 (dnsdist+0x87aab1)
    #22 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++/13.2.1/bits/std_thread.h:299 (dnsdist+0x87aab1)
    #23 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++/13.2.1/bits/std_thread.h:244 (dnsdist+0x87aab1)
    #24 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104 (libstdc++.so.6+0xe1942) (BuildId: 207eb738c5976dd9aac1ae0640fc4de5946b547e)

  Location is global 'OpenSSLTLSConnection::s_tlsConnIndex' of size 4 at 0x55a12bf3d758 (dnsdist+0xc49758)

  Thread T4 'dnsdist/tcpClie' (tid=120471, running) created by main thread at:
    #0 pthread_create /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:1036 (libtsan.so.2+0x44219) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
    #1 __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xe1a29) (BuildId: 207eb738c5976dd9aac1ae0640fc4de5946b547e)
    #2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:172 (libstdc++.so.6+0xe1a29)
    #3 TCPClientCollection::addTCPClientThread(std::vector<ClientState*, std::allocator<ClientState*> >&) /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:149 (dnsdist+0x8685a1) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #4 TCPClientCollection::TCPClientCollection(unsigned long, std::vector<ClientState*, std::allocator<ClientState*> >) /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:126 (dnsdist+0x868912) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #5 std::__detail::_MakeUniq<TCPClientCollection>::__single_object std::make_unique<TCPClientCollection, unsigned long&, std::vector<ClientState*, std::allocator<ClientState*> > >(unsigned long&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/13.2.1/bits/unique_ptr.h:1070 (dnsdist+0x20adef) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #6 main /work/pdns/pdns/dnsdistdist/dnsdist.cc:2865 (dnsdist+0x20adef)

  Thread T3 'dnsdist/tcpClie' (tid=120470, running) created by main thread at:
    #0 pthread_create /usr/src/debug/gcc/gcc/libsanitizer/tsan/tsan_interceptors_posix.cpp:1036 (libtsan.so.2+0x44219) (BuildId: 7e8fcb9ed0a63b98f2293e37c92ac955413efd9e)
    #1 __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 (libstdc++.so.6+0xe1a29) (BuildId: 207eb738c5976dd9aac1ae0640fc4de5946b547e)
    #2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:172 (libstdc++.so.6+0xe1a29)
    #3 TCPClientCollection::addTCPClientThread(std::vector<ClientState*, std::allocator<ClientState*> >&) /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:149 (dnsdist+0x8685a1) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #4 TCPClientCollection::TCPClientCollection(unsigned long, std::vector<ClientState*, std::allocator<ClientState*> >) /work/pdns/pdns/dnsdistdist/dnsdist-tcp.cc:126 (dnsdist+0x868912) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #5 std::__detail::_MakeUniq<TCPClientCollection>::__single_object std::make_unique<TCPClientCollection, unsigned long&, std::vector<ClientState*, std::allocator<ClientState*> > >(unsigned long&, std::vector<ClientState*, std::allocator<ClientState*> >&&) /usr/include/c++/13.2.1/bits/unique_ptr.h:1070 (dnsdist+0x20adef) (BuildId: ad82581368352777fda41d4b4145ba8ec738044c)
    #6 main /work/pdns/pdns/dnsdistdist/dnsdist.cc:2865 (dnsdist+0x20adef)

SUMMARY: ThreadSanitizer: data race /work/pdns/pdns/dnsdistdist/tcpiohandler.cc:106 in OpenSSLTLSConnection::OpenSSLTLSConnection(int, timeval const&, std::shared_ptr<OpenSSLFrontendContext>)
```

2 years agoMerge pull request #13166 from omoerbeek/rec-buildbot-nosnmp
Otto Moerbeek [Wed, 23 Aug 2023 13:03:43 +0000 (15:03 +0200)] 
Merge pull request #13166 from omoerbeek/rec-buildbot-nosnmp

rec/buildbot: Avoid running SNMP tests on the current buildbot setup

2 years agodnsdist: Split the DynBlocks regression tests
Remi Gacogne [Wed, 23 Aug 2023 12:40:30 +0000 (14:40 +0200)] 
dnsdist: Split the DynBlocks regression tests

On my 8 physical CPU cores machine this brings the total time for
all regression tests to 107.60s (01:47).

2 years agoAvoid running SNMP tests on the current buildbot setup 13166/head
Otto Moerbeek [Wed, 23 Aug 2023 11:23:56 +0000 (13:23 +0200)] 
Avoid running SNMP tests on the current buildbot setup

Since the change from nose to pytest, the SNMP exclusion via the environment
var NOSE_EXLUDE does no longer work.

2 years agoPrep for upcoming rec 4.7.6, 4.8.5 and 4.9.1 releases 13165/head
Otto Moerbeek [Wed, 23 Aug 2023 09:16:50 +0000 (11:16 +0200)] 
Prep for upcoming rec 4.7.6, 4.8.5 and 4.9.1 releases

2 years agoMerge pull request #13095 from rgacogne/coding-guidelines
Remi Gacogne [Wed, 23 Aug 2023 07:40:09 +0000 (09:40 +0200)] 
Merge pull request #13095 from rgacogne/coding-guidelines

Add a coding guidelines document to the public repository

2 years agoBindlexer whitespace cleanup
Fred Morcos [Tue, 22 Aug 2023 14:49:49 +0000 (16:49 +0200)] 
Bindlexer whitespace cleanup

2 years agoMerge pull request #13071 from omoerbeek/json-encoding
Otto Moerbeek [Tue, 22 Aug 2023 13:55:15 +0000 (15:55 +0200)] 
Merge pull request #13071 from omoerbeek/json-encoding

Fix code producing json

2 years agoAuth: Print the list of loaded modules next to the config.h preset 13162/head
Fred Morcos [Tue, 22 Aug 2023 09:30:29 +0000 (11:30 +0200)] 
Auth: Print the list of loaded modules next to the config.h preset

2 years agoCoding Guidelines: Apply suggestions from reviews 13095/head
Remi Gacogne [Mon, 21 Aug 2023 15:35:30 +0000 (17:35 +0200)] 
Coding Guidelines: Apply suggestions from reviews

2 years agoMerge pull request #13155 from rgacogne/channel-make-blocking-params-explicit
Remi Gacogne [Mon, 21 Aug 2023 09:26:16 +0000 (11:26 +0200)] 
Merge pull request #13155 from rgacogne/channel-make-blocking-params-explicit

channel: Make the blocking parameters of the object queue explicit

2 years agoMerge pull request #13102 from omoerbeek/rec-nodata-condition
Otto Moerbeek [Mon, 21 Aug 2023 08:25:17 +0000 (10:25 +0200)] 
Merge pull request #13102 from omoerbeek/rec-nodata-condition

rec: Do not assume the records are in a particular order when determining if an answer is NODATA

2 years agoMerge pull request #13106 from omoerbeek/rec-aggr-cache-replace
Otto Moerbeek [Mon, 21 Aug 2023 08:24:55 +0000 (10:24 +0200)] 
Merge pull request #13106 from omoerbeek/rec-aggr-cache-replace

rec: replace data in the aggressive cache if new data becomes available

2 years agoMerge pull request #13144 from fredmorcos/iputils-cleanup
Fred Morcos [Fri, 18 Aug 2023 19:57:53 +0000 (21:57 +0200)] 
Merge pull request #13144 from fredmorcos/iputils-cleanup

Consistency: Use #ifdef instead of #if in `iputils.cc`

2 years agoMerge pull request #13152 from fredmorcos/cleanup-yaml-to-json
Fred Morcos [Fri, 18 Aug 2023 19:44:16 +0000 (21:44 +0200)] 
Merge pull request #13152 from fredmorcos/cleanup-yaml-to-json

Cleanup `convert-yaml-to-json.py`

2 years agoConsistency: Use #ifdef instead of #if in iputils.cc 13144/head
Fred Morcos [Wed, 16 Aug 2023 12:14:21 +0000 (14:14 +0200)] 
Consistency: Use #ifdef instead of #if in iputils.cc

2 years agochannel: Make the blocking parameters of the object queue explicit 13155/head
Remi Gacogne [Wed, 16 Aug 2023 14:42:26 +0000 (16:42 +0200)] 
channel: Make the blocking parameters of the object queue explicit

2 years agoMerge pull request #13151 from aj-gh/fixtypos
Remi Gacogne [Fri, 18 Aug 2023 11:03:04 +0000 (13:03 +0200)] 
Merge pull request #13151 from aj-gh/fixtypos

Fix a few typos in log messages

2 years agoMerge pull request #13147 from chbruyand/dnsdist-channel-fix
Remi Gacogne [Fri, 18 Aug 2023 11:02:36 +0000 (13:02 +0200)] 
Merge pull request #13147 from chbruyand/dnsdist-channel-fix

dnsdist: DOH - make query channel receiving part blocking

2 years agodnsdist: Use the same UDP timeouts than usual in the 'advanced' tests
Remi Gacogne [Fri, 18 Aug 2023 10:55:10 +0000 (12:55 +0200)] 
dnsdist: Use the same UDP timeouts than usual in the 'advanced' tests

It makes sense to use a short timeout when we know this is going to
fail, but here we actually expect a response, and it seems that the
current timeout is sometimes too short when running with TSAN,
especially when we have a lot of tests running in parallel.

2 years agodnsdist: Set verbose for TestAdvancedGetLocalAddressOnAnyBind
Remi Gacogne [Fri, 18 Aug 2023 06:37:29 +0000 (08:37 +0200)] 
dnsdist: Set verbose for TestAdvancedGetLocalAddressOnAnyBind

2 years agodnsdist: Better handling of network events in the regression test responders
Remi Gacogne [Fri, 18 Aug 2023 06:36:54 +0000 (08:36 +0200)] 
dnsdist: Better handling of network events in the regression test responders

2 years agodnsdist: Fix a deprecation warning in the XPF regression tests
Remi Gacogne [Fri, 18 Aug 2023 06:36:19 +0000 (08:36 +0200)] 
dnsdist: Fix a deprecation warning in the XPF regression tests

2 years agodnsdist: Update the regression tests for parallel testing
Remi Gacogne [Fri, 7 Jul 2023 16:17:13 +0000 (18:17 +0200)] 
dnsdist: Update the regression tests for parallel testing

2 years agoCleanup convert-yaml-to-json.py 13152/head
Fred Morcos [Thu, 17 Aug 2023 14:59:37 +0000 (16:59 +0200)] 
Cleanup convert-yaml-to-json.py

2 years agoFix a few typos. 13151/head
Andreas Jakum [Thu, 17 Aug 2023 13:24:05 +0000 (15:24 +0200)] 
Fix a few typos.

2 years agoMerge pull request #13149 from rgacogne/ddist-fix-frontend-metrics-recvmmsg
Remi Gacogne [Thu, 17 Aug 2023 10:06:50 +0000 (12:06 +0200)] 
Merge pull request #13149 from rgacogne/ddist-fix-frontend-metrics-recvmmsg

dnsdist: Properly record self-answered UDP responses with recvmmsg

2 years agoMerge pull request #13146 from chbruyand/dnsdist-cosmetic-fixes
Remi Gacogne [Thu, 17 Aug 2023 09:37:30 +0000 (11:37 +0200)] 
Merge pull request #13146 from chbruyand/dnsdist-cosmetic-fixes

dnsdist: cosmetic compilation warning fixes

2 years agodnsdist: Properly record self-answered UDP responses with recvmmsg 13149/head
Remi Gacogne [Thu, 17 Aug 2023 09:19:15 +0000 (11:19 +0200)] 
dnsdist: Properly record self-answered UDP responses with recvmmsg

Responses sent directly from dnsdist, without reaching out to a backend
(self-generated and cache hits answers, mostly) where not properly
accounted for in frontend metrics, ring buffer entries and latency
computation when recvmmsg/sendmmsg support was enabled via
`setUDPMultipleMessagesVectorSize()`.

2 years agodnsdsit: reset IncomingTCPConnectionState's buffer with clear() instead of resize() 13146/head
Charles-Henri Bruyand [Wed, 16 Aug 2023 15:20:21 +0000 (17:20 +0200)] 
dnsdsit: reset IncomingTCPConnectionState's buffer with clear() instead of resize()

2 years agodnsdist: remove unused variables warnings
Charles-Henri Bruyand [Wed, 16 Aug 2023 14:32:22 +0000 (16:32 +0200)] 
dnsdist: remove unused variables warnings

2 years agodnsdist: make query channel receiving part blocking to avoid unnecessary CPU consumption 13147/head
Charles-Henri Bruyand [Wed, 16 Aug 2023 15:28:23 +0000 (17:28 +0200)] 
dnsdist: make query channel receiving part blocking to avoid unnecessary CPU consumption

2 years agoFormat fuzzing targets
Remi Gacogne [Wed, 16 Aug 2023 14:44:37 +0000 (16:44 +0200)] 
Format fuzzing targets

2 years agoMerge pull request #13141 from rgacogne/auth-coverity-4
Remi Gacogne [Wed, 16 Aug 2023 13:59:21 +0000 (15:59 +0200)] 
Merge pull request #13141 from rgacogne/auth-coverity-4

tools: Address more Coverity warnings

2 years agoFix building our fuzzing targets from a dist tarball
Remi Gacogne [Wed, 16 Aug 2023 13:16:33 +0000 (15:16 +0200)] 
Fix building our fuzzing targets from a dist tarball

Until now all of our fuzzing targets where built with the authoritative
server, even though one of them is specific to dnsdist.
This made it easy to build all of them at once, especially for OSS-Fuzz
and CI-Fuzz, but had the unfortunate drawback of pulling several
dnsdist-specific files into the main pdns/ directory for no good
reason. It also prevented building the fuzzing targets from a dist
tarball/directory.
This commit moves the dnsdist-specific fuzzing target to the dnsdist
build process, and ensure that the standalone_fuzz_target_runner.cc
file is part of the dist tarball, making it possible to build the
fuzzing targets from the dist.
It does not move the dnsdist-specific files to the pdns/dnsdistdist/
directory yet because this would conflict with existing PRs.

2 years agoMerge pull request #13005 from jellekaufmann/master
Peter van Dijk [Wed, 16 Aug 2023 11:31:20 +0000 (13:31 +0200)] 
Merge pull request #13005 from jellekaufmann/master

optsize off by -4 when including DNS cookie

2 years agodnsbulktest: Fix warnings from clang-tidy 13141/head
Remi Gacogne [Wed, 16 Aug 2023 09:46:03 +0000 (11:46 +0200)] 
dnsbulktest: Fix warnings from clang-tidy

2 years agodnsdist: Try to fix a data race warning reported by TSAN 13143/head
Remi Gacogne [Wed, 16 Aug 2023 09:49:23 +0000 (11:49 +0200)] 
dnsdist: Try to fix a data race warning reported by TSAN

2 years agocalidns: Fix warnings from clang-tidy
Remi Gacogne [Wed, 16 Aug 2023 09:45:49 +0000 (11:45 +0200)] 
calidns: Fix warnings from clang-tidy

2 years agochannel: Fix redundant redeclaration warning 13142/head
Remi Gacogne [Wed, 16 Aug 2023 09:18:25 +0000 (11:18 +0200)] 
channel: Fix redundant redeclaration warning

g++ reports:
```
In file included from channel.cc:23:
channel.hh:38:17: warning: redundant redeclaration of ‘void __tsan_acquire(void*)’ in same scope [-Wredundant-decls]
   38 | extern "C" void __tsan_acquire(void* addr);
      |                 ^~~~~~~~~~~~~~
In file included from /usr/include/c++/13.2.1/bits/shared_ptr_atomic.h:37,
                 from /usr/include/c++/13.2.1/memory:81,
                 from channel.hh:23:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/sanitizer/tsan_interface.h:24:6: note: previous declaration of ‘void __tsan_acquire(void*)’
   24 | void __tsan_acquire(void *addr);
      |      ^~~~~~~~~~~~~~
channel.hh:39:17: warning: redundant redeclaration of ‘void __tsan_release(void*)’ in same scope [-Wredundant-decls]
   39 | extern "C" void __tsan_release(void* addr);
      |                 ^~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/sanitizer/tsan_interface.h:25:6: note: previous declaration of ‘void __tsan_release(void*)’
   25 | void __tsan_release(void *addr);
```

2 years agodnsgram: Fix Coverity CID 1401647
Remi Gacogne [Wed, 16 Aug 2023 09:13:09 +0000 (11:13 +0200)] 
dnsgram: Fix Coverity CID 1401647

2 years agoixfrdist: Fix Coverity CID 1504137: Uncaught exception
Remi Gacogne [Wed, 16 Aug 2023 08:15:42 +0000 (10:15 +0200)] 
ixfrdist: Fix Coverity CID 1504137: Uncaught exception

2 years agodnsbulktest: Fix Coverity CID 1401681 and 1401676
Remi Gacogne [Wed, 16 Aug 2023 08:15:07 +0000 (10:15 +0200)] 
dnsbulktest: Fix Coverity CID 1401681 and 1401676

2 years agocalidns: Fix Coverity CID 1401679: Uncaught exception
Remi Gacogne [Wed, 16 Aug 2023 08:14:25 +0000 (10:14 +0200)] 
calidns: Fix Coverity CID 1401679: Uncaught exception

2 years agoCoding Guidelines: Mention reserve()/resize() explicitly, with links
Remi Gacogne [Wed, 16 Aug 2023 07:36:21 +0000 (09:36 +0200)] 
Coding Guidelines: Mention reserve()/resize() explicitly, with links

2 years agoMerge pull request #13135 from rgacogne/ddist-gettc
Remi Gacogne [Wed, 16 Aug 2023 07:28:01 +0000 (09:28 +0200)] 
Merge pull request #13135 from rgacogne/ddist-gettc

dnsdist: Add a DNSHeader:getTC() Lua binding

2 years agoMerge pull request #13138 from Habbie/cid398388
Peter van Dijk [Tue, 15 Aug 2023 19:02:14 +0000 (21:02 +0200)] 
Merge pull request #13138 from Habbie/cid398388

coverity CID 398388: useless <0 check on unsigned value

2 years agodnsdist: Remove a second useless check, useless static casts 13138/head
Remi Gacogne [Tue, 15 Aug 2023 16:07:52 +0000 (18:07 +0200)] 
dnsdist: Remove a second useless check, useless static casts

2 years agoMerge pull request #13139 from fredmorcos/minor-cleanups
Peter van Dijk [Tue, 15 Aug 2023 16:27:24 +0000 (18:27 +0200)] 
Merge pull request #13139 from fredmorcos/minor-cleanups

Minor cleanup

2 years agogettime: fix minor compilation warnings 13139/head
Fred Morcos [Tue, 15 Aug 2023 11:22:34 +0000 (13:22 +0200)] 
gettime: fix minor compilation warnings

2 years agoMakefile whitespace
Fred Morcos [Tue, 15 Aug 2023 11:22:51 +0000 (13:22 +0200)] 
Makefile whitespace

2 years agoMerge pull request #13136 from Habbie/ixfrdist-soa-aa
Peter van Dijk [Tue, 15 Aug 2023 11:41:04 +0000 (13:41 +0200)] 
Merge pull request #13136 from Habbie/ixfrdist-soa-aa

ixfrdist: set AA=1 on SOA responses

2 years agoMerge pull request #13134 from Habbie/ixfrdist-pytest
Peter van Dijk [Tue, 15 Aug 2023 11:40:49 +0000 (13:40 +0200)] 
Merge pull request #13134 from Habbie/ixfrdist-pytest

ixfrdist: switch testing to pytest

2 years agocoverity CID 398388: useless <0 check on unsigned value
Peter van Dijk [Tue, 15 Aug 2023 08:28:46 +0000 (10:28 +0200)] 
coverity CID 398388: useless <0 check on unsigned value

2 years agodnsdist: Fix the documented return value of DNSHeader:getTC() 13135/head
Remi Gacogne [Mon, 14 Aug 2023 15:50:52 +0000 (17:50 +0200)] 
dnsdist: Fix the documented return value of DNSHeader:getTC()

2 years agoixfrdist: set AA=1 on SOA responses 13136/head
Peter van Dijk [Mon, 14 Aug 2023 14:52:27 +0000 (16:52 +0200)] 
ixfrdist: set AA=1 on SOA responses

2 years agoeqdnsmessage: adjust to type changes in dnspython
Peter van Dijk [Mon, 14 Aug 2023 15:10:10 +0000 (17:10 +0200)] 
eqdnsmessage: adjust to type changes in dnspython

2 years agoMerge pull request #13094 from rgacogne/ixfrdist-main-complexity
Remi Gacogne [Mon, 14 Aug 2023 15:08:05 +0000 (17:08 +0200)] 
Merge pull request #13094 from rgacogne/ixfrdist-main-complexity

ixfrdist: Reduce the complexity of the main function

2 years agodnsdist: Add a DNSHeader:getTC() Lua binding
Remi Gacogne [Mon, 14 Aug 2023 15:02:39 +0000 (17:02 +0200)] 
dnsdist: Add a DNSHeader:getTC() Lua binding

2 years agoixfrdist: switch testing to pytest 13134/head
Peter van Dijk [Mon, 14 Aug 2023 14:55:02 +0000 (16:55 +0200)] 
ixfrdist: switch testing to pytest

2 years agoixfrdist: after --help or --version, exit (includes var rename) 13094/head
Peter van Dijk [Mon, 14 Aug 2023 13:32:30 +0000 (15:32 +0200)] 
ixfrdist: after --help or --version, exit (includes var rename)

2 years agoMerge pull request #13114 from rgacogne/auth-coverity-3
Remi Gacogne [Mon, 14 Aug 2023 12:39:15 +0000 (14:39 +0200)] 
Merge pull request #13114 from rgacogne/auth-coverity-3

auth: Fix uninitialized scalar field warnings from Coverity

2 years agoCoding Guidelines: More suggestions from Chris Hofstaedtler (thanks!)
Remi Gacogne [Mon, 14 Aug 2023 12:38:04 +0000 (14:38 +0200)] 
Coding Guidelines: More suggestions from Chris Hofstaedtler (thanks!)

2 years agoMerge pull request #13093 from rgacogne/ixfrdist-fix-max-soa-refresh
Peter van Dijk [Mon, 14 Aug 2023 12:23:02 +0000 (14:23 +0200)] 
Merge pull request #13093 from rgacogne/ixfrdist-fix-max-soa-refresh

ixfrdist: Fix the validation of 'max-soa-refresh'

2 years agoMerge pull request #13113 from rgacogne/ddist-discovery-short-read
Remi Gacogne [Mon, 14 Aug 2023 11:23:40 +0000 (13:23 +0200)] 
Merge pull request #13113 from rgacogne/ddist-discovery-short-read

dnsdist: Properly handle short reads on backend upgrade discovery

2 years agoCoding Guidelines: Apply suggestions from review
Remi Gacogne [Mon, 14 Aug 2023 11:22:48 +0000 (13:22 +0200)] 
Coding Guidelines: Apply suggestions from review

2 years agoixfrdist: Call `getpwuid()` before going multi-threaded
Remi Gacogne [Mon, 14 Aug 2023 10:15:53 +0000 (12:15 +0200)] 
ixfrdist: Call `getpwuid()` before going multi-threaded

2 years agoauth: Fix Coverity CID 1504120: Uninitialized scalar field 13114/head
Remi Gacogne [Mon, 14 Aug 2023 10:09:40 +0000 (12:09 +0200)] 
auth: Fix Coverity CID 1504120: Uninitialized scalar field

2 years agoauth: Fix coverity CID 1030024: Uninitialized scalar field
Remi Gacogne [Mon, 14 Aug 2023 10:09:00 +0000 (12:09 +0200)] 
auth: Fix coverity CID 1030024: Uninitialized scalar field

2 years agodnsdist: Uglify the code to make the formatter happy 13113/head
Remi Gacogne [Mon, 14 Aug 2023 09:01:41 +0000 (11:01 +0200)] 
dnsdist: Uglify the code to make the formatter happy

2 years agoMerge pull request #13105 from Habbie/rec-ixfr-debugging
Peter van Dijk [Mon, 14 Aug 2023 08:58:27 +0000 (10:58 +0200)] 
Merge pull request #13105 from Habbie/rec-ixfr-debugging

(I)XFR: handle partial read of len prefix

2 years agodnsdist: Add a 'partial read' case to the backend upgrade tests
Remi Gacogne [Mon, 14 Aug 2023 08:57:38 +0000 (10:57 +0200)] 
dnsdist: Add a 'partial read' case to the backend upgrade tests

2 years agosstuff: Document that Socket::readWithTimeout() does not handle partial reads
Remi Gacogne [Mon, 14 Aug 2023 08:56:53 +0000 (10:56 +0200)] 
sstuff: Document that Socket::readWithTimeout() does not handle partial reads

2 years agodnsdist: Properly handle short reads on backend upgrade discovery
Remi Gacogne [Mon, 14 Aug 2023 08:56:21 +0000 (10:56 +0200)] 
dnsdist: Properly handle short reads on backend upgrade discovery

2 years agoMerge pull request #13111 from franklouwers/master
Peter van Dijk [Mon, 14 Aug 2023 08:23:30 +0000 (10:23 +0200)] 
Merge pull request #13111 from franklouwers/master

Document default for `webserver-loglevel`

2 years agoAuth: always initialize id passed to dk.addKey 12086/head
Chris Hofstaedtler [Sat, 12 Aug 2023 13:31:44 +0000 (15:31 +0200)] 
Auth: always initialize id passed to dk.addKey

2 years agoAPI Auth: dedup "is API-RECTIFY enabled" code
Chris Hofstaedtler [Sat, 12 Aug 2023 11:44:46 +0000 (13:44 +0200)] 
API Auth: dedup "is API-RECTIFY enabled" code

2 years agoAPI Auth: extract addDefaultDNSSECKeys out of updateDomainSettingsFromDocument
Chris Hofstaedtler [Sat, 12 Aug 2023 11:40:06 +0000 (13:40 +0200)] 
API Auth: extract addDefaultDNSSECKeys out of updateDomainSettingsFromDocument

2 years agoAPI Auth: dedup code in updateDomainSettingsFromDocument
Chris Hofstaedtler [Sat, 12 Aug 2023 11:36:00 +0000 (13:36 +0200)] 
API Auth: dedup code in updateDomainSettingsFromDocument

2 years agoAPI Auth: restrict RRset modification for Consumer zones
Chris Hofstaedtler [Fri, 11 Aug 2023 14:24:21 +0000 (16:24 +0200)] 
API Auth: restrict RRset modification for Consumer zones

2 years agoAPI Auth: Support emptying out secondary zone without new SOA
Chris Hofstaedtler [Fri, 11 Aug 2023 11:48:16 +0000 (13:48 +0200)] 
API Auth: Support emptying out secondary zone without new SOA

2 years agoAPI Auth: add invalid RRset test for PUT zone with rrsets
Chris Hofstaedtler [Fri, 11 Aug 2023 11:20:10 +0000 (13:20 +0200)] 
API Auth: add invalid RRset test for PUT zone with rrsets

2 years agoAPI Auth: improve error message consistency
Chris Hofstaedtler [Fri, 11 Aug 2023 11:19:49 +0000 (13:19 +0200)] 
API Auth: improve error message consistency