]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
16 months agodnsdist: Release incoming TCP connection right away on backend failure 14016/head
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)

16 months agoMerge pull request #13976 from rgacogne/ddist19-13946
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

16 months agodnsdist: also handle EHOSTUNREACH as a case for reconnecting the socket 13976/head
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

16 months agoMerge pull request #13944 from rgacogne/ddist19-13914
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

16 months agoMerge pull request #13943 from rgacogne/ddist19-13927
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`

16 months agoMerge pull request #13940 from rgacogne/ddist19-13851
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

16 months agoMerge pull request #13945 from rgacogne/ddist19-13834
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

16 months agoMerge pull request #13942 from rgacogne/ddist19-13920
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

16 months agoMerge pull request #13941 from rgacogne/ddist19-13906
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

16 months agoMerge pull request #13939 from rgacogne/ddist19-13849
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

16 months agoMerge pull request #13938 from rgacogne/ddist19-13805
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

16 months agodnsdist: Fix clang-tidy warning 13943/head
Remi Gacogne [Tue, 19 Mar 2024 10:31:52 +0000 (11:31 +0100)] 
dnsdist: Fix clang-tidy warning

16 months agodnsdist: Fix clang-tidy warnings 13945/head
Remi Gacogne [Tue, 19 Mar 2024 10:30:33 +0000 (11:30 +0100)] 
dnsdist: Fix clang-tidy warnings

16 months agodnsdist: Properly account the failure to forward a query to a backend
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

16 months agodnsdist: Fix exponential backoff computation in edge cases
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)

16 months agodnsdist: Properly handle a failure of the first lazy health-check
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

16 months agodnsdist: Fix XSK-enabled check when reconnecting a backend 13944/head
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)

16 months agoFix clang-tidy warnings, again
Remi Gacogne [Mon, 18 Mar 2024 12:29:02 +0000 (13:29 +0100)] 
Fix clang-tidy warnings, again

(cherry picked from commit 6e58535e4cf4b5d139e66cc3c6f18f7b2e62e64a)

16 months agoAdd `pdns::openFileForWriting()` to control permissions when creating a file
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)

16 months agoFix clang-tidy warnings
Remi Gacogne [Mon, 18 Mar 2024 10:55:16 +0000 (11:55 +0100)] 
Fix clang-tidy warnings

(cherry picked from commit 114b879665a529a093e66a44347e924a3e2ab984)

16 months agoMark the `pdns::UniqueFilePtr` deleter `const noexcept`
Remi Gacogne [Mon, 18 Mar 2024 10:34:09 +0000 (11:34 +0100)] 
Mark the `pdns::UniqueFilePtr` deleter `const noexcept`

(cherry picked from commit 07d4785d49eb93a51818dae5fdbe04e7ff4e128c)

16 months agoauth: Switch to `pdns::UniqueFilePtr`
Remi Gacogne [Mon, 18 Mar 2024 09:22:12 +0000 (10:22 +0100)] 
auth: Switch to `pdns::UniqueFilePtr`

(cherry picked from commit 46c4985c721840c7d34c9199dc72beab89264836)

16 months agorec: Switch to `pdns::UniqueFilePtr`
Remi Gacogne [Mon, 18 Mar 2024 09:21:26 +0000 (10:21 +0100)] 
rec: Switch to `pdns::UniqueFilePtr`

(cherry picked from commit 01807c646de1af252681794c48a71d7b95f58df8)

16 months agodnsdist: Switch to `pdns::UniqueFilePtr`
Remi Gacogne [Tue, 19 Mar 2024 09:30:18 +0000 (10:30 +0100)] 
dnsdist: Switch to `pdns::UniqueFilePtr`

Manually backported from 931536a53367efbf9be3884b8970498aa92be774

16 months agomisc: Implement pdns::UniqueFilePtr
Remi Gacogne [Mon, 18 Mar 2024 09:19:06 +0000 (10:19 +0100)] 
misc: Implement pdns::UniqueFilePtr

Using a deleter instead of `decltype(&fclose)` has two big advantages:
- the deleter is included in the type and does not have to be passed
  when creating a new object (easier to use, less memory usage, in theory
  better inlining)
- we avoid the annoying `ignoring attributes on template argument ‘int (*)(FILE*)’`
  warning from the compiler, which is there because `fclose` is tagged as `__nonnull((1))`

(cherry picked from commit 20b2f2041a04a2e16f6bf4781c177a6aa3adec2b)

16 months agodnsdist: Shrink InternalQueryState's size by reordering its fields 13942/head
Remi Gacogne [Tue, 19 Mar 2024 09:19:38 +0000 (10:19 +0100)] 
dnsdist: Shrink InternalQueryState's size by reordering its fields

Manually backported from 1731b908b4e77b5294aad64a2c2aec750e4a03be

16 months agodnsdist: Add a regression test for IPv6 console connections 13941/head
Remi Gacogne [Tue, 12 Mar 2024 14:16:19 +0000 (15:16 +0100)] 
dnsdist: Add a regression test for IPv6 console connections

(cherry picked from commit 8be2b867e08b49cdc11a0452476229ceaa1ce6f6)

16 months agodnsdist: Fix first IPv6 console connection being rejected
Remi Gacogne [Tue, 19 Mar 2024 09:14:00 +0000 (10:14 +0100)] 
dnsdist: Fix first IPv6 console connection being rejected

Manually backported from 1a9b7f5a97e97e371bd4b6043c14d9faccb9013c.

16 months agodnsname: Fix formatting issue 13940/head
Remi Gacogne [Mon, 4 Mar 2024 10:02:56 +0000 (11:02 +0100)] 
dnsname: Fix formatting issue

(cherry picked from commit 981c43ec9b61a942b0f539084fed1a24ed3ad301)

16 months agoAdd missing views.hh reference in the Makefiles
Remi Gacogne [Mon, 4 Mar 2024 09:24:53 +0000 (10:24 +0100)] 
Add missing views.hh reference in the Makefiles

(cherry picked from commit d4cd065a24fea7fd0270a2eb102f40a06309703a)

16 months agodnsdist: Use a view for parsing ALPN data, add a regression test
Remi Gacogne [Mon, 4 Mar 2024 09:13:36 +0000 (10:13 +0100)] 
dnsdist: Use a view for parsing ALPN data, add a regression test

(cherry picked from commit 2a3c2b444812369cae285e6b67e2a72a5b8fed08)

16 months agotcpiohandler: Use server preference algoritm for ALPN selection
Doug Freed [Sun, 3 Mar 2024 09:24:34 +0000 (09:24 +0000)] 
tcpiohandler: Use server preference algoritm for ALPN selection

This complies with RFC 7301 section 3.2

(cherry picked from commit b599f69b2090a1269cdce49a53297201772c454c)

16 months agonits 13939/head
Peter van Dijk [Tue, 5 Mar 2024 13:53:46 +0000 (14:53 +0100)] 
nits

(cherry picked from commit 688d5dbdba626e3a36af37a8629c6fab6e5d5a1a)

16 months agoOnly print config if debug flag is set
Carolin Dohmen [Fri, 1 Mar 2024 15:19:04 +0000 (16:19 +0100)] 
Only print config if debug flag is set

Signed-off-by: Carolin Dohmen <carodohmen@gmail.com>
(cherry picked from commit d773b7bb99418026c3907ebd4b4e994a61fccecd)

16 months agodnsdist: Move `linux/*.h` headers to xsk.cc to fix warnings 13938/head
Remi Gacogne [Fri, 16 Feb 2024 09:32:37 +0000 (10:32 +0100)] 
dnsdist: Move `linux/*.h` headers to xsk.cc to fix warnings

(cherry picked from commit e3044aca1c21335d3d35d8e2d5cfa830efb04541)

16 months agodnsdist: Fix outdated definition for `addMaintenanceCallback()`
Remi Gacogne [Fri, 16 Feb 2024 09:32:04 +0000 (10:32 +0100)] 
dnsdist: Fix outdated definition for `addMaintenanceCallback()`

(cherry picked from commit be05f14384735756b52756c9160a2ce168da1902)

17 months agoMerge pull request #13912 from omoerbeek/backport-13909-to-dnsdist-1.9.x dnsdist-1.9.1
Remi Gacogne [Wed, 13 Mar 2024 09:36:45 +0000 (10:36 +0100)] 
Merge pull request #13912 from omoerbeek/backport-13909-to-dnsdist-1.9.x

dnsdist: Backport 13909 to dnsdist 1.9.x: update to quiche 0.20.1

17 months agodnsdist: update to quiche 0.20.1 13912/head
Otto Moerbeek [Wed, 13 Mar 2024 06:59:54 +0000 (07:59 +0100)] 
dnsdist: update to quiche 0.20.1

(cherry picked from commit 7d5a2792c199611ab26e8821a31a2cd0912f34d9)

17 months agoMerge pull request #13911 from omoerbeek/dnsdist-branch-build
Otto Moerbeek [Wed, 13 Mar 2024 09:04:11 +0000 (10:04 +0100)] 
Merge pull request #13911 from omoerbeek/dnsdist-branch-build

dnsdist 1.9.x: remove irrelevant targets from branch build

17 months agodnsdist 1.9.x: remove irrelevant targets from branch build 13911/head
Otto Moerbeek [Wed, 13 Mar 2024 08:31:09 +0000 (09:31 +0100)] 
dnsdist 1.9.x: remove irrelevant targets from branch build

17 months agoMerge pull request #13910 from omoerbeek/backport-13907-to-dnsdist-1.9.x
Otto Moerbeek [Wed, 13 Mar 2024 08:24:42 +0000 (09:24 +0100)] 
Merge pull request #13910 from omoerbeek/backport-13907-to-dnsdist-1.9.x

dnsdist: backport 13907 to 1.9.x: gh actions: wo issue 9491 - actions/runner-images

17 months agogh actions: wo issue 9491 - actions/runner-images 13910/head
romeroalx [Tue, 12 Mar 2024 16:24:31 +0000 (17:24 +0100)] 
gh actions: wo issue 9491 - actions/runner-images

(cherry picked from commit e0bf314e472d0c1d4bc1ff82d97cabf87be1e929)

18 months agoMerge pull request #13760 from rgacogne/ddist-doc-rules-mgmt dnsdist-1.9.0
Remi Gacogne [Tue, 13 Feb 2024 10:44:35 +0000 (11:44 +0100)] 
Merge pull request #13760 from rgacogne/ddist-doc-rules-mgmt

dnsdist: Refactor the rules (selectors and actions) documentation

18 months agoMerge pull request #13780 from rgacogne/ddist-better-wording-setSuffixMatchRule
Remi Gacogne [Tue, 13 Feb 2024 10:44:27 +0000 (11:44 +0100)] 
Merge pull request #13780 from rgacogne/ddist-better-wording-setSuffixMatchRule

dnsdist: Clarify that setSuffixMatchRule blocks per suffix, not labels

18 months agodnsdist: Clarify that setSuffixMatchRule blocks per suffix, not labels 13780/head
Remi Gacogne [Tue, 13 Feb 2024 09:04:08 +0000 (10:04 +0100)] 
dnsdist: Clarify that setSuffixMatchRule blocks per suffix, not labels

18 months agoMerge pull request #13779 from rgacogne/ddist-coverity-20240212
Remi Gacogne [Mon, 12 Feb 2024 09:54:21 +0000 (10:54 +0100)] 
Merge pull request #13779 from rgacogne/ddist-coverity-20240212

dnsdist: Fix performance inefficiencies reported by Coverity

18 months agodnsdist: Fix performance inefficiencies reported by Coverity 13779/head
Remi Gacogne [Mon, 12 Feb 2024 09:08:56 +0000 (10:08 +0100)] 
dnsdist: Fix performance inefficiencies reported by Coverity

Reported by Coverity as 414759 and 414760:
> Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)

18 months agoMerge pull request #13778 from M0NsTeRRR/master
Otto Moerbeek [Sun, 11 Feb 2024 18:40:36 +0000 (19:40 +0100)] 
Merge pull request #13778 from M0NsTeRRR/master

fix(doc): incorrect setting `query_local_address`

18 months agofix: replace missing query_local_address 13778/head
Ludovic Ortega [Sun, 11 Feb 2024 18:38:48 +0000 (19:38 +0100)] 
fix: replace missing query_local_address

18 months agofix(doc): incorrect setting `query_local_address`
Ludovic Ortega [Sun, 11 Feb 2024 18:29:57 +0000 (19:29 +0100)] 
fix(doc): incorrect setting `query_local_address`

18 months agoMerge pull request #13774 from rgacogne/ddist-quiche-config-atomic-load
Remi Gacogne [Fri, 9 Feb 2024 15:09:29 +0000 (16:09 +0100)] 
Merge pull request #13774 from rgacogne/ddist-quiche-config-atomic-load

dnsdist: Fix a missing explicit atomic load of the Quiche configuration

18 months agoMerge pull request #13771 from omoerbeek/dnsdist-lua-align
Remi Gacogne [Fri, 9 Feb 2024 15:00:56 +0000 (16:00 +0100)] 
Merge pull request #13771 from omoerbeek/dnsdist-lua-align

dnsdist: do not allocate 16-byte aligned objects through lua(jit)

18 months agodnsdist: Fix a missing explicit atomic load of the Quiche configuration 13774/head
Remi Gacogne [Fri, 9 Feb 2024 14:28:57 +0000 (15:28 +0100)] 
dnsdist: Fix a missing explicit atomic load of the Quiche configuration

Reported by TSAN.

18 months agoMerge pull request #13759 from rgacogne/ddist-doc-tls-certificates
Remi Gacogne [Fri, 9 Feb 2024 10:59:07 +0000 (11:59 +0100)] 
Merge pull request #13759 from rgacogne/ddist-doc-tls-certificates

dnsdist: Improve the documentation around TLS certificates and keys

18 months agodnsdist: Prevent useless allocation+copy in `setPoolServerPolicy` 13771/head
Remi Gacogne [Fri, 9 Feb 2024 10:28:12 +0000 (11:28 +0100)] 
dnsdist: Prevent useless allocation+copy in `setPoolServerPolicy`

18 months agodnsdist: Fix newServerPolicy, add regression tests for custom policies
Remi Gacogne [Fri, 9 Feb 2024 10:16:12 +0000 (11:16 +0100)] 
dnsdist: Fix newServerPolicy, add regression tests for custom policies

18 months agoMerge pull request #13391 from devicenull/master
Peter van Dijk [Fri, 9 Feb 2024 10:15:33 +0000 (11:15 +0100)] 
Merge pull request #13391 from devicenull/master

Add Lua function to pick records via name hash

18 months agoExperiment
Otto Moerbeek [Thu, 8 Feb 2024 15:36:09 +0000 (16:36 +0100)] 
Experiment

18 months agodnsdist: Fix an issue spotted by TSAN: we need to use atomic_load_explicit along... 13759/head
Remi Gacogne [Thu, 8 Feb 2024 14:58:38 +0000 (15:58 +0100)] 
dnsdist: Fix an issue spotted by TSAN: we need to use atomic_load_explicit along with atomic_store_explicit

18 months agoMerge pull request #13756 from rgacogne/ddist-xsk-doc-typos
Remi Gacogne [Thu, 8 Feb 2024 14:36:55 +0000 (15:36 +0100)] 
Merge pull request #13756 from rgacogne/ddist-xsk-doc-typos

dnsdist: Fix typos in the AF_XDP documentation

18 months agoMerge pull request #13768 from rgacogne/ddist-maintenance-hook
Remi Gacogne [Thu, 8 Feb 2024 14:31:55 +0000 (15:31 +0100)] 
Merge pull request #13768 from rgacogne/ddist-maintenance-hook

dnsdist: Add a Lua maintenance hook

18 months agoMerge pull request #13757 from rgacogne/ddist-coverty-warning-20240201
Remi Gacogne [Thu, 8 Feb 2024 14:31:09 +0000 (15:31 +0100)] 
Merge pull request #13757 from rgacogne/ddist-coverty-warning-20240201

dnsdist: Fix a warning reported by Coverity

18 months agodnsdist: make sure we do not allocate 16-byte aligned objects through lua(jit)
Otto Moerbeek [Thu, 8 Feb 2024 14:28:24 +0000 (15:28 +0100)] 
dnsdist: make sure we do not allocate 16-byte aligned objects through lua(jit)

luajit aligns only to 8 bytes by default, and some objects require
16 byte alignment.

Fixes #13766

Note that the static assert in LuaContext.hpp is commented out in
one case.  This trips on some platforms, but does not seem to be
harmful right now.

The fundamental solution remains the have luajit agree with C++ on
minimal alignment of its allocators.

18 months agodnsdist: Delint the 'reloadCertificates' methods
Remi Gacogne [Thu, 8 Feb 2024 14:23:25 +0000 (15:23 +0100)] 
dnsdist: Delint the 'reloadCertificates' methods

18 months agodnsdist: Add a regression test for DoQ certs/keys reloading
Remi Gacogne [Thu, 8 Feb 2024 13:43:18 +0000 (14:43 +0100)] 
dnsdist: Add a regression test for DoQ certs/keys reloading

18 months agodnsdist: Document certs/keys reloading for DoQ and DoH3
Remi Gacogne [Thu, 8 Feb 2024 13:42:47 +0000 (14:42 +0100)] 
dnsdist: Document certs/keys reloading for DoQ and DoH3

18 months agodnsdist: Implementation reloading of TLS certs/keys for DoQ and DoH3
Remi Gacogne [Thu, 8 Feb 2024 13:42:04 +0000 (14:42 +0100)] 
dnsdist: Implementation reloading of TLS certs/keys for DoQ and DoH3

18 months agodnsdist: Apply suggestions from code review, delint 13768/head
Remi Gacogne [Thu, 8 Feb 2024 09:43:56 +0000 (10:43 +0100)] 
dnsdist: Apply suggestions from code review, delint

18 months agoMerge pull request #13755 from rgacogne/ddist-quic-unsupported-version
Remi Gacogne [Thu, 8 Feb 2024 08:01:06 +0000 (09:01 +0100)] 
Merge pull request #13755 from rgacogne/ddist-quic-unsupported-version

dnsdist: Better handling of short, non-initial QUIC headers

18 months agodnsdist: Clear the Lua maintenance callbacks before exiting
Remi Gacogne [Tue, 6 Feb 2024 15:22:49 +0000 (16:22 +0100)] 
dnsdist: Clear the Lua maintenance callbacks before exiting

18 months agoMerge pull request #13761 from rgacogne/ddist-test-ebpf
Remi Gacogne [Tue, 6 Feb 2024 15:20:17 +0000 (16:20 +0100)] 
Merge pull request #13761 from rgacogne/ddist-test-ebpf

dnsdist: Add regression tests for eBPF blocks (static / dynamic)

18 months agoMerge pull request #12359 from Habbie/auth-lua-dblookup
Peter van Dijk [Tue, 6 Feb 2024 15:15:40 +0000 (16:15 +0100)] 
Merge pull request #12359 from Habbie/auth-lua-dblookup

auth LUA: add dblookup function

18 months agodnsdist: Add a Lua maintenance hook
Remi Gacogne [Tue, 6 Feb 2024 14:44:35 +0000 (15:44 +0100)] 
dnsdist: Add a Lua maintenance hook

Having a hook that can accept multiple callbacks makes it a lot easier
to manage the execution of several, independant tasks that needs to be
called regularly.

18 months agofix formatting 13391/head
Peter van Dijk [Fri, 1 Dec 2023 15:29:22 +0000 (16:29 +0100)] 
fix formatting

18 months agoUpdate minor code/doc nits
Brian Rak [Thu, 30 Nov 2023 16:30:26 +0000 (16:30 +0000)] 
Update minor code/doc nits

18 months agoAppease lint
Brian Rak [Thu, 19 Oct 2023 13:36:15 +0000 (13:36 +0000)] 
Appease lint

18 months agoFix typo
Brian Rak [Wed, 18 Oct 2023 20:09:30 +0000 (20:09 +0000)] 
Fix typo

18 months agoAdd Lua function to pick records via name hash
Brian Rak [Wed, 18 Oct 2023 01:24:08 +0000 (01:24 +0000)] 
Add Lua function to pick records via name hash

This adds a Lua function to return a record based on a weighted hash
of the DNS record name.  One use case here is to consistently return
the same IP address for a particular cache server based on what
subdomain is requesting the data.

18 months agocode review from otto, thanks 12359/head
Peter van Dijk [Tue, 6 Feb 2024 11:08:30 +0000 (12:08 +0100)] 
code review from otto, thanks

18 months agoMerge pull request #13743 from Habbie/auth-api-priority-error
Peter van Dijk [Tue, 6 Feb 2024 10:24:43 +0000 (11:24 +0100)] 
Merge pull request #13743 from Habbie/auth-api-priority-error

auth API: reject priority element in record, closes #12657

18 months agodnsdist: Preserve 'LLVM_PROFILE_FILE' in sudo-enabled regression tests 13761/head
Remi Gacogne [Mon, 5 Feb 2024 08:41:18 +0000 (09:41 +0100)] 
dnsdist: Preserve 'LLVM_PROFILE_FILE' in sudo-enabled regression tests

18 months agodnsdist: Reduce the timeout on Dynamic Block tests expected to fail
Remi Gacogne [Thu, 1 Feb 2024 13:46:11 +0000 (14:46 +0100)] 
dnsdist: Reduce the timeout on Dynamic Block tests expected to fail

18 months agodnsdist: Enable eBPF regression tests in our CI
Remi Gacogne [Thu, 1 Feb 2024 13:45:40 +0000 (14:45 +0100)] 
dnsdist: Enable eBPF regression tests in our CI

18 months agodnsdist: Add regression tests for eBPF blocks (static / dynamic)
Remi Gacogne [Thu, 1 Feb 2024 13:44:45 +0000 (14:44 +0100)] 
dnsdist: Add regression tests for eBPF blocks (static / dynamic)

18 months agoMerge pull request #13764 from romeroalx/fix-build-ubuntu-noble
romeroalx [Fri, 2 Feb 2024 10:43:18 +0000 (11:43 +0100)] 
Merge pull request #13764 from romeroalx/fix-build-ubuntu-noble

GH Actions: fix builds for ubuntu noble. Remove pkg usrmerge

18 months agofix builds ubuntu noble. remove pkg usrmerge 13764/head
romeroalx [Thu, 1 Feb 2024 23:35:28 +0000 (00:35 +0100)] 
fix builds ubuntu noble. remove pkg usrmerge

18 months agodnsdist: Refactor the rules (selectors and actions) documentation 13760/head
Remi Gacogne [Thu, 1 Feb 2024 14:33:37 +0000 (15:33 +0100)] 
dnsdist: Refactor the rules (selectors and actions) documentation

18 months agodnsdist: Improve the documentation around TLS certificates and keys
Remi Gacogne [Thu, 1 Feb 2024 11:16:56 +0000 (12:16 +0100)] 
dnsdist: Improve the documentation around TLS certificates and keys

18 months agodnsdist: Fix a warning reported by Coverity 13757/head
Remi Gacogne [Thu, 1 Feb 2024 09:00:19 +0000 (10:00 +0100)] 
dnsdist: Fix a warning reported by Coverity

CID 414570 and CID 414569 (Uninitialized variables) are false
positives as far as I can tell, the variables are properly set
by the call to `bpf_get_next_key`, but let's zero-initialize them
anyway, while delinting the code.

18 months agodnsdist: Better handling of short, non-initial QUIC headers 13755/head
Remi Gacogne [Thu, 1 Feb 2024 08:32:16 +0000 (09:32 +0100)] 
dnsdist: Better handling of short, non-initial QUIC headers

After a QUIC connection has been negotiated, we mostly get short QUIC
headers that do not contain the QUIC version. This is fine as long as
we still know about the connection, which might not be the case if it
has been idle for longer that our timer and thus we forgot about its
connection ID. What happens then is that we will mistakenly think that
the remote peer is trying to establish a new QUIC connection with a
version set to 0, which we don't support, and therefore start the
version negotiation process. What we should instead do is notice that
the packet is not a 'Initial' one and discard it, as we cannot open
a new connection from a short header anyway. Note that the peer knows
about our idle timer so in theory it should not try to reuse such a
connection, but it does happen from time to time.

18 months agodnsdist: Document AF_XDP's limitations 13756/head
Remi Gacogne [Thu, 1 Feb 2024 08:23:26 +0000 (09:23 +0100)] 
dnsdist: Document AF_XDP's limitations

18 months agodnsdist: Fix typos in the AF_XDP documentation
Remi Gacogne [Thu, 1 Feb 2024 08:15:50 +0000 (09:15 +0100)] 
dnsdist: Fix typos in the AF_XDP documentation

Reported by Chris Hofstaedtler (thanks!).

18 months agoMerge pull request #13746 from omoerbeek/rec-resolve-context-tidy
Otto Moerbeek [Wed, 31 Jan 2024 08:33:25 +0000 (09:33 +0100)] 
Merge pull request #13746 from omoerbeek/rec-resolve-context-tidy

rec: tidy ResolveContext class

18 months agoone last lint 13746/head
Otto Moerbeek [Tue, 30 Jan 2024 17:17:22 +0000 (18:17 +0100)] 
one last lint

18 months agoAvoid a cases of `an exception may be thrown in function '' which should not throw...
Otto Moerbeek [Tue, 30 Jan 2024 10:12:34 +0000 (11:12 +0100)] 
Avoid a cases of `an exception may be thrown in function '' which should not throw exceptions (bugprone-exception-escape)`
The use of a DNSName capture by value is the culprit. Avoid those by using
[&]', telling the compiler to figure out the captures by itself but use refs.
This *could* lead to issues if we modify the value in the lambda, so this conversion should be checked!

18 months agoMerge pull request #13740 from rgacogne/ddist-190rc1-changelog-secpoll
Remi Gacogne [Tue, 30 Jan 2024 14:02:45 +0000 (15:02 +0100)] 
Merge pull request #13740 from rgacogne/ddist-190rc1-changelog-secpoll

dnsdist: ChangeLog and secpoll update for 1.9.0-rc1

18 months agoMerge pull request #11652 from Y7n05h/xsk dnsdist-1.9.0-rc1
Remi Gacogne [Tue, 30 Jan 2024 10:56:58 +0000 (11:56 +0100)] 
Merge pull request #11652 from Y7n05h/xsk

dnsdist: add AF_XDP support for UDP

18 months agodnsdist: Apply Charles-Henri's suggestions (thanks!) 11652/head
Remi Gacogne [Tue, 30 Jan 2024 09:58:21 +0000 (10:58 +0100)] 
dnsdist: Apply Charles-Henri's suggestions (thanks!)

18 months agoMerge pull request #13749 from rgacogne/ci-binary-check-exclude-fuzzing-corpus
Remi Gacogne [Tue, 30 Jan 2024 09:38:10 +0000 (10:38 +0100)] 
Merge pull request #13749 from rgacogne/ci-binary-check-exclude-fuzzing-corpus

ci: Exclude the fuzzing/corpus dir from the 'no binary files' check

18 months agodnsdist: The 1.9.0-rc1 release has been moved to the 30th 13740/head
Remi Gacogne [Mon, 29 Jan 2024 13:18:14 +0000 (14:18 +0100)] 
dnsdist: The 1.9.0-rc1 release has been moved to the 30th