]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
11 months agodnsdist: Create the default pool early, before parsing the configuration 14640/head
Remi Gacogne [Wed, 21 Aug 2024 08:51:27 +0000 (10:51 +0200)] 
dnsdist: Create the default pool early, before parsing the configuration

(cherry picked from commit e9da418978236be775ee39aca49b71afce52f645)

11 months agodnsdist: Handle non-existent default pool when removing a server
Remi Gacogne [Wed, 21 Aug 2024 08:50:36 +0000 (10:50 +0200)] 
dnsdist: Handle non-existent default pool when removing a server

(cherry picked from commit 7faceb1faf44dc117f8405bb8ea42185beef65a7)

12 months agoMerge pull request #14492 from omoerbeek/backport-14486-to-dnsdist-1.9.x
Remi Gacogne [Thu, 18 Jul 2024 08:04:52 +0000 (10:04 +0200)] 
Merge pull request #14492 from omoerbeek/backport-14486-to-dnsdist-1.9.x

dnsdist: Backport 14486 to dnsdist 1.9.x: pin pysnmp to version 5 for regression tests

12 months agoAlso pin pysnmp version for dnsdist regression tests 14492/head
Otto Moerbeek [Wed, 17 Jul 2024 12:44:11 +0000 (14:44 +0200)] 
Also pin pysnmp version for dnsdist regression tests

(cherry picked from commit 5d3db32982e7a06a9e653529baa2fb67e24d7189)

12 months agorec: pin pysnmp to version 5 for regression tests
Otto Moerbeek [Wed, 17 Jul 2024 12:03:32 +0000 (14:03 +0200)] 
rec: pin pysnmp to version 5 for regression tests

(cherry picked from commit 4d44d3076051fe27ee91e847a3600ad19c44fd72)

13 months agoMerge pull request #14436 from rgacogne/ddist19-xsk-backend-race dnsdist-1.9.6
Remi Gacogne [Fri, 12 Jul 2024 11:28:15 +0000 (13:28 +0200)] 
Merge pull request #14436 from rgacogne/ddist19-xsk-backend-race

dnsdist-1.9.x: Backport 14429 - Fix a race in the XSK/AF_XDP backend handling code

13 months agodnsdist: Avoid a double lookup when UMEM state debugging is enabled 14436/head
Remi Gacogne [Fri, 12 Jul 2024 09:49:44 +0000 (11:49 +0200)] 
dnsdist: Avoid a double lookup when UMEM state debugging is enabled

(cherry picked from commit b9d38d08195fa8c04da16ccd4580778499993a4e)

13 months agoMerge pull request #14466 from omoerbeek/backport-14445-to-dnsdist-1.9.x
Otto Moerbeek [Fri, 12 Jul 2024 09:46:07 +0000 (11:46 +0200)] 
Merge pull request #14466 from omoerbeek/backport-14445-to-dnsdist-1.9.x

dnsdist: Backport 14445 to dnsdist 1.9.x: use el-7 for daily build

13 months agorec 4.9.x: daily build for el-7 instead of centos-7 14466/head
Otto Moerbeek [Tue, 9 Jul 2024 08:19:07 +0000 (10:19 +0200)] 
rec 4.9.x: daily build for el-7 instead of centos-7

(cherry picked from commit 8a0e619a2a7d027d24e26fb23ecade0573592382)

13 months agodnsdist: Set the shared XSK frames in the XskWorker constructor
Remi Gacogne [Fri, 12 Jul 2024 07:41:53 +0000 (09:41 +0200)] 
dnsdist: Set the shared XSK frames in the XskWorker constructor

(cherry picked from commit ae2d10d1c3eae6e5351a3914926bcf951db3fbfd)

13 months agoMerge pull request #14449 from rgacogne/ddist19-backport-14327
Remi Gacogne [Thu, 11 Jul 2024 07:21:21 +0000 (09:21 +0200)] 
Merge pull request #14449 from rgacogne/ddist19-backport-14327

dnsdist-1.9.x: Backport 14327 - add support for a callback when a new tickets key is added

13 months agoMerge pull request #14452 from rgacogne/ddist19-backport-14431
Remi Gacogne [Thu, 11 Jul 2024 07:21:07 +0000 (09:21 +0200)] 
Merge pull request #14452 from rgacogne/ddist19-backport-14431

dnsdist-1.9.x: Backport 14431 - Don't include openssl/engine.h if it's not going to be used

13 months agoFix compile error on OPENSSL_VERSION_MAJOR < 3 14449/head
Otto Moerbeek [Thu, 4 Jul 2024 11:56:21 +0000 (13:56 +0200)] 
Fix compile error on OPENSSL_VERSION_MAJOR < 3

../pdns/libssl.cc:637:28: error: no member named 'content' in 'OpenSSLTLSTicketKey'

(cherry picked from commit b1f09edc04813ecb9e70f17834ad9796432201cd)

13 months agoMerge pull request #14446 from rgacogne/ddist19-backport-14400
Remi Gacogne [Tue, 9 Jul 2024 10:53:12 +0000 (12:53 +0200)] 
Merge pull request #14446 from rgacogne/ddist19-backport-14400

dnsdist-1.9.x: Backport 14400 - Switch el7 builds to Oracle Linux 7

13 months agoMerge pull request #14450 from rgacogne/ddist19-backport-14392
Remi Gacogne [Tue, 9 Jul 2024 10:53:04 +0000 (12:53 +0200)] 
Merge pull request #14450 from rgacogne/ddist19-backport-14392

dnsdist-1.9.x: Backport of 14392 - Handle Quiche >= 0.22.0

13 months agoDon't include openssl/engine.h if it's not going to be used 14452/head
Sander Hoentjen [Fri, 5 Jul 2024 14:38:12 +0000 (16:38 +0200)] 
Don't include openssl/engine.h if it's not going to be used

(cherry picked from commit ed4ee5924b14e263d79bd682cdd0ce48758b12df)

13 months agodnsdist: Handle Quiche >= 0.22.0 14450/head
Remi Gacogne [Thu, 27 Jun 2024 14:07:20 +0000 (16:07 +0200)] 
dnsdist: Handle Quiche >= 0.22.0

Quiche broke its existing API in 0.22.0: https://github.com/cloudflare/quiche/pull/1726
This pull request adds m4 code to detect whether the Quiche version
we are building against is >= 0.22.0, and if it is defines
`HAVE_QUICHE_STREAM_ERROR_CODES` which is later used by the code
using Quiche to know which version of the API to use.

(cherry picked from commit e15b9be22b119ca3ab2d717c34d282f4e02b8cbe)

13 months agodnsdist: Use a narrower scope for tickets_key_added_hook
Remi Gacogne [Thu, 4 Jul 2024 10:09:51 +0000 (12:09 +0200)] 
dnsdist: Use a narrower scope for tickets_key_added_hook

(cherry picked from commit 2eca15eae83a1ef6b5d260a8b183a40f95d94a4f)

13 months agodnsdist: Use a recursive mutex for the Lua lock
Remi Gacogne [Wed, 3 Jul 2024 12:25:39 +0000 (14:25 +0200)] 
dnsdist: Use a recursive mutex for the Lua lock

(cherry picked from commit c16a1d43163235e883c13392964b5833c9acac4e)

13 months agodnsdist: fix build of dnsdist least version
Charles-Henri Bruyand [Wed, 3 Jul 2024 11:23:30 +0000 (13:23 +0200)] 
dnsdist: fix build of dnsdist least version

(cherry picked from commit bb202aac1e41fbf4aa0b069e21da6911bf0bd96d)

13 months agodnsdist: fix gnutls lib flags
Charles-Henri Bruyand [Wed, 3 Jul 2024 11:22:57 +0000 (13:22 +0200)] 
dnsdist: fix gnutls lib flags

(cherry picked from commit 43dc130a656def2522b62b0c2287241ad30db3f3)

13 months agodndist: apply Remi's comments, thanks
Charles-Henri Bruyand [Tue, 2 Jul 2024 13:41:18 +0000 (15:41 +0200)] 
dndist: apply Remi's comments, thanks

(cherry picked from commit 0ace84568a6562d9cfbe1e2925029b7351cf654c)

13 months agotidy
Charles-Henri Bruyand [Fri, 28 Jun 2024 08:52:01 +0000 (10:52 +0200)] 
tidy

(cherry picked from commit 3b66414c2abe313ed1ebc9e1faf373f637c47466)

13 months agodnsdist: make sure to acquire lua context lock before calling TicketsKeyAdded callback
Charles-Henri Bruyand [Fri, 28 Jun 2024 08:26:49 +0000 (10:26 +0200)] 
dnsdist: make sure to acquire lua context lock before calling TicketsKeyAdded callback

(cherry picked from commit 2e4e15de32c317ab1f7533699e8bb33aef4bc94d)

13 months agodnsdist: move the setTicketsKeyAddedHook to a unique callback for every tls context
Charles-Henri Bruyand [Thu, 27 Jun 2024 13:02:39 +0000 (15:02 +0200)] 
dnsdist: move the setTicketsKeyAddedHook to a unique callback for every tls context

(cherry picked from commit 195f89a7c59d2ce92790debad191b97f410def0c)

13 months agodnsdist: add support for a callback when a new tickets key is added to the tls context
Charles-Henri Bruyand [Fri, 14 Jun 2024 15:34:04 +0000 (17:34 +0200)] 
dnsdist: add support for a callback when a new tickets key is added to the tls context

(cherry picked from commit 3cf627ae17f7d677615b2b5325c6923a858378ed)

13 months agoswitch el7 builds to Oracle Linux 7 14446/head
Peter van Dijk [Tue, 2 Jul 2024 09:19:31 +0000 (11:19 +0200)] 
switch el7 builds to Oracle Linux 7

(cherry picked from commit 73a1b98f92c671c590540ac19d74d70499f89066)

13 months agodnsdist: Fix wrong assertions in AF_XDP/XSK code
Remi Gacogne [Tue, 9 Jul 2024 08:33:48 +0000 (10:33 +0200)] 
dnsdist: Fix wrong assertions in AF_XDP/XSK code

(cherry picked from commit e380e9d1024d5d93e8d7bd1f737af64ebaff38cb)

13 months agoMerge pull request #14438 from rgacogne/ddist-19-backport-14398
Remi Gacogne [Tue, 9 Jul 2024 08:26:31 +0000 (10:26 +0200)] 
Merge pull request #14438 from rgacogne/ddist-19-backport-14398

dnsdist-1.9.x: Backport 14398 - Make the logging functions available to all Lua environments

13 months agoMerge pull request #14439 from rgacogne/ddist-19-backport-14395
Remi Gacogne [Tue, 9 Jul 2024 08:20:48 +0000 (10:20 +0200)] 
Merge pull request #14439 from rgacogne/ddist-19-backport-14395

dnsdist-1.9.x: Backport of 14395 - Dedup Prometheus help and type lines for custom metrics with labels

13 months agoMerge pull request #14437 from rgacogne/ddist19-backport-14359
Remi Gacogne [Tue, 9 Jul 2024 07:43:24 +0000 (09:43 +0200)] 
Merge pull request #14437 from rgacogne/ddist19-backport-14359

dnsdist-1.9.x: Backport of 14359 - dns.cc: use pdns::views::UnsignedCharView

13 months agodnsdist: Dedup Prometheus help and type lines for custom metrics with labels 14439/head
Remi Gacogne [Fri, 28 Jun 2024 08:45:56 +0000 (10:45 +0200)] 
dnsdist: Dedup Prometheus help and type lines for custom metrics with labels

(cherry picked from commit 4781d5b094850dbda246366474c3ae70cc018380)

13 months agodnsdist: Make the logging functions available to all Lua environments 14438/head
Remi Gacogne [Mon, 8 Jul 2024 14:30:41 +0000 (16:30 +0200)] 
dnsdist: Make the logging functions available to all Lua environments

13 months agodns.cc: use pdns::views::UnsignedCharView 14437/head
Otto Moerbeek [Wed, 19 Jun 2024 11:10:15 +0000 (13:10 +0200)] 
dns.cc: use pdns::views::UnsignedCharView

Includes minor cleanup and additions to make UnsignedCharView usable for this use case.
Supersedes #14356
Fixes
/usr/include/c++/v1/__fwd/string_view.h:22:41: warning: 'char_traits<unsigned char>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 19, so please migrate off of it. [-Wdeprecated-declarations]

(cherry picked from commit 949ea9456dbe76e78aeff5f6f37f218549d1b493)

13 months agodnsdist: Fix code formatting
Remi Gacogne [Mon, 8 Jul 2024 12:58:20 +0000 (14:58 +0200)] 
dnsdist: Fix code formatting

(cherry picked from commit 9d0e129b7b576604a3bf7c338647b31447de72ae)

13 months agodnsdist: Make the code used to debug UMEM issues work with multiple queues
Remi Gacogne [Mon, 8 Jul 2024 12:47:54 +0000 (14:47 +0200)] 
dnsdist: Make the code used to debug UMEM issues work with multiple queues

(cherry picked from commit 251201d98561867580ff0eefe959ddb29095c880)

13 months agodnsdist: Fix a data race in the AF_XDP/XSK dnsdist <-> backend code
Remi Gacogne [Mon, 8 Jul 2024 12:43:21 +0000 (14:43 +0200)] 
dnsdist: Fix a data race in the AF_XDP/XSK dnsdist <-> backend code

The existing code was sharing the same XskWorker between the thread
handling incoming queries (possibly replying right away for
self-answered and cache hit responses) and the one handling responses
coming from a backend (without XSK), which is wrong since the internal
queues are single-producer (and single consumer, but a worker is only
assigned to a single XskRouter which is OK).
This commit introduces a new, separate worker for the threads handling
responses coming from a backend without XSK (it was already the case
for responses coming from a backend via XSK). The new worker is marked
"outgoing-only" to ensure we are not confused about what it can be used
for, which is only sending packets, not receiving any.

(cherry picked from commit 4d2d75ea171df2ac510b566a4386d13195de2314)

13 months agodnsdist: Fix a race in the XSK/AF_XDP backend handling code
Remi Gacogne [Thu, 4 Jul 2024 15:16:54 +0000 (17:16 +0200)] 
dnsdist: Fix a race in the XSK/AF_XDP backend handling code

For performance reasons we used to keep a local list of available frames
in our `XskWorker` object, like we are doing in the `XskSocket` one,
to avoid having to go to the shared list which is protected by a lock.
Unfortunately, while it works well for the `XskSocket` because it is
accessed by a single `XskRouter` thread, the `XskWorker` object can
be accessed by multiple threads at once: `XskResponderThread`,
`responderThread`, `XskClientThread` and `XskRouter`. Most of the
time these threads do not acquire nor release frames to the local
list, but `responderThread` does acquire one when a response frame
is punted to the regular networking stack, and all of them release
frames when an unexpected condition occurs, for example when a queue
is full. This leads to memory corruption and to a crash.

This commit gets rid of the local list of frames in the `XskWorker`
object, acquiring and releasing them to the shared list instead, since
performance in these cases is likely not as critical. If it turns out
to be too slow, we can look into caching a few frames in a thread-local
list, but then we need to be careful not to hold on them indefinitely
which might be tricky.

(cherry picked from commit b81c7e42fcdec03a3541329a5704487d5c9e925a)

13 months agoMerge pull request #14353 from rgacogne/ddist19-backport-14241-xdp-aarch64 dnsdist-1.9.5
Remi Gacogne [Tue, 18 Jun 2024 11:28:25 +0000 (13:28 +0200)] 
Merge pull request #14353 from rgacogne/ddist19-backport-14241-xdp-aarch64

dnsdist-1.9.x: Backport "skip libxdp-devel for rhel8-aarch64"

13 months agodnsdist.spec: skip libxdp-devel for rhel8-aarch64 14353/head
romeroalx [Tue, 21 May 2024 15:10:45 +0000 (17:10 +0200)] 
dnsdist.spec: skip libxdp-devel for rhel8-aarch64

(cherry picked from commit 7b070182728b4537489fcf33e6c382a93becb4a9)

13 months agoMerge pull request #14342 from rgacogne/ddist19-backport-14341
Remi Gacogne [Tue, 18 Jun 2024 07:35:29 +0000 (09:35 +0200)] 
Merge pull request #14342 from rgacogne/ddist19-backport-14341

dnsdist-1.9.x: Backport of 14341: Fix a race condition with custom Lua web handlers

13 months agodnsdist: Fix a race condition with custom Lua web handlers 14342/head
Remi Gacogne [Mon, 17 Jun 2024 10:42:02 +0000 (12:42 +0200)] 
dnsdist: Fix a race condition with custom Lua web handlers

Custom web handlers written in Lua modify the global Lua context,
but until now they did not take the lock protecting it so a data
race condition was possible.
Reported by TSAN while running our unit tests.

13 months agoMerge pull request #14339 from rgacogne/ddist19-backport-14302
Remi Gacogne [Mon, 17 Jun 2024 12:47:48 +0000 (14:47 +0200)] 
Merge pull request #14339 from rgacogne/ddist19-backport-14302

dnsdist-1.9.x: Backport of 14302: Add Lua FFI bindings to generate SVC responses

13 months agoMerge pull request #14334 from rgacogne/ddist19-backport-14162
Remi Gacogne [Mon, 17 Jun 2024 10:49:48 +0000 (12:49 +0200)] 
Merge pull request #14334 from rgacogne/ddist19-backport-14162

dnsdist-1.9.x: Backport of 14162: Fix a warning when compiling the unit tests without XSK

13 months agoMerge pull request #14338 from rgacogne/ddist19-backport-14255
Remi Gacogne [Mon, 17 Jun 2024 10:49:23 +0000 (12:49 +0200)] 
Merge pull request #14338 from rgacogne/ddist19-backport-14255

dnsdist-1.9.x: Backport of 14255: Add a Lua FFI function to set proxy protocol values

13 months agoMerge pull request #14337 from rgacogne/ddist19-backport-14270
Remi Gacogne [Mon, 17 Jun 2024 10:49:11 +0000 (12:49 +0200)] 
Merge pull request #14337 from rgacogne/ddist19-backport-14270

dnsdist-1.9.x: Backport of 14270: Fix 'Error creating TCP worker' error message

13 months agoMerge pull request #14336 from rgacogne/ddist19-backport-14281
Remi Gacogne [Mon, 17 Jun 2024 10:48:59 +0000 (12:48 +0200)] 
Merge pull request #14336 from rgacogne/ddist19-backport-14281

dnsdist-1.9.x: Backport of 14281: Edit the systemd unit file, `CAP_BPF` is no longer enough

13 months agoMerge pull request #14335 from rgacogne/ddist19-backport-14247
Remi Gacogne [Mon, 17 Jun 2024 10:48:42 +0000 (12:48 +0200)] 
Merge pull request #14335 from rgacogne/ddist19-backport-14247

dnsdist-1.9.x: Backport of 14247: autoconf: allow prerelease systemd versions

13 months agoMerge pull request #14333 from rgacogne/ddist19-backport-14197
Remi Gacogne [Mon, 17 Jun 2024 10:48:27 +0000 (12:48 +0200)] 
Merge pull request #14333 from rgacogne/ddist19-backport-14197

dnsdist-1.9.x: Backport of 14197: YaHTTP: Enforce max # of request fields and max request line size

13 months agoMerge pull request #14332 from rgacogne/ddist19-backport-14131
Remi Gacogne [Mon, 17 Jun 2024 10:48:14 +0000 (12:48 +0200)] 
Merge pull request #14332 from rgacogne/ddist19-backport-14131

dnsdist-1.9.x: Backport of 14131: Log the correct amount of bytes sent for DoH w/ nghttp2

13 months agodnsdist: Add Lua FFI bindings to generate SVC responses 14339/head
Remi Gacogne [Tue, 4 Jun 2024 15:36:23 +0000 (17:36 +0200)] 
dnsdist: Add Lua FFI bindings to generate SVC responses

(cherry picked from commits:
27e2f4f2f98529d8439754714cbd861336d3dee3
0b2bf7c3e6096b523c139b7304a767d0594c930a
c8823bbffab993ba0d292c74ddac08d6f200a536
)

13 months agoMerge pull request #14331 from rgacogne/ddist19-backport-14050
Remi Gacogne [Mon, 17 Jun 2024 09:27:04 +0000 (11:27 +0200)] 
Merge pull request #14331 from rgacogne/ddist19-backport-14050

dnsdist-1.9.x: Backport of #14050: Syslog should be enabled by default

13 months agodnsdist: Hopefully appease the static analyzer gods 14338/head
Remi Gacogne [Tue, 28 May 2024 08:31:02 +0000 (10:31 +0200)] 
dnsdist: Hopefully appease the static analyzer gods

(cherry picked from commit 2549d37d40720a958d0965f4cb758e3b5106e760)

13 months agodnsdist: Add a Lua FFI function to set proxy protocol values
Remi Gacogne [Tue, 28 May 2024 07:49:58 +0000 (09:49 +0200)] 
dnsdist: Add a Lua FFI function to set proxy protocol values

(cherry picked from commit 060a00a1ecfd5d064294c26b152ee6c1c1e7c295)

13 months agodnsdist: Fix 'Error creating TCP worker' error message 14337/head
Remi Gacogne [Mon, 3 Jun 2024 10:25:21 +0000 (12:25 +0200)] 
dnsdist: Fix 'Error creating TCP worker' error message

There is a dangling '%' at the end of the format string, which is
only a formatting issue because of the way our logger works but is
still ugly.

(cherry picked from commit 7d545ae15324d844c2f95b3ccf0045179bc39db0)

13 months agodnsdist: Edit the systemd unit file, `CAP_BPF` is no longer enough 14336/head
Remi Gacogne [Tue, 4 Jun 2024 14:28:31 +0000 (16:28 +0200)] 
dnsdist: Edit the systemd unit file, `CAP_BPF` is no longer enough

We used to be able to use only `CAP_BPF` since kernel 5.8, but the
eBPF verifier has been made more strict a few versions later and we
now require `CAP_SYS_ADMIN` again.

(cherry picked from commit 4470c638111963dc765be12b7680401508dda8ba)

13 months agoautoconf: allow prerelease systemd versions 14335/head
Chris Hofstaedtler [Sat, 25 May 2024 15:28:31 +0000 (17:28 +0200)] 
autoconf: allow prerelease systemd versions

For example 256~rc3. Also preemptively support versions like 252.2.

(cherry picked from commit 81e3f38b1909956e228077e4677c34f469ea9835)

13 months agodnsdist: Fix a warning when compiling the unit tests without XSK 14334/head
Remi Gacogne [Mon, 13 May 2024 11:21:05 +0000 (13:21 +0200)] 
dnsdist: Fix a warning when compiling the unit tests without XSK

(cherry picked from commit e1e0ca39d2c38fa30e8c5decc36fc7cd54be50ea)

13 months agoYaHTTP: Enforce max # of request fields and max request line size 14333/head
Your Name [Mon, 15 Apr 2024 13:45:38 +0000 (15:45 +0200)] 
YaHTTP: Enforce max # of request fields and max request line size

The default values, 8192 bytes for the maximum request line size and
100 fields, are taken from the default settings of Apache HTTPd:
- https://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline
- https://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfields

Reported by OSS-Fuzz as a timeout in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67993

(cherry picked from commit 249c86a63865e4a980511839887890c3940fc6e6)

13 months agodnsdist: Log the correct amount of bytes sent for DoH w/ nghttp2 14332/head
Remi Gacogne [Fri, 3 May 2024 13:47:54 +0000 (15:47 +0200)] 
dnsdist: Log the correct amount of bytes sent for DoH w/ nghttp2

(cherry picked from commit 35ffb61530571618ae601c0b598dd18aa2a76790)

13 months agodnsdist: syslog should be enabled by default 14331/head
Otto Moerbeek [Mon, 8 Apr 2024 11:14:21 +0000 (13:14 +0200)] 
dnsdist: syslog should be enabled by default

Regression introduced with the logging refactoring of dnsdist.

In rel/dnsdist-1.8.x: https://github.com/PowerDNS/pdns/blob/4d5bb67a2a75f9d88894e7dfc42bbbebfda297b0/pdns/dnsdist.cc#L103 :

bool g_syslog{true};

In master and 1.9.x the newly intrdoduced LoggingConfiguration::s_syslog
is inited to false.

This does not matter using the default systemd unit file as it disables syslog:

ExecStart=@bindir@/dnsdist --supervised --disable-syslog

but it does matter for non-systemd cases.

(cherry picked from commit 22931f35e56ff2c0b5e2147c157a5a765d60b8a2)

14 months agoMerge pull request #14320 from romeroalx/backport-14241-to-dnsdist-1.9.x
Alexis Romero [Thu, 13 Jun 2024 16:53:50 +0000 (18:53 +0200)] 
Merge pull request #14320 from romeroalx/backport-14241-to-dnsdist-1.9.x

dnsdist-1.9.x: Backport removal of centos-8 and centos-8-stream as build targets

14 months agoremove centos-8 and centos-8-stream as build targets 14320/head
romeroalx [Tue, 4 Jun 2024 09:16:18 +0000 (11:16 +0200)] 
remove centos-8 and centos-8-stream as build targets

14 months agoMerge pull request #14292 from romeroalx/backport-14171-to-dnsdist-1.9.x-2
Remi Gacogne [Thu, 6 Jun 2024 08:00:16 +0000 (10:00 +0200)] 
Merge pull request #14292 from romeroalx/backport-14171-to-dnsdist-1.9.x-2

dnsdist-1.9.x: backport of #14171 for fixing the build of images on new tags

14 months agogh actions: add WF for building and pushing images when a new tag is created 14292/head
romeroalx [Tue, 14 May 2024 15:45:08 +0000 (17:45 +0200)] 
gh actions: add WF for building and pushing images when a new tag is created

14 months agogh actions: add WF for building and pushing images manually
romeroalx [Tue, 14 May 2024 15:43:26 +0000 (17:43 +0200)] 
gh actions: add WF for building and pushing images manually

14 months agogh actions: modify docker.yml for building and pushing images daily (master)
romeroalx [Tue, 14 May 2024 15:40:11 +0000 (17:40 +0200)] 
gh actions: modify docker.yml for building and pushing images daily (master)

14 months agogh actions: add WF for building and pushing multi-platform images on workflow_call...
romeroalx [Tue, 14 May 2024 15:35:44 +0000 (17:35 +0200)] 
gh actions: add WF for building and pushing multi-platform images on workflow_call events

14 months agoMerge pull request #14166 from rgacogne/ddist19-backport-14078
Remi Gacogne [Thu, 23 May 2024 09:27:14 +0000 (11:27 +0200)] 
Merge pull request #14166 from rgacogne/ddist19-backport-14078

dnsdist-1.9.x: Backport of #14078 - Use the correct source IP for outgoing QUIC datagrams

14 months agoMerge pull request #14213 from romeroalx/backport-14171-to-dnsdist-1.9.x
Remi Gacogne [Tue, 21 May 2024 12:13:33 +0000 (14:13 +0200)] 
Merge pull request #14213 from romeroalx/backport-14171-to-dnsdist-1.9.x

dnsdist-1.9.x: Partial backport of #14171 for fixing the build of arm64 images

14 months agoAdding liblua5.3-dev/libluajit-5.1-dev to dockerfiles 14213/head
romeroalx [Tue, 14 May 2024 15:26:05 +0000 (17:26 +0200)] 
Adding liblua5.3-dev/libluajit-5.1-dev to dockerfiles

14 months agoMerge pull request #14170 from rgacogne/ddist19-backport-14167
Remi Gacogne [Fri, 17 May 2024 12:43:20 +0000 (14:43 +0200)] 
Merge pull request #14170 from rgacogne/ddist19-backport-14167

dnsdist-1.9.x: Backport of 14167 - Prevent a race when calling `registerWebHandler` at runtime

14 months agoMerge pull request #14163 from rgacogne/ddist19-backport-14128
Remi Gacogne [Fri, 17 May 2024 12:37:56 +0000 (14:37 +0200)] 
Merge pull request #14163 from rgacogne/ddist19-backport-14128

dnsdist-1.9.x: Backport of 14128 - Reply to HTTP/2 PING frames immediately

15 months agodnsdist: Prevent a race when calling `registerWebHandler` at runtime 14170/head
Remi Gacogne [Tue, 14 May 2024 13:37:44 +0000 (15:37 +0200)] 
dnsdist: Prevent a race when calling `registerWebHandler` at runtime

15 months agodnsdist: Fix clang-tidy warnings 14166/head
Remi Gacogne [Mon, 22 Apr 2024 08:26:51 +0000 (10:26 +0200)] 
dnsdist: Fix clang-tidy warnings

(cherry picked from commit 77c1af635077857d9de975d198631b3e54913e1d)

15 months agodnsdist: Add regression for destination address harvesting with QUIC
Remi Gacogne [Fri, 19 Apr 2024 14:37:43 +0000 (16:37 +0200)] 
dnsdist: Add regression for destination address harvesting with QUIC

(cherry picked from commit 88913b8327e1cc443b9e22224e961c0fa47bfdb7)

15 months agodnsdist: Use the correct source IP for outgoing QUIC datagrams
Remi Gacogne [Fri, 19 Apr 2024 13:58:25 +0000 (15:58 +0200)] 
dnsdist: Use the correct source IP for outgoing QUIC datagrams

And expose the correct destination IP to Lua.

(cherry picked from commit 699689aa9c7008d00bbbfa772291835bf9616110)

15 months agodnsdist: Reply to HTTP/2 PING frames immediately 14163/head
Remi Gacogne [Fri, 3 May 2024 12:28:12 +0000 (14:28 +0200)] 
dnsdist: Reply to HTTP/2 PING frames immediately

We usually buffer a bit to avoid sending a lot of small data chunks
on the wire (or to the kernel anyway), but for `HTTP/2 PING` frames
that are not followed by anything else calling for a response, this
causes an issue as these frames are designed to measure the latency
between a client and a server, and are used by HTTP/2 proxies to
ensure that a connection can be reused.

(cherry picked from commit 4170083b33b171b150257311ef832c743f4d32c6)

15 months agoMerge pull request #14150 from romeroalx/backport-14044-to-dnsdist-1.9.x
Remi Gacogne [Mon, 13 May 2024 14:18:46 +0000 (16:18 +0200)] 
Merge pull request #14150 from romeroalx/backport-14044-to-dnsdist-1.9.x

dnsdist: Backport 14044 to dnsdist-1.9.x: gh actions - replace yq snap in collect job build-and-test-all

15 months agogh actions - replace yq snap in collect job build-and-test-all 14150/head
romeroalx [Fri, 5 Apr 2024 10:02:55 +0000 (12:02 +0200)] 
gh actions - replace yq snap in collect job build-and-test-all

15 months agodnsdist: Fix handling of XFR requests over DoH dnsdist-1.9.4
Remi Gacogne [Tue, 23 Apr 2024 13:51:35 +0000 (15:51 +0200)] 
dnsdist: Fix handling of XFR requests over DoH

We did not properly handle incoming XFR requests received over DoH
When a TCP-only or DoT backend was configured, and the nghttp2 provider
used.
This commit fixes the assertion failure and makes sure that XFR
requests are denied with `NOTIMP` when received over DNS over HTTPS,
including DNS over HTTP/3. It also denies them when received over
DNS over QUIC as this is not properly handled at the moment, although
it does not cause a crash.

15 months agoMerge pull request #14087 from rgacogne/ddist19-backport-13983
Remi Gacogne [Thu, 25 Apr 2024 09:31:21 +0000 (11:31 +0200)] 
Merge pull request #14087 from rgacogne/ddist19-backport-13983

dnsdist-1.9.x: Backport 13983 - Generate Software Bill Of Materials (SBOMs) for our RPM packages

15 months agoMerge pull request #14105 from rgacogne/ddist19-backport-14104
Remi Gacogne [Thu, 25 Apr 2024 09:04:18 +0000 (11:04 +0200)] 
Merge pull request #14105 from rgacogne/ddist19-backport-14104

dnsdist-1.9.x: Backport 14104 - Fix a crash in incoming DoH with nghttp2

15 months agodnsdist: Fix a crash in incoming DoH with nghttp2 14105/head
Remi Gacogne [Thu, 18 Apr 2024 08:49:10 +0000 (10:49 +0200)] 
dnsdist: Fix a crash in incoming DoH with nghttp2

This fixes an issue in the code dealing with incoming DNS over HTTPS
queries with the nghttp2 provider. In some rare cases, if the incoming
query is forwarded to the backend over TCP and the response comes back
immediately (the `read()` call done just after the `write()` call sending
the query must succeed and yield a complete response), the processing
of the response might end up calling `IncomingHTTP2Connection::readHTTPData()`
down the line, via the `nghttp2` callbacks, while we were already
inside this function. This does not actually work because
`nghttp2_session_mem_recv` is not reentrant, so the internal state of
the `nghttp2_session` object might become inconsistent and trigger
an assertion, for example:
```
nghttp2_session.c:6854: nghttp2_session_mem_recv2: Assertion `iframe->state == NGHTTP2_IB_IGN_ALL' failed.
```

This results in a call to `abort()` and very unlikely to be exploitable,
because there is no memory corruption occurring. It would also be quite
difficult for an attacker to trigger the conditions leading to this event
remotely.

Reported by Daniel Stirnimann from Switch and Stephane Bortzmeyer, many thanks to them.

(cherry picked from commit a4d82c53f714211462ae4da2e16fb13dec51ba05)

15 months agoMerge pull request #14082 from rgacogne/ddist19-backport-14037
Remi Gacogne [Tue, 23 Apr 2024 08:57:11 +0000 (10:57 +0200)] 
Merge pull request #14082 from rgacogne/ddist19-backport-14037

dnsdist-1.9.x: Backport 14037 - Fix "C++ One Definition Rule" warnings in XSK

15 months agoMerge pull request #14080 from rgacogne/ddist19-backport-13972
Remi Gacogne [Tue, 23 Apr 2024 08:39:52 +0000 (10:39 +0200)] 
Merge pull request #14080 from rgacogne/ddist19-backport-13972

dnsdist-1.9.x: Backport 13972 - Move the version (and hashes) of external dependencies to JSON files

15 months agoMerge pull request #14081 from rgacogne/ddist19-backport-14070
Remi Gacogne [Tue, 23 Apr 2024 08:39:05 +0000 (10:39 +0200)] 
Merge pull request #14081 from rgacogne/ddist19-backport-14070

dnsdist-1.9.x: Backport 14070 - Fix DNS over plain HTTP broken by `reloadAllCertificates()`

15 months agodnsdist: Fix "C++ One Definition Rule" warnings in XSK 14082/head
Remi Gacogne [Fri, 5 Apr 2024 08:20:49 +0000 (10:20 +0200)] 
dnsdist: Fix "C++ One Definition Rule" warnings in XSK

It turns out we need to include the linux specific headers AFTER the
regular ones, because it then detects that some types have already been
defined (`sockaddr_in6` for example) and does not attempt to re-define
them, which otherwise breaks the C++ One Definition Rule

(cherry picked from commit 679360ad842c60e38f4009cecac6e1422c747889)

15 months agodnsdist: Fix DNS over plain HTTP broken by `reloadAllCertificates()` 14081/head
Remi Gacogne [Mon, 15 Apr 2024 14:58:44 +0000 (16:58 +0200)] 
dnsdist: Fix DNS over plain HTTP broken by `reloadAllCertificates()`

This was introduced in 1.9.0, with the use of the `nghttp2` library
for incoming DNS over HTTP(S).

(cherry picked from commit e07785a477d8a65d4f3eb4d110395519cf95a4db)

15 months agoSBOM: Dynamically generate the list of auth-related packages 14087/head
Remi Gacogne [Tue, 26 Mar 2024 14:36:07 +0000 (15:36 +0100)] 
SBOM: Dynamically generate the list of auth-related packages

(cherry picked from commit 94b262b9709077f7c3a4e8cd74108e2c6991a63e)

15 months agoSBOM: Fix the builder target variable
Remi Gacogne [Tue, 26 Mar 2024 10:25:14 +0000 (11:25 +0100)] 
SBOM: Fix the builder target variable

(cherry picked from commit b17412c732f8ec98ae47926254828cb45ff825df)

15 months agoFix syntax errors
Remi Gacogne [Tue, 26 Mar 2024 09:47:11 +0000 (10:47 +0100)] 
Fix syntax errors

(cherry picked from commit fef1b1c63e150b34a391bc836596657ec068de81)

15 months agoDisable SBOM generation on el-7 (almost EOL), fix it on el-8
Remi Gacogne [Tue, 26 Mar 2024 09:18:40 +0000 (10:18 +0100)] 
Disable SBOM generation on el-7 (almost EOL), fix it on el-8

(cherry picked from commit 4b54c7db6822c31d70a5661258b4ed70c58ee163)

15 months agoHopefully fix SBOM generation
Remi Gacogne [Mon, 25 Mar 2024 19:04:13 +0000 (20:04 +0100)] 
Hopefully fix SBOM generation

(cherry picked from commit 5efa3cdfbcf590068006030da64cd5673e11bf8d)

15 months agoAttempt to generate SBOMs after building packages
Remi Gacogne [Mon, 25 Mar 2024 13:51:05 +0000 (14:51 +0100)] 
Attempt to generate SBOMs after building packages

(cherry picked from commit 44503ded5e8e6f088d009177f5f951d408467b58)

15 months agoAdd license, publisher information to the external deps data 14080/head
Remi Gacogne [Mon, 25 Mar 2024 10:57:11 +0000 (11:57 +0100)] 
Add license, publisher information to the external deps data

(cherry picked from commit cb7e7db7990d4a6ea7a873e3ff4d0c63cd2f1291)

15 months agoMove the version (and hashes) of external dependencies to JSON files
Remi Gacogne [Fri, 22 Mar 2024 14:38:08 +0000 (15:38 +0100)] 
Move the version (and hashes) of external dependencies to JSON files

(cherry picked from commit 4ccb0f786bab6e752ce8f6bc8223d428754c0081)

16 months agoMerge pull request #14040 from rgacogne/ddist19-revert-14004 dnsdist-1.9.3
Remi Gacogne [Fri, 5 Apr 2024 10:49:59 +0000 (12:49 +0200)] 
Merge pull request #14040 from rgacogne/ddist19-revert-14004

dnsdist-1.9.x: Revert "dnsdist: Release failed TCP backend connections more quickly"

16 months agoRevert "dnsdist: Release failed TCP backend connections more quickly" 14040/head
Remi Gacogne [Fri, 5 Apr 2024 09:29:23 +0000 (11:29 +0200)] 
Revert "dnsdist: Release failed TCP backend connections more quickly"

This reverts commit 7b5f590ee72fecf54c0c40b24e98ba03a406af53.

(cherry picked from commit b3d13db2b0ddf5c5bea4c080330ac1e72475c918)

16 months agoMerge pull request #14017 from rgacogne/ddist19-backport-14004 dnsdist-1.9.2
Remi Gacogne [Thu, 4 Apr 2024 09:02:29 +0000 (11:02 +0200)] 
Merge pull request #14017 from rgacogne/ddist19-backport-14004

dnsdist-1.9.x: Backport 14004 - Release failed TCP backend connections more quickly