]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
23 months agoFix 'check if hashes were created for all requested targets' 13184/head
Remi Gacogne [Mon, 28 Aug 2023 12:51:19 +0000 (14:51 +0200)] 
Fix 'check if hashes were created for all requested targets'

23 months agofix the provenance generation
Remi Gacogne [Mon, 28 Aug 2023 12:19:53 +0000 (14:19 +0200)] 
fix the provenance generation

23 months agodnsdist-1.8.x: Backport the workflow to build packages from tags
Remi Gacogne [Mon, 28 Aug 2023 09:15:41 +0000 (11:15 +0200)] 
dnsdist-1.8.x: Backport the workflow to build packages from tags

23 months agoMerge pull request #13122 from rgacogne/ddist18-auto-include-ffi-inspection
Remi Gacogne [Wed, 23 Aug 2023 15:13:28 +0000 (17:13 +0200)] 
Merge pull request #13122 from rgacogne/ddist18-auto-include-ffi-inspection

dnsdist-1.8.x: Automatically load Lua FFI inspection functions

23 months agodnsdist: add dnsdist-lua-inspection-ffi.h to dist tarballs 13122/head
Peter van Dijk [Thu, 22 Jun 2023 07:18:56 +0000 (09:18 +0200)] 
dnsdist: add dnsdist-lua-inspection-ffi.h to dist tarballs

(cherry picked from commit 46de63a6feb237e39b444c80ba82b57c4635ae52)

23 months agoMerge pull request #13123 from rgacogne/ddist18-declare-custom-metrics-at-runtime
Remi Gacogne [Wed, 23 Aug 2023 12:55:58 +0000 (14:55 +0200)] 
Merge pull request #13123 from rgacogne/ddist18-declare-custom-metrics-at-runtime

dnsdist-1.8.x: Allow declaring custom metrics at runtime

23 months agoMerge pull request #13118 from rgacogne/ddist18-fix-dnsdistconf-grp-rpm
Remi Gacogne [Wed, 23 Aug 2023 12:03:02 +0000 (14:03 +0200)] 
Merge pull request #13118 from rgacogne/ddist18-fix-dnsdistconf-grp-rpm

dnsdist-1.8.x: Fix the group of the dnsdist.conf file when installed via RPM

23 months agoMerge pull request #13133 from rgacogne/ddist18-tsig-qtype
Remi Gacogne [Wed, 23 Aug 2023 12:02:54 +0000 (14:02 +0200)] 
Merge pull request #13133 from rgacogne/ddist18-tsig-qtype

dnsdist-1.8.x: Make DNSQType.TSIG available in dnsdist

23 months agoMerge pull request #13116 from rgacogne/ddist18-discovery-short-read
Remi Gacogne [Wed, 23 Aug 2023 11:53:57 +0000 (13:53 +0200)] 
Merge pull request #13116 from rgacogne/ddist18-discovery-short-read

dnsdist-1.8.x: Properly handle short reads on backend upgrade discovery

23 months agoMerge pull request #13132 from rgacogne/ddist18-12801-SpoofAction
Remi Gacogne [Wed, 23 Aug 2023 11:53:31 +0000 (13:53 +0200)] 
Merge pull request #13132 from rgacogne/ddist18-12801-SpoofAction

dnsdist-1.8x: SpoofAction: copy the QClass from the request

23 months agoMerge pull request #13131 from rgacogne/ddist18-fix-pool-cache-metrics
Remi Gacogne [Wed, 23 Aug 2023 11:53:07 +0000 (13:53 +0200)] 
Merge pull request #13131 from rgacogne/ddist18-fix-pool-cache-metrics

dnsdist-1.8.x: Fix cache hit and miss metrics with DoH queries

23 months agoMerge pull request #13130 from rgacogne/ddist18-ossl3-ticket-leak
Remi Gacogne [Wed, 23 Aug 2023 11:52:59 +0000 (13:52 +0200)] 
Merge pull request #13130 from rgacogne/ddist18-ossl3-ticket-leak

dnsdist-1.8.x: Fix a memory leak when processing TLS tickets w/ OpenSSL 3.x

23 months agoMerge pull request #13129 from rgacogne/ddist18-wait-reconnect
Remi Gacogne [Wed, 23 Aug 2023 11:52:48 +0000 (13:52 +0200)] 
Merge pull request #13129 from rgacogne/ddist18-wait-reconnect

dnsdist-1.8.x: Properly handle reconnection failure for backend UDP sockets

23 months agoMerge pull request #13128 from rgacogne/ddist18-12840-fix-console-desc
Remi Gacogne [Wed, 23 Aug 2023 11:49:50 +0000 (13:49 +0200)] 
Merge pull request #13128 from rgacogne/ddist18-12840-fix-console-desc

dnsdist-1.8.x: Fix the console description of PoolAction and QPSPoolAction

23 months agoMerge pull request #13127 from rgacogne/ddist18-yahttp-fuzz-overflow
Remi Gacogne [Wed, 23 Aug 2023 11:49:38 +0000 (13:49 +0200)] 
Merge pull request #13127 from rgacogne/ddist18-yahttp-fuzz-overflow

dnsdist-1.8.x: YaHTTP: Prevent integer overflow on very large chunks

23 months agoMerge pull request #13126 from rgacogne/ddist18-async-test-racy
Remi Gacogne [Wed, 23 Aug 2023 11:49:27 +0000 (13:49 +0200)] 
Merge pull request #13126 from rgacogne/ddist18-async-test-racy

dnsdist-1.8.x: Remove a racy test in the AsynchronousHolder unit tests

23 months agoMerge pull request #13125 from rgacogne/ddist18-increment-dyn-blocked-ebpf
Remi Gacogne [Wed, 23 Aug 2023 11:49:17 +0000 (13:49 +0200)] 
Merge pull request #13125 from rgacogne/ddist18-increment-dyn-blocked-ebpf

dnsdist-1.8.x: Increment the "dyn blocked" counter for eBPF blocks as well

23 months agoMerge pull request #13124 from rgacogne/ddist18-12916-docker-webserver
Remi Gacogne [Wed, 23 Aug 2023 11:49:08 +0000 (13:49 +0200)] 
Merge pull request #13124 from rgacogne/ddist18-12916-docker-webserver

dnsdist-1.8.x: Fix webserver config template for our docker container

23 months agoMerge pull request #13121 from rgacogne/ddist18-fix-crypto-detection-deprecated
Remi Gacogne [Wed, 23 Aug 2023 11:34:21 +0000 (13:34 +0200)] 
Merge pull request #13121 from rgacogne/ddist18-fix-crypto-detection-deprecated

dnsdist-1.8.x: Stop using the now deprecated ERR_load_CRYPTO_strings() to detect OpenSSL

23 months agoMerge pull request #13120 from rgacogne/ddist18-libeditr
Remi Gacogne [Wed, 23 Aug 2023 11:34:05 +0000 (13:34 +0200)] 
Merge pull request #13120 from rgacogne/ddist18-libeditr

dnsdist-1.8.x: fix typo libeditr -> libedit

23 months agoMerge pull request #13119 from rgacogne/ddist18-doing-red-hat-job-myself
Remi Gacogne [Wed, 23 Aug 2023 11:33:36 +0000 (13:33 +0200)] 
Merge pull request #13119 from rgacogne/ddist18-doing-red-hat-job-myself

dnsdist-1.8.x: Work around Red Hat 8 pooping the bed in OpenSSL's headers

23 months agoMerge pull request #13117 from rgacogne/ddist18-12738-disableZeroScope
Remi Gacogne [Wed, 23 Aug 2023 11:32:50 +0000 (13:32 +0200)] 
Merge pull request #13117 from rgacogne/ddist18-12738-disableZeroScope

dnsdist-1.8.x: Undo an accidentally change of disableZeroScope to disableZeroScoping

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

(cherry picked from commit 6f0a2aec1d935a59f71ac8dfb6b8c174726071c2)

23 months 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

(cherry picked from commit d86200ac489e08be1831b524d2268b2a1b0f222f)

23 months agoMerge pull request #13150 from rgacogne/ddist18-fix-frontend-metrics-recvmmsg
Remi Gacogne [Thu, 17 Aug 2023 10:12:34 +0000 (12:12 +0200)] 
Merge pull request #13150 from rgacogne/ddist18-fix-frontend-metrics-recvmmsg

dnsdist-1.8.x: Properly record self-answered UDP responses with recvmmsg

23 months agodnsdist: Properly record self-answered UDP responses with recvmmsg 13150/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()`.

(cherry picked from commit 3692220de3633434cb88556132cbb77255440ce3)

23 months agoauth: Simplify the SQL upgrade condition 13133/head
Remi Gacogne [Mon, 3 Jul 2023 18:08:36 +0000 (20:08 +0200)] 
auth: Simplify the SQL upgrade condition

(cherry picked from commit bc90e72e012c633f04a2fa52e3f852359aee8a79)

23 months agoClarify which types are supported, implemented, meta, etc
Remi Gacogne [Fri, 12 May 2023 10:53:00 +0000 (12:53 +0200)] 
Clarify which types are supported, implemented, meta, etc

(cherry picked from commit 2e63e431478aa4ffbc59b1e821ad755f2b12db9c)

23 months agoMake DNSQType.TSIG available in dnsdist
Jacob Bunk Nielsen [Sat, 29 Apr 2023 12:45:07 +0000 (14:45 +0200)] 
Make DNSQType.TSIG available in dnsdist

(cherry picked from commit f38196e3bc40e3cc2ca67dc9cafa8c611d012978)

23 months agofix #12801 + regression test 13132/head
Christof Chen [Thu, 11 May 2023 18:00:01 +0000 (20:00 +0200)] 
fix #12801 + regression test

(cherry picked from commit 6bb404b627442d64b829edcffcc9f5fbc4987eb4)

23 months agodnsdist: Fix a boolean nit as suggested by Otto 13131/head
Remi Gacogne [Tue, 13 Jun 2023 08:02:45 +0000 (10:02 +0200)] 
dnsdist: Fix a boolean nit as suggested by Otto

(cherry picked from commit 2c9b6e8915304b24996e9382ba1e8a36713b5da4)

23 months agodnsdist: Fix cache hit and miss metrics with DoH queries
Remi Gacogne [Wed, 3 May 2023 13:02:34 +0000 (15:02 +0200)] 
dnsdist: Fix cache hit and miss metrics with DoH queries

Since we do two lookups for DoH queries forwarded over UDP (first
TCP then UDP), we need to be careful to only record a cache miss
in our last attempt.

(cherry picked from commit bc4d98b7cb2ecad488560d1dbef156708a1166af)

23 months agolibssl: Fix a memory leak when processing TLS tickets w/ OpenSSL 3.x 13130/head
Remi Gacogne [Tue, 9 May 2023 13:15:06 +0000 (15:15 +0200)] 
libssl: Fix a memory leak when processing TLS tickets w/ OpenSSL 3.x

(cherry picked from commit 0a18d0349145ae0c49b6dfef0be58bde925c4806)

23 months agodnsdist: Add a TSAN suppression for the backend re-connection code 13129/head
Remi Gacogne [Wed, 3 May 2023 15:55:34 +0000 (17:55 +0200)] 
dnsdist: Add a TSAN suppression for the backend re-connection code

(cherry picked from commit 0d199b6529f5c410d6014bf3058c717b57625553)

23 months agodnsdist: check that the UDP responder thread is running after reconnecting
Remi Gacogne [Wed, 3 May 2023 14:37:36 +0000 (16:37 +0200)] 
dnsdist: check that the UDP responder thread is running after reconnecting

(cherry picked from commit bb1ace1fedca0f6bdd2a962514cd5a6491f3c703)

23 months agodnsdist: Only log failed backend connection attempt at info on first try
Remi Gacogne [Wed, 3 May 2023 14:36:29 +0000 (16:36 +0200)] 
dnsdist: Only log failed backend connection attempt at info on first try

(cherry picked from commit 3de50c36895bc12a8555066f376e70320166c73e)

23 months agodnsdist: Properly handle reconnection failure for backend UDP sockets
Remi Gacogne [Wed, 5 Apr 2023 20:17:23 +0000 (22:17 +0200)] 
dnsdist: Properly handle reconnection failure for backend UDP sockets

We try to reconnect our UDP sockets toward backends on some kind of
network errors that indicate a topology change, but we need to be
careful to handle the case where we actually fail to reconnect, as
we end up with no remaining sockets to use.
This commit properly deals with this case by pausing the thread handling
UDP responses from the backend, instead of having it enter a busy loop,
and by attempting to reconnect if we get a `bad file number` error when
trying to send a UDP datagram to the backend.

(cherry picked from commit 541b8df1fc0773549a76c8de13fb1123baba8bda)

23 months agoUpdate dnsdist-console.cc 13128/head
phonedph1 [Thu, 18 May 2023 15:23:43 +0000 (09:23 -0600)] 
Update dnsdist-console.cc

(cherry picked from commit 6f1bb66b685ea467e94d6b06f443186e0dd80afd)

23 months agoYaHTTP: Prevent integer overflow on very large chunks 13127/head
Remi Gacogne [Wed, 8 Mar 2023 17:25:30 +0000 (18:25 +0100)] 
YaHTTP: Prevent integer overflow on very large chunks

If the chunk_size is very close to the maximum value of an integer,
we trigger an integer overflow when checking if we have a trailing
newline after the payload.
Reported by OSS-Fuzz as:
https://oss-fuzz.com/testcase-detail/6439610474692608
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56804

(cherry picked from commit b602982fc5b4fb9139dec591541e0c070ceb47f5)

23 months agodnsdist: Remove a racy test in the AsynchronousHolder unit tests 13126/head
Remi Gacogne [Mon, 12 Jun 2023 09:04:51 +0000 (11:04 +0200)] 
dnsdist: Remove a racy test in the AsynchronousHolder unit tests

We are adding an expired event so the worker thread of the
AsynchronousHolder can pick it up immediately, even before we come
back from the call to push(), which leads to a racy test.
This was observed on GitHub Actions when running with TSAN:
```
FAIL: testrunner
================

Running 170 test cases...
test-dnsdistasync.cc(156): error: in "test_dnsdistasync/test_AddingExpiredEvent": check !holder->empty() has failed

*** 1 failure is detected in the test module "unit"
FAIL testrunner (exit status: 201)
```

(cherry picked from commit 35bbac75efbd4fb8a9523ab3974bea5507484f65)

23 months agodnsdist: Increment the "dyn blocked" counter for eBPF blocks as well 13125/head
Remi Gacogne [Tue, 13 Jun 2023 12:08:56 +0000 (14:08 +0200)] 
dnsdist: Increment the "dyn blocked" counter for eBPF blocks as well

Regular, userspace blocks increment the "dyn blocked" counter for every
dropped query. The eBPF blocks are executed in kernelspace and thus do
not increment that counter at all, which makes it challenging for
reporting to do its job. On the other hand we want our eBPF code to
be as efficient as possible since it is used when performance really
matters.
This commit updates the counter when a eBPF dynamic block is removed,
which is a compromise between the performance impact and a slight
reporting delay.

(cherry picked from commit e59686d645ff5d1652f2fdef109fff5d98d70ea2)

23 months agodnsdist: Fix indentation in dnsdist-metrics.{cc,hh} 13123/head
Remi Gacogne [Mon, 14 Aug 2023 14:23:12 +0000 (16:23 +0200)] 
dnsdist: Fix indentation in dnsdist-metrics.{cc,hh}

23 months agoUpdate dockerdata/startup.py 13124/head
Houtworm [Wed, 14 Jun 2023 08:09:15 +0000 (10:09 +0200)] 
Update dockerdata/startup.py

Co-authored-by: Remi Gacogne <github@coredump.fr>
(cherry picked from commit b9e82a462fae4cf5979de3e13c68a9af2ca169c8)

23 months agofixed the webserver config line?
djonker [Tue, 13 Jun 2023 22:34:09 +0000 (00:34 +0200)] 
fixed the webserver config line?

(cherry picked from commit fa8766c59d2cdf05d86c2dd2ea21018524b35609)

23 months agodnsdist: Fix the initial value of the custom gauge in our tests
Remi Gacogne [Tue, 27 Jun 2023 14:18:04 +0000 (16:18 +0200)] 
dnsdist: Fix the initial value of the custom gauge in our tests

Thanks Otto!

(cherry picked from commit 55361195cb8d1f6c4a6e32e2504996bec67a23b4)

23 months agodnsdist: Implement a FFI method to declare a new custom metric
Remi Gacogne [Fri, 16 Jun 2023 11:39:16 +0000 (13:39 +0200)] 
dnsdist: Implement a FFI method to declare a new custom metric

(cherry picked from commit 67cbba12a6e203d17f1286421d8acfc1b13559d1)

23 months agodnsdist: Allow declaring custom metrics at runtime
Remi Gacogne [Thu, 15 Jun 2023 12:17:03 +0000 (14:17 +0200)] 
dnsdist: Allow declaring custom metrics at runtime

Also fixes a bug in the prometheus HELP and TYPE messages for custom
metrics with labels, and adds a method to increment a counter by more
than one.

(cherry picked from commit 54c1bc22f3ae1af76253efa7ba859601d6d6c45e)

23 months agodnsdist: Automatically load Lua FFI inspection functions
Remi Gacogne [Fri, 16 Jun 2023 07:46:16 +0000 (09:46 +0200)] 
dnsdist: Automatically load Lua FFI inspection functions

We used to do that for all Lua FFI functions except the ones used
for inspecting StatNode objects.

(cherry picked from commit b4fbe20d867d6f97f282f6e17d71e7e0a1346659)

23 months agoStop using the now deprecated ERR_load_CRYPTO_strings() to detect OpenSSL 13121/head
Remi Gacogne [Wed, 21 Jun 2023 12:58:15 +0000 (14:58 +0200)] 
Stop using the now deprecated ERR_load_CRYPTO_strings() to detect OpenSSL

And move to BN_new() instead, which has been present since at least
0.9.6 and is still in 3.1.

(cherry picked from commit 9fcef4932c9323b085984f8a087045fef70103f5)

23 months agodnsdist: fix typo 13120/head
Peter van Dijk [Thu, 22 Jun 2023 08:50:13 +0000 (10:50 +0200)] 
dnsdist: fix typo

(cherry picked from commit d9b4683e38076cbf8a2bcd79ebf1f7c5da88ac00)

23 months agoWork around Red Hat 8 pooping the bed in OpenSSL's headers 13119/head
Remi Gacogne [Wed, 28 Jun 2023 13:23:35 +0000 (15:23 +0200)] 
Work around Red Hat 8 pooping the bed in OpenSSL's headers

The openssl/kdf.h header on EL8 is invalid because someone backported
a work-in-progress feature to an older OpenSSL branch and did not
bother to backport the fixes that were added later.

Red Hat declined to fix their mess and helpfully suggested we do the
work instead in https://bugzilla.redhat.com/show_bug.cgi?id=2215856

(cherry picked from commit 3dabf2d4a1a478fb00a232259e8043f075eb4d03)

23 months agodnsdist: Fix the group of the dnsdist.conf file when installed via RPM 13118/head
Remi Gacogne [Tue, 1 Aug 2023 08:04:54 +0000 (10:04 +0200)] 
dnsdist: Fix the group of the dnsdist.conf file when installed via RPM

I _hope_ the `%attr` directive does the right thing, based on
http://ftp.rpm.org/max-rpm/s1-rpm-anywhere-specifying-file-attributes.html
I'm using this directive instead of calling `chgrp` in `%post` because
I'm told using `chgrp` would make `verify` complain about the ownership later.

(cherry picked from commit 32c478585461060b993a414e074daea47de94b80)

23 months agoUndo an accidentally change 13117/head
Winfried Angele [Wed, 12 Apr 2023 08:30:45 +0000 (10:30 +0200)] 
Undo an accidentally change

'disableZeroScope' was  accidentally changed to 'disableZeroScoping' in commit 597a91a3cec373ebd4172d167a0f9c7500781027

(cherry picked from commit d85c923f52d1e2140f3ecf5467b513c7b54a856e)

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

(cherry picked from commit 514e10c770c96be6bd39eb79c75ab0dc9d3a94d8)

23 months 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

(cherry picked from commit e572dbf5b545924785207ff6c6c95f441668a3f1)

23 months 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

(cherry picked from commit 9c3ff201bc70cc426170e23a7b99a14a4405c896)

23 months 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

(cherry picked from commit 1769de1da569cacf5b4c1c1b68198e42cea3e7de)

2 years agoMerge pull request #12977 from rgacogne/ddist18-fix-doh-xforwardedfor-maxtcpconnperclient
Remi Gacogne [Mon, 10 Jul 2023 08:48:51 +0000 (10:48 +0200)] 
Merge pull request #12977 from rgacogne/ddist18-fix-doh-xforwardedfor-maxtcpconnperclient

dnsdist-1.8.x: Fix a crash when X-Forwarded-For overrides the initial source IP

2 years agodnsdist: Fix a crash when X-Forwarded-For overrides the initial source IP 12977/head
Remi Gacogne [Mon, 3 Jul 2023 12:06:05 +0000 (14:06 +0200)] 
dnsdist: Fix a crash when X-Forwarded-For overrides the initial source IP

When both the processing of X-Forwarded-For DNS-over-https headers
(`trustForwardedForHeader=true`) and a maximum number of concurrent
TCP connections per client (`setMaxTCPConnectionsPerClient()`) are
enabled, dnsdist could crash because of an uncaught exception:
```
dnsdist[X]: terminate called after throwing an instance of 'std::runtime_error'
dnsdist[X]:   what():  DOH thread failed to launch: map::at
```
This was caused by the TCP connection being first accounted for with the
initial source IP (from the upstream HTTP proxy) but later released using
the IP extracted from the X-Forwarded-For header, leading to an unexpected
failure to locate the corresponding entry in the map.

We might not actually want to enforce the maximum number of concurrent
TCP connections per client when X-Forwarded-For processing is enabled,
though, because we usually want to rate limit the actual client and
not the HTTP proxy, but X-Forwarded-For being set per HTTP query, instead
of per-connection, makes that pretty much impossible at our level since
the same connection from the HTTP proxy can be reused for several clients.
The proxy protocol would be a better option to enforce that limit.

(cherry picked from commit 9b703b51ca25838eeec19449a1c49cb926aef52a)

2 years agoMerge pull request #12824 from rgacogne/ddist18-12819
Remi Gacogne [Thu, 15 Jun 2023 13:58:40 +0000 (15:58 +0200)] 
Merge pull request #12824 from rgacogne/ddist18-12819

dnsdist-1.8.x: Stop setting SO_REUSEADDR on outgoing UDP client sockets

2 years agoMerge pull request #12823 from rgacogne/ddist18-12811
Remi Gacogne [Thu, 15 Jun 2023 13:58:05 +0000 (15:58 +0200)] 
Merge pull request #12823 from rgacogne/ddist18-12811

dnsdist-1.8.x: Add the query ID to health-check log messages, fix nits

2 years agoMerge pull request #12822 from rgacogne/ddist18-12802
Remi Gacogne [Thu, 15 Jun 2023 13:57:35 +0000 (15:57 +0200)] 
Merge pull request #12822 from rgacogne/ddist18-12802

dnsdist-1.8.x: Properly set the size of the UDP health-check response

2 years agoMerge pull request #12821 from rgacogne/ddist18-12804
Remi Gacogne [Thu, 15 Jun 2023 13:56:58 +0000 (15:56 +0200)] 
Merge pull request #12821 from rgacogne/ddist18-12804

dnsdist-1.8.x: Account for the health-check run time between two runs

2 years agoMerge pull request #12820 from rgacogne/ddist18-12800
Remi Gacogne [Thu, 15 Jun 2023 13:56:25 +0000 (15:56 +0200)] 
Merge pull request #12820 from rgacogne/ddist18-12800

dnsdist-1.8.x: Print the received, invalid health-check response ID

2 years agodnsdist: Really disable REUSEADDR on outgoing UDP client sockets 12824/head
Remi Gacogne [Mon, 15 May 2023 13:32:27 +0000 (15:32 +0200)] 
dnsdist: Really disable REUSEADDR on outgoing UDP client sockets

It turns out that our `Socket::bind()` will _helpfully_ enable this
by default.

(cherry picked from commit 20f67fee9447069d4586a41254468ac060b2d65e)

2 years agodnsdist: Stop setting SO_REUSEADDR on outgoing UDP client sockets
Remi Gacogne [Mon, 15 May 2023 12:10:55 +0000 (14:10 +0200)] 
dnsdist: Stop setting SO_REUSEADDR on outgoing UDP client sockets

`SO_REUSEADDR` is useful on TCP server sockets to allow binding quickly
after restarting the process without waiting `TIME_WAIT` seconds, or
to allow some port reuse on BSD. It also allows reusing a port more
quickly for TCP client sockets.
For UDP sockets, however, Linux allows two sockets to be bound to the
same address and port, and will distribute all packets to the most
recent socket, which is very unexpected, to say the least.

(cherry picked from commit b33f09f1989e938c503142a38c556df94254443a)

2 years agodnsdist: Add the query ID to health-check log messages, fix nits 12823/head
Remi Gacogne [Thu, 11 May 2023 13:22:25 +0000 (15:22 +0200)] 
dnsdist: Add the query ID to health-check log messages, fix nits

(cherry picked from commit 385fca46ffe3a6f84806aab67d47c8b80ebac26c)

2 years agodnsdist: Properly set the size of the UDP health-check response 12822/head
Remi Gacogne [Thu, 11 May 2023 13:27:07 +0000 (15:27 +0200)] 
dnsdist: Properly set the size of the UDP health-check response

We forgot to resize the response buffer to what we actually got,
so the initial buffer size (512) was mistakenly used later on.
Technically this should not be an issue as the buffer is large
enough, but that prevents us from reporting that the response
was broken if it not large enough for a DNS header, for example.

(cherry picked from commit 6a04912e36e32104434d2b1b0625a0de0e0c002d)

2 years agodnsdist: Account for the health-check run time between two runs 12821/head
Remi Gacogne [Thu, 11 May 2023 13:07:01 +0000 (15:07 +0200)] 
dnsdist: Account for the health-check run time between two runs

We used to wait one full second between every run, which only makes
sense if the runs are not taking a long time. But as soon as we have
at least one check timing out, the run is taking roughly the time
of the longest timeout configured, so after this commit we:
- do not wait at all if the last run took more than a full second
- wait one second minus the elapsed time of the last run otherwise

(cherry picked from commit 5b48dd1425dabbba7ab6758fe3ccf2b1410faef7)

2 years agodnsdist: Print the received, invalid health-check response ID 12820/head
Remi Gacogne [Thu, 11 May 2023 08:15:44 +0000 (10:15 +0200)] 
dnsdist: Print the received, invalid health-check response ID

(cherry picked from commit bf22f0fdc1b9fe5f5d4e1d96333751542c432fe6)

2 years agoMerge pull request #12795 from rgacogne/ddist18-only-ddist-ci
Remi Gacogne [Mon, 15 May 2023 08:25:58 +0000 (10:25 +0200)] 
Merge pull request #12795 from rgacogne/ddist18-only-ddist-ci

dnsdist-1.8.x: Remove the workflows that are not relevant to dnsdist 1.8.x

2 years agoPin pyasn1 to 0.4.8 because 0.5.0 broke the API with 0.5.0 12795/head
Fred Morcos [Fri, 21 Apr 2023 08:58:14 +0000 (10:58 +0200)] 
Pin pyasn1 to 0.4.8 because 0.5.0 broke the API with 0.5.0

https://github.com/pyasn1/pyasn1/issues/28

On 20230420: https://pypi.org/project/pyasn1/#history

(cherry picked from commit 7d6cbd0823d2ebdede600dc034d852ba2c5f39c6)

2 years agodnsdist-1.8.x: Remove the workflows that are not relevant to dnsdist 1.8.x
Remi Gacogne [Tue, 9 May 2023 14:43:45 +0000 (16:43 +0200)] 
dnsdist-1.8.x: Remove the workflows that are not relevant to dnsdist 1.8.x

2 years agoMerge pull request #12682 from rgacogne/ddist-ci-wait-for dnsdist-1.8.0
Remi Gacogne [Tue, 28 Mar 2023 10:39:46 +0000 (12:39 +0200)] 
Merge pull request #12682 from rgacogne/ddist-ci-wait-for

dnsdist: Wait until dnsdist is listening on the requested port in the tests

2 years agoMerge pull request #12688 from omoerbeek/rec-bound-invariant
Otto Moerbeek [Mon, 27 Mar 2023 15:04:41 +0000 (17:04 +0200)] 
Merge pull request #12688 from omoerbeek/rec-bound-invariant

rec: re-establish "recursion depth is always increasing" invariant

2 years agoALso derive alias recursion bound from s_maxdepth. 12688/head
Otto Moerbeek [Mon, 27 Mar 2023 10:22:16 +0000 (12:22 +0200)] 
ALso derive alias recursion bound from s_maxdepth.

This should be revisited, as it looks like the check
in doCNAMECacheCheck() overrides the less strick check in
doResolveNoQNameMinimization().

2 years agodnsdist: Don't test the web server port before the concurrent conns check 12682/head
Remi Gacogne [Mon, 27 Mar 2023 08:01:51 +0000 (10:01 +0200)] 
dnsdist: Don't test the web server port before the concurrent conns check

2 years agorec: re-establish "recursion depth is always increasing" invariant
Otto Moerbeek [Thu, 23 Mar 2023 10:42:35 +0000 (11:42 +0100)] 
rec: re-establish "recursion depth is always increasing" invariant

Now that we have getQMFallbackMode(), we can go back to always increase depth
and never decrease it and adapt the upper bound check if needed.

This should prevent a re-occurence of a bug similar to PowerDNS Security Advisory 2023-01.

2 years agoMerge pull request #12687 from rgacogne/ddist-rule-params
Remi Gacogne [Sat, 25 Mar 2023 14:54:09 +0000 (15:54 +0100)] 
Merge pull request #12687 from rgacogne/ddist-rule-params

dnsdist: Fix 'Unknown key' issue for actions and rules parameters

2 years agoMerge pull request #12684 from Habbie/amazon-linux-2023
Peter van Dijk [Fri, 24 Mar 2023 22:51:20 +0000 (23:51 +0100)] 
Merge pull request #12684 from Habbie/amazon-linux-2023

builder: add amazon-2023 target

2 years agodnsdist: Fix 'Unknown key' issue for actions and rules parameters 12687/head
Remi Gacogne [Fri, 24 Mar 2023 17:26:13 +0000 (18:26 +0100)] 
dnsdist: Fix 'Unknown key' issue for actions and rules parameters

The parameters were properly parsed but not marked as consumed,
leading to warnings such as:
```
addAction: Unknown key 'name' given - ignored
```

2 years agobuilder: add amazon-2023 target 12684/head
Peter van Dijk [Tue, 21 Mar 2023 14:32:06 +0000 (15:32 +0100)] 
builder: add amazon-2023 target

2 years agoMerge pull request #12668 from aerique/feature/add-auth-48-to-repo-script
Remi Gacogne [Fri, 24 Mar 2023 13:49:27 +0000 (14:49 +0100)] 
Merge pull request #12668 from aerique/feature/add-auth-48-to-repo-script

Add auth-48 to repo test script.

2 years agodnsdist: Remove a left-over startup delay in the regression tests
Remi Gacogne [Fri, 24 Mar 2023 09:47:27 +0000 (10:47 +0100)] 
dnsdist: Remove a left-over startup delay in the regression tests

2 years agodnsdist: Wait the correct port to come up on special case tests
Remi Gacogne [Fri, 24 Mar 2023 09:47:02 +0000 (10:47 +0100)] 
dnsdist: Wait the correct port to come up on special case tests

2 years agodnsdist: Wait for the API port to be available before running the tests
Remi Gacogne [Fri, 24 Mar 2023 09:45:08 +0000 (10:45 +0100)] 
dnsdist: Wait for the API port to be available before running the tests

2 years agoMerge pull request #12672 from omoerbeek/dnsheader-aligned
Otto Moerbeek [Wed, 22 Mar 2023 13:34:59 +0000 (14:34 +0100)] 
Merge pull request #12672 from omoerbeek/dnsheader-aligned

rec and dnsdist: fix a dnsheader unaligned case

2 years agoContinue processing records after OPT in ageDNSPacket() 12672/head
Otto Moerbeek [Wed, 22 Mar 2023 10:04:13 +0000 (11:04 +0100)] 
Continue processing records after OPT in ageDNSPacket()

2 years agoMerge pull request #12664 from rgacogne/auth-svcb-race-copy-const
Remi Gacogne [Wed, 22 Mar 2023 09:17:10 +0000 (10:17 +0100)] 
Merge pull request #12664 from rgacogne/auth-svcb-race-copy-const

DNSRecord: Ensure that the content can be read or replaced, not edited

2 years agoAnother case of too early API access
Otto Moerbeek [Tue, 21 Mar 2023 16:07:46 +0000 (17:07 +0100)] 
Another case of too early API access

2 years agorec and dnsdist: fix a case of potential unaligned header access
Otto Moerbeek [Tue, 21 Mar 2023 12:34:35 +0000 (13:34 +0100)] 
rec and dnsdist: fix a case of potential unaligned header access

I addded an argument to ageDNSPacket to circumvent having to do it in
two places in rec.

I am also wondering if the break in ageDNSPakcet() is right.
I suspect we want to continue with other records even if we see an OPT
(which does not *have* to be the last as far as I know)

2 years agoMerge pull request #12661 from Habbie/auth-4.8.0-alpha1-docs
Peter van Dijk [Tue, 21 Mar 2023 13:56:38 +0000 (14:56 +0100)] 
Merge pull request #12661 from Habbie/auth-4.8.0-alpha1-docs

auth-4.8.0-alpha1: secpoll&docs

2 years agoMerge pull request #12627 from Habbie/ubuntu-lunar
Peter van Dijk [Tue, 21 Mar 2023 12:34:03 +0000 (13:34 +0100)] 
Merge pull request #12627 from Habbie/ubuntu-lunar

add ubuntu:lunar builder target and test it daily

2 years agoauth-4.8.0-alpha1: secpoll&docs 12661/head
Peter van Dijk [Fri, 17 Mar 2023 13:09:01 +0000 (14:09 +0100)] 
auth-4.8.0-alpha1: secpoll&docs

2 years agoAdd auth-48 to repo test script. 12668/head
Erik Winkels [Tue, 21 Mar 2023 09:28:13 +0000 (10:28 +0100)] 
Add auth-48 to repo test script.

2 years agoMerge pull request #12667 from omoerbeek/rec-test-notify-wait-for-api
Otto Moerbeek [Tue, 21 Mar 2023 08:39:26 +0000 (09:39 +0100)] 
Merge pull request #12667 from omoerbeek/rec-test-notify-wait-for-api

rec: Wait for the API to come alive before using it in notify test

2 years agoMerge pull request #12654 from Habbie/dnsdist-secpoll-ctime
Remi Gacogne [Tue, 21 Mar 2023 08:25:08 +0000 (09:25 +0100)] 
Merge pull request #12654 from Habbie/dnsdist-secpoll-ctime

dnsdist secpoll: explicitly include necessary ctime header for time_t

2 years agorec: Wait for the API to come alive before using it in notify test 12667/head
Otto Moerbeek [Mon, 20 Mar 2023 11:36:20 +0000 (12:36 +0100)] 
rec: Wait for the API to come alive before using it in notify test

2 years agoMerge pull request #12666 from Habbie/lmdb-bit-header auth-4.8.0-alpha1
Peter van Dijk [Mon, 20 Mar 2023 10:03:26 +0000 (11:03 +0100)] 
Merge pull request #12666 from Habbie/lmdb-bit-header

lmdb-safe: remove unused header, plus assert macro presence

2 years agolmdb-safe: remove unused header, plus assert macro presence 12666/head
Peter van Dijk [Mon, 20 Mar 2023 09:03:25 +0000 (10:03 +0100)] 
lmdb-safe: remove unused header, plus assert macro presence