]>
git.ipfire.org Git - thirdparty/pdns.git/log
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 )
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"
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 )
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
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.
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
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
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
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
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
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
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
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
Remi Gacogne [Tue, 4 Jun 2024 15:36:23 +0000 (17:36 +0200)]
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
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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
romeroalx [Tue, 4 Jun 2024 09:16:18 +0000 (11:16 +0200)]
remove centos-8 and centos-8-stream as build targets
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
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
romeroalx [Tue, 14 May 2024 15:43:26 +0000 (17:43 +0200)]
gh actions: add WF for building and pushing images manually
romeroalx [Tue, 14 May 2024 15:40:11 +0000 (17:40 +0200)]
gh actions: modify docker.yml for building and pushing images daily (master)
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
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
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
romeroalx [Tue, 14 May 2024 15:26:05 +0000 (17:26 +0200)]
Adding liblua5.3-dev/libluajit-5.1-dev to dockerfiles
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
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
Remi Gacogne [Tue, 14 May 2024 13:37:44 +0000 (15:37 +0200)]
dnsdist: Prevent a race when calling `registerWebHandler` at runtime
Remi Gacogne [Mon, 22 Apr 2024 08:26:51 +0000 (10:26 +0200)]
dnsdist: Fix clang-tidy warnings
(cherry picked from commit
77c1af635077857d9de975d198631b3e54913e1d )
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 )
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 )
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 )
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
romeroalx [Fri, 5 Apr 2024 10:02:55 +0000 (12:02 +0200)]
gh actions - replace yq snap in collect job build-and-test-all
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.
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
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
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 )
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
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
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()`
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 )
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 )
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 )
Remi Gacogne [Tue, 26 Mar 2024 10:25:14 +0000 (11:25 +0100)]
SBOM: Fix the builder target variable
(cherry picked from commit
b17412c732f8ec98ae47926254828cb45ff825df )
Remi Gacogne [Tue, 26 Mar 2024 09:47:11 +0000 (10:47 +0100)]
Fix syntax errors
(cherry picked from commit
fef1b1c63e150b34a391bc836596657ec068de81 )
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 )
Remi Gacogne [Mon, 25 Mar 2024 19:04:13 +0000 (20:04 +0100)]
Hopefully fix SBOM generation
(cherry picked from commit
5efa3cdfbcf590068006030da64cd5673e11bf8d )
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 )
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 )
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 )
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"
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 )
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
Remi Gacogne [Thu, 4 Apr 2024 08:58:39 +0000 (10:58 +0200)]
Merge pull request #14016 from rgacogne/ddist19-backport-14005
dnsdist-1.9.x: Backport 14005 - Release incoming TCP connection right away on backend failure
Remi Gacogne [Thu, 4 Apr 2024 08:58:17 +0000 (10:58 +0200)]
Merge pull request #14012 from rgacogne/ddist19-backport-14003
dnsdist-1.9.x: Backport 14003 - Fix a null-deref in incoming DoH w/ nghttp2
Remi Gacogne [Thu, 4 Apr 2024 07:58:18 +0000 (09:58 +0200)]
Merge pull request #14013 from rgacogne/ddist19-backport-14001
dnsdist-1.9.x: Backport 14001 - Support "no server available" result from Lua FFI LB policies
Remi Gacogne [Wed, 3 Apr 2024 13:34:34 +0000 (15:34 +0200)]
Merge pull request #14014 from rgacogne/ddist19-backport-13999
dnsdist-1.9.x: Backport 13999 - Fix DNS over HTTP connections/queries counters with `nghttp2`
Remi Gacogne [Wed, 3 Apr 2024 09:40:00 +0000 (11:40 +0200)]
Merge pull request #14015 from rgacogne/ddist19-backport-14006
dnsdist-1.9-x: Backport 14006 - FDWrapper: Do not try to close negative file descriptors
Remi Gacogne [Fri, 29 Mar 2024 14:08:29 +0000 (15:08 +0100)]
dnsdist: Release failed TCP backend connections more quickly
After a timeout we cannot reuse the TCP connection to the backend
anyway, so let's release it immediately.
(cherry picked from commit
7b5f590ee72fecf54c0c40b24e98ba03a406af53 )
Remi Gacogne [Fri, 29 Mar 2024 13:22:40 +0000 (14:22 +0100)]
dnsdist: Release incoming TCP connection right away on backend failure
We used to keep a shared pointer to the incoming TCP connection around
in `TCPConnectionToBackend::d_currentQuery.d_sender` even after all queries
sent to the backend failed, which prevented the incoming TCP connection
from being closed as soon as it should have.
(cherry picked from commit
5e8f7194934857b1fd579c2ad68c56523d0e5941 )
Remi Gacogne [Tue, 2 Apr 2024 07:54:15 +0000 (09:54 +0200)]
FDWrapper: Always reset the internal descriptor to -1
Even if it was a different negative value, which happens for example
with the bpf helper functions which return `-errno`.
(cherry picked from commit
eefbe57feca72af4a088e8e872e864dc36e9284e )
Remi Gacogne [Fri, 29 Mar 2024 14:14:55 +0000 (15:14 +0100)]
FDWrapper: Do not try to close negative file descriptors
It turns out that some of the BPF helper functions return
a negative `errno` value in case of failure, and since we
wrap the return value into a `FDWrapper` right away this
led to a warning from Valgrind about trying to close an
invalid file descriptor.
(cherry picked from commit
ef1e068d55f2247ff416204cebbbb96063a175c2 )
Remi Gacogne [Thu, 28 Mar 2024 10:37:35 +0000 (11:37 +0100)]
dnsdist: Fix formatting in dnsdist-nghttp2-in.cc
(cherry picked from commit
7f4b2ec776c888f61eb9934363fa41edfaa1ba5e )
Remi Gacogne [Thu, 28 Mar 2024 10:25:34 +0000 (11:25 +0100)]
dnsdist: Add a regression test for DoH connection counters
(cherry picked from commit
82dc167be78195ebf38dd9f1e64b1ba652c2a4c8 )
Remi Gacogne [Thu, 28 Mar 2024 10:24:44 +0000 (11:24 +0100)]
dnsdist: Properly increase the HTTP connections counter w/ nghttp2
(cherry picked from commit
5fea1763bc6e0e19412e40f029b11ae4d3d8a800 )
Remi Gacogne [Thu, 28 Mar 2024 09:30:10 +0000 (10:30 +0100)]
dnsdist: Remove commented out include directive
(cherry picked from commit
79608ac498be158c8f5a94fde85d90a700963152 )
Remi Gacogne [Thu, 28 Mar 2024 09:27:15 +0000 (10:27 +0100)]
dnsdist: Increase the HTTP/1.1 query counter when DoH with 1.1 ALPN
This way we can keep track of how many HTTP/1.1 connections attempt
we see. We will not actually process the DNS over HTTP/1.1 payload
anyway when the `nghttp2` provider is used.
(cherry picked from commit
3bd0eadc3ae285266c781cbc4bfe53c78723587f )
Remi Gacogne [Fri, 29 Mar 2024 15:54:22 +0000 (16:54 +0100)]
dnsdist: Delint test-dnsdistlbpolicies_cc.cc
(cherry picked from commit
467380e1287097b26cf47193912c050bca5c77fb )
Remi Gacogne [Fri, 29 Mar 2024 15:35:55 +0000 (16:35 +0100)]
dnsdist: Fix clang-tidy warnings
(cherry picked from commit
6a2478eaf4652e89b3d40d7af182ecb3832b2e24 )
Remi Gacogne [Fri, 29 Mar 2024 14:57:19 +0000 (15:57 +0100)]
dnsdist: Clarify how to return 'no server available' from the FFI policies
(cherry picked from commit
faa96abfe2b025d2322bebb60882e6c775855c11 )
Remi Gacogne [Thu, 28 Mar 2024 16:12:48 +0000 (17:12 +0100)]
dnsdist: Support "no server available" result from Lua FFI LB policies
(cherry picked from commit
08fb08ce087af355c37dfa0bad21efca89c9ee55 )
Remi Gacogne [Fri, 29 Mar 2024 13:12:29 +0000 (14:12 +0100)]
dnsdist: Fix a null-deref in incoming DoH w/ nghttp2
When an incoming DoH connection using the `nghttp2` provider is waiting
for a response from a backend that results in a I/O error or timeout,
and the incoming connection also fails due to a I/O error or timeout,
dnsdist could in some cases try to dereference a null pointer, leading
to a crash.
(cherry picked from commit
0e809f7ec9796cae0e3cc0b6e7407083a22cc157 )
Remi Gacogne [Mon, 25 Mar 2024 14:21:42 +0000 (15:21 +0100)]
Merge pull request #13976 from rgacogne/ddist19-13946
dnsdist-1.9.x: Backport #13946 - Also handle EHOSTUNREACH as a case for reconnecting the socket
Remi Gacogne [Mon, 25 Mar 2024 09:14:59 +0000 (10:14 +0100)]
dnsdist: also handle EHOSTUNREACH as a case for reconnecting the socket
Manual backport of
c42df46af74f9af4158eebb51bfba3d1d8fb1a42 to
rel/dnsdist-1.9.x
Remi Gacogne [Mon, 25 Mar 2024 09:02:10 +0000 (10:02 +0100)]
Merge pull request #13944 from rgacogne/ddist19-13914
dnsdist-1.9.x: Backport of 13914 - Fix XSK-enabled check when reconnecting a backend
Remi Gacogne [Tue, 19 Mar 2024 13:09:32 +0000 (14:09 +0100)]
Merge pull request #13943 from rgacogne/ddist19-13927
dnsdist-1.9.x: Backport of 13927 - Fix annoying compiler warnings by introducing and switching to `pdns::UniqueFilePtr`
Remi Gacogne [Tue, 19 Mar 2024 13:09:04 +0000 (14:09 +0100)]
Merge pull request #13940 from rgacogne/ddist19-13851
dnsdist-1.9.x: Backport of #13851 - tcpiohandler: Use server preference algoritm for ALPN selection
Remi Gacogne [Tue, 19 Mar 2024 13:06:21 +0000 (14:06 +0100)]
Merge pull request #13945 from rgacogne/ddist19-13834
dnsdist-1.9.x: Backport of 13834 - dnsdist: Properly handle a failure of the first lazy health-check
Remi Gacogne [Tue, 19 Mar 2024 13:05:22 +0000 (14:05 +0100)]
Merge pull request #13942 from rgacogne/ddist19-13920
dnsdist-1.9.x: Backport of #13920 - Shrink InternalQueryState's size by reordering its fields
Remi Gacogne [Tue, 19 Mar 2024 13:05:12 +0000 (14:05 +0100)]
Merge pull request #13941 from rgacogne/ddist19-13906
dnsdist-1.9.x: Backport of #13906 - Fix first IPv6 console connection being rejected
Remi Gacogne [Tue, 19 Mar 2024 13:04:53 +0000 (14:04 +0100)]
Merge pull request #13939 from rgacogne/ddist19-13849
dnsdist-1.9.x: Backport of #13849 - Docker: Only print config if debug flag is set
Remi Gacogne [Tue, 19 Mar 2024 13:04:43 +0000 (14:04 +0100)]
Merge pull request #13938 from rgacogne/ddist19-13805
dnsdist-1.9.x: Backport of #13805 - Fix compilation warnings
Remi Gacogne [Tue, 19 Mar 2024 10:31:52 +0000 (11:31 +0100)]
dnsdist: Fix clang-tidy warning
Remi Gacogne [Tue, 19 Mar 2024 10:30:33 +0000 (11:30 +0100)]
dnsdist: Fix clang-tidy warnings
Remi Gacogne [Tue, 19 Mar 2024 09:44:16 +0000 (10:44 +0100)]
dnsdist: Properly account the failure to forward a query to a backend
Manually backported from
b0b3480b98d41db821f681183f45d5d08db02f93
Remi Gacogne [Mon, 26 Feb 2024 16:07:22 +0000 (17:07 +0100)]
dnsdist: Fix exponential backoff computation in edge cases
(cherry picked from commit
a8856ce717f439832515440af5550ca9d51f4b7d )
Remi Gacogne [Tue, 19 Mar 2024 09:40:46 +0000 (10:40 +0100)]
dnsdist: Properly handle a failure of the first lazy health-check
Manually backported from
2cd1a8d65bd8bc45458115f5827126aa537906b3
Remi Gacogne [Thu, 14 Mar 2024 09:20:08 +0000 (10:20 +0100)]
dnsdist: Fix XSK-enabled check when reconnecting a backend
The check was reverted, meaning that we did not properly remove an address:port from the XSK map when reconnecting a backend, and actually tried to remove an entry from a non-existing map when XSK is compiled in but not enabled, triggering a:
```
Error getting the XSK destination addresses map path '/sys/fs/bpf/dnsdist/xsk-destinations-v4'
```
message.
(cherry picked from commit
bb218803ee8348a4ce9cd11b97681d6eba4082cf )
Remi Gacogne [Mon, 18 Mar 2024 12:29:02 +0000 (13:29 +0100)]
Fix clang-tidy warnings, again
(cherry picked from commit
6e58535e4cf4b5d139e66cc3c6f18f7b2e62e64a )
Remi Gacogne [Mon, 18 Mar 2024 11:38:33 +0000 (12:38 +0100)]
Add `pdns::openFileForWriting()` to control permissions when creating a file
(cherry picked from commit
b1564d45616abcd65bf606fa5816449bde41af3e )