]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
2 years agoAdapt update policy load to new loadFile semantics, which throws on error. 11143/head
Otto Moerbeek [Fri, 2 Sep 2022 12:33:31 +0000 (14:33 +0200)] 
Adapt update policy load to new loadFile semantics, which throws on error.

2 years agoMore strict ENABLE_GSS_TSIG #ifdefs and checking of g_doGSSTSIG.
Otto Moerbeek [Fri, 2 Sep 2022 10:39:32 +0000 (12:39 +0200)] 
More strict ENABLE_GSS_TSIG #ifdefs and checking of g_doGSSTSIG.

In some (low level) code, g_doGSSTSIG cannot be used as the code is shared betwen various executables,
but the functionality should be conditional in the higher level processing.

This is a bit tricky to get right, so carefull checks needed.

2 years agospelling, review comments
Peter van Dijk [Fri, 25 Mar 2022 13:16:19 +0000 (14:16 +0100)] 
spelling, review comments

2 years agolibgss is not needed for build (it provides yet another gssapi implementation), but...
Otto Moerbeek [Mon, 10 Jan 2022 11:38:36 +0000 (12:38 +0100)] 
libgss is not needed for build (it provides yet another gssapi implementation), but we use the kerberos provided one.

Found out when trying to build for centos7.

2 years agoReinstate AXFR code for GSS-TSIG, respecting global enable flag.
Otto Moerbeek [Fri, 7 Jan 2022 09:36:20 +0000 (10:36 +0100)] 
Reinstate AXFR code for GSS-TSIG, respecting global enable flag.

2 years agoKill string leaks in processError
Otto Moerbeek [Fri, 7 Jan 2022 08:14:21 +0000 (09:14 +0100)] 
Kill string leaks in processError

2 years agoDocumentation updates: new runtime switch and some clarification for configuring...
Otto Moerbeek [Wed, 5 Jan 2022 12:21:56 +0000 (13:21 +0100)] 
Documentation updates: new runtime switch and some clarification for configuring zones.

2 years agoAdd feature printing so it's more easy to check if GSS-TSIG is compiled in.
Otto Moerbeek [Wed, 5 Jan 2022 12:21:43 +0000 (13:21 +0100)] 
Add feature printing so it's more easy to check if GSS-TSIG is compiled in.

2 years agoIf the update policy Lua file cannot be read, don't fall back to allow-all policy.
Otto Moerbeek [Wed, 5 Jan 2022 11:49:45 +0000 (12:49 +0100)] 
If the update policy Lua file cannot be read, don't fall back to allow-all policy.

2 years agoStart kerberos services using docker for regression tests.
Otto Moerbeek [Tue, 4 Jan 2022 15:10:46 +0000 (16:10 +0100)] 
Start kerberos services using docker for regression tests.

2 years agoAnswer can be nullptr, so test for it to avoid null deref.
Otto [Tue, 4 Jan 2022 13:22:22 +0000 (14:22 +0100)] 
Answer can be nullptr, so test for it to avoid null deref.

2 years agoAdd --enable-experimental-gss-tsig for auth build in CI.
Otto [Tue, 4 Jan 2022 08:52:30 +0000 (09:52 +0100)] 
Add --enable-experimental-gss-tsig for auth build in CI.

2 years agoIntroduce runtime switch `enable-gss-tsig` so that GSS-TSIG is disabled by default...
Otto Moerbeek [Mon, 3 Jan 2022 16:15:53 +0000 (17:15 +0100)] 
Introduce runtime switch `enable-gss-tsig` so that GSS-TSIG is disabled by default even if it is compiled in.

2 years agoBe more strict on conditional compiling (#ifdef ENABLE_GSS_TSIG), fixing non ENABLE_G...
Otto Moerbeek [Mon, 3 Jan 2022 14:28:24 +0000 (15:28 +0100)] 
Be more strict on conditional compiling (#ifdef ENABLE_GSS_TSIG), fixing non ENABLE_GSS_TSIG builds.

2 years agoAdd helper to get map counts and remove unneeded error function.
Otto Moerbeek [Fri, 24 Dec 2021 12:10:29 +0000 (13:10 +0100)] 
Add helper to get map counts and remove unneeded error function.

2 years agoRevert of 9385 (which removed GSS_TSIG functionality) and rebase to master
Otto Moerbeek [Tue, 7 Dec 2021 16:07:43 +0000 (17:07 +0100)] 
Revert of 9385 (which removed GSS_TSIG functionality) and rebase to master

Reformat according to project settings

We prefer C++ style casts and change NULL into nullptr

Move includes from gss_context.hh to gss_context.cc if possible, remove unused ones and move from boost::shared_ptr to std::shared_ptr.

Protect access to global maps by a mechanic translation to use
LockGuarded. The scopes of the locks should be verified, they might need
to be wider!

2 years agoMerge pull request #11896 from omoerbeek/rec-11881-followup
Otto Moerbeek [Fri, 2 Sep 2022 11:25:08 +0000 (13:25 +0200)] 
Merge pull request #11896 from omoerbeek/rec-11881-followup

Fix build if dnstap is not enabled

2 years agoFix build if dnstap is not enabled 11896/head
Otto Moerbeek [Fri, 2 Sep 2022 10:27:53 +0000 (12:27 +0200)] 
Fix build if dnstap is not enabled

2 years agoMerge pull request #11883 from rgacogne/ddist-optional-rings
Remi Gacogne [Fri, 2 Sep 2022 09:35:22 +0000 (11:35 +0200)] 
Merge pull request #11883 from rgacogne/ddist-optional-rings

dnsdist: Make recording queries/responses in the ringbuffers optional

2 years agoMerge pull request #11836 from Habbie/catalog-column-order
Peter van Dijk [Fri, 2 Sep 2022 07:24:03 +0000 (09:24 +0200)] 
Merge pull request #11836 from Habbie/catalog-column-order

auth catalog zones: simplify migration schemas by appending columns

2 years agoMerge pull request #11823 from fredmorcos/handle-lua-script-loading-errors
Fred Morcos [Fri, 2 Sep 2022 06:53:49 +0000 (08:53 +0200)] 
Merge pull request #11823 from fredmorcos/handle-lua-script-loading-errors

Handle Lua script loading errors

2 years agodnsdist: Deprecated setRingBuffersLockRetries() 11883/head
Remi Gacogne [Thu, 1 Sep 2022 12:22:30 +0000 (14:22 +0200)] 
dnsdist: Deprecated setRingBuffersLockRetries()

2 years agoCleanup 11823/head
Fred Morcos [Wed, 3 Aug 2022 11:34:01 +0000 (13:34 +0200)] 
Cleanup

2 years agoFormatting
Fred Morcos [Wed, 3 Aug 2022 11:32:54 +0000 (13:32 +0200)] 
Formatting

2 years agoHandle file-related errors when loading Lua scripts
Fred Morcos [Wed, 3 Aug 2022 11:09:38 +0000 (13:09 +0200)] 
Handle file-related errors when loading Lua scripts

2 years agoMerge pull request #11813 from zeha/webnoversion
Peter van Dijk [Thu, 1 Sep 2022 07:34:44 +0000 (09:34 +0200)] 
Merge pull request #11813 from zeha/webnoversion

auth/rec web: stop sending Server: header

2 years agoMerge pull request #11891 from Habbie/no-install-recommends
Peter van Dijk [Thu, 1 Sep 2022 05:41:17 +0000 (07:41 +0200)] 
Merge pull request #11891 from Habbie/no-install-recommends

builder: add --no-install-recommends to apt-get install

2 years agobuilder: add --no-install-recommends to apt-get install 11891/head
Peter van Dijk [Wed, 31 Aug 2022 10:47:25 +0000 (12:47 +0200)] 
builder: add --no-install-recommends to apt-get install

This was triggered by Ubuntu Kinetic pulling in a version of
systemd-resolved that breaks inside Docker. systemd-resolved
is an indirect (via Recommends somewhere) dependency of devscripts,
which we need.

However, if we were relying on Recommends, that was a bug, so I'm
applying the flag to all distributions.

2 years agoMerge pull request #11839 from rgacogne/ddist-ebpf-apparmor-memlock
Remi Gacogne [Tue, 30 Aug 2022 15:38:30 +0000 (17:38 +0200)] 
Merge pull request #11839 from rgacogne/ddist-ebpf-apparmor-memlock

dnsdist: Document that AppArmor can impact eBPF operations

2 years agoMerge pull request #11848 from omoerbeek/rec-throttled-maxqperq
Otto Moerbeek [Mon, 29 Aug 2022 10:51:50 +0000 (12:51 +0200)] 
Merge pull request #11848 from omoerbeek/rec-throttled-maxqperq

rec: Also check qperq limit if throttling happened, as it increases counters.

2 years agoMerge pull request #11867 from omoerbeek/rec-control-version
Otto Moerbeek [Mon, 29 Aug 2022 10:14:10 +0000 (12:14 +0200)] 
Merge pull request #11867 from omoerbeek/rec-control-version

rec_control: test for "--version" before requiring an argument.

2 years agoMerge pull request #11882 from fredmorcos/fred/11731-fix-pdnsutil-query-logging-segfault
Peter van Dijk [Mon, 29 Aug 2022 08:15:30 +0000 (10:15 +0200)] 
Merge pull request #11882 from fredmorcos/fred/11731-fix-pdnsutil-query-logging-segfault

Log "NULL" for nullptr-bound properties instead of dereferencing

2 years agoMerge pull request #11881 from omoerbeek/pb-queueData-log
Otto Moerbeek [Fri, 26 Aug 2022 14:36:11 +0000 (16:36 +0200)] 
Merge pull request #11881 from omoerbeek/pb-queueData-log

Reorganize protobuf queueData() with respect to logging

2 years agoProces review comments by rgacogne, thanks! 11881/head
Otto Moerbeek [Fri, 26 Aug 2022 13:02:46 +0000 (15:02 +0200)] 
Proces review comments by rgacogne, thanks!

2 years agodnsdist: Make recording queries/responses in the ringbuffers optional
Remi Gacogne [Tue, 16 Aug 2022 15:07:14 +0000 (17:07 +0200)] 
dnsdist: Make recording queries/responses in the ringbuffers optional

2 years agoLog "NULL" for nullptr-bound properties instead of dereferencing 11882/head
Fred Morcos [Wed, 24 Aug 2022 21:13:49 +0000 (23:13 +0200)] 
Log "NULL" for nullptr-bound properties instead of dereferencing

Fixes the issue where pdnsutil would segfault when query logging is enabled, and would
leave the db unmodified. Surprisingly, the segfault only happened on FreeBSD.

Fixes #11731

2 years agoReorganize queueData() with respect to logging.
Otto Moerbeek [Wed, 24 Aug 2022 07:56:26 +0000 (09:56 +0200)] 
Reorganize queueData() with respect to logging.

Let queueData() return a status and log that via a program supplied helper.
This way, the program specific (recursor,dnsdist) logging isn't polluting the common code.

There are a few other cases that need to be dealt with some day.

dnsdist log levels should be reviewed (I copied the existing), they might be too verbose.

2 years agouse TEXT consistently between pg schema and migration 11836/head
Peter van Dijk [Tue, 23 Aug 2022 14:21:36 +0000 (16:21 +0200)] 
use TEXT consistently between pg schema and migration

2 years agodo sqlite migration without temp table
Peter van Dijk [Tue, 23 Aug 2022 14:19:31 +0000 (16:19 +0200)] 
do sqlite migration without temp table

2 years agoMerge pull request #11878 from omoerbeek/rec-psa-2022-02-tweaks
Otto Moerbeek [Tue, 23 Aug 2022 14:15:54 +0000 (16:15 +0200)] 
Merge pull request #11878 from omoerbeek/rec-psa-2022-02-tweaks

PSA 2022-02 tweaks and add PR#'s

2 years agoPSA 2022-02 tweaks and add PR#'s 11878/head
Otto Moerbeek [Tue, 23 Aug 2022 11:36:02 +0000 (13:36 +0200)] 
PSA 2022-02 tweaks and add PR#'s

2 years agoMerge pull request #11874 from omoerbeek/rec-pb-size
Otto Moerbeek [Tue, 23 Aug 2022 10:17:02 +0000 (12:17 +0200)] 
Merge pull request #11874 from omoerbeek/rec-pb-size

Rec: check protobuf size

2 years agoMerge pull request #11873 from omoerbeek/rec-prep-20220823
Otto Moerbeek [Tue, 23 Aug 2022 09:55:38 +0000 (11:55 +0200)] 
Merge pull request #11873 from omoerbeek/rec-prep-20220823

Rec prep 20220823

2 years agoApply suggestions from code review 11873/head
Otto Moerbeek [Tue, 23 Aug 2022 09:50:34 +0000 (11:50 +0200)] 
Apply suggestions from code review

Co-authored-by: Peter van Dijk <peter.van.dijk@powerdns.com>
2 years agoCheck variable length cases to not create protobufs > max / 2 11874/head
Otto Moerbeek [Fri, 5 Aug 2022 08:21:01 +0000 (10:21 +0200)] 
Check variable length cases to not create protobufs > max / 2

2 years agoCheck sizes of generated protobuf messages
Otto Moerbeek [Wed, 3 Aug 2022 09:33:02 +0000 (11:33 +0200)] 
Check sizes of generated protobuf messages

2 years agoMerge pull request #11869 from omoerbeek/rec-maintenance-metrics
Otto Moerbeek [Tue, 23 Aug 2022 07:13:56 +0000 (09:13 +0200)] 
Merge pull request #11869 from omoerbeek/rec-maintenance-metrics

rec: Keep time and count metrics when maintenance is called.

2 years agoAdd 2022-02 PSA
Otto Moerbeek [Mon, 22 Aug 2022 12:00:15 +0000 (14:00 +0200)] 
Add 2022-02 PSA

2 years agoThese metrics are counters 11869/head
Otto Moerbeek [Mon, 22 Aug 2022 12:50:03 +0000 (14:50 +0200)] 
These metrics are counters

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agoMerge pull request #11842 from mind04/auth-remotes
Peter van Dijk [Mon, 22 Aug 2022 12:43:35 +0000 (14:43 +0200)] 
Merge pull request #11842 from mind04/auth-remotes

auth: use getInnerRemote() for the remotes ring

2 years agoauth catalog zones: simplify migration schemas by appending columns
Peter van Dijk [Mon, 8 Aug 2022 13:51:50 +0000 (15:51 +0200)] 
auth catalog zones: simplify migration schemas by appending columns

2 years agoFix MIB, it was missing the objects defs.
Otto Moerbeek [Mon, 22 Aug 2022 11:52:03 +0000 (13:52 +0200)] 
Fix MIB, it was missing the objects defs.

2 years agorec: Keep time and count metrics when maintenance is called.
Otto Moerbeek [Mon, 22 Aug 2022 09:40:38 +0000 (11:40 +0200)] 
rec: Keep time and count metrics when maintenance is called.

Fixes #6981

2 years agorec_control: test for "--version" before requiring an argument. 11867/head
Otto Moerbeek [Mon, 22 Aug 2022 08:30:44 +0000 (10:30 +0200)] 
rec_control: test for "--version" before requiring an argument.

Fixes #11864

2 years agoPrep for August 23 2022 releases
Otto Moerbeek [Mon, 22 Aug 2022 07:29:57 +0000 (09:29 +0200)] 
Prep for August 23 2022 releases

2 years agoMerge pull request #11849 from omoerbeek/rec-dns64-vs-rcode
Otto Moerbeek [Mon, 22 Aug 2022 06:49:34 +0000 (08:49 +0200)] 
Merge pull request #11849 from omoerbeek/rec-dns64-vs-rcode

Rec: consider dns64 processing in more cases than Rcode == NoError

2 years agoMerge pull request #11859 from omoerbeek/rec-incfiles
Otto Moerbeek [Mon, 22 Aug 2022 05:52:13 +0000 (07:52 +0200)] 
Merge pull request #11859 from omoerbeek/rec-incfiles

rec: only include minimized js files and remove unused underscore*.js

2 years agoTwo more DNS64 test cases: "timeout on AAAA" and "Lua handled things" 11849/head
Otto Moerbeek [Fri, 19 Aug 2022 10:01:16 +0000 (12:01 +0200)] 
Two more DNS64 test cases: "timeout on AAAA" and "Lua handled things"

2 years agoMerge pull request #11819 from darnuria/auth-tsan-supp
Remi Gacogne [Fri, 19 Aug 2022 07:37:48 +0000 (09:37 +0200)] 
Merge pull request #11819 from darnuria/auth-tsan-supp

[tsan] add data race suppression for avg_latency and send_latencyres …

2 years ago[tsan] Data race suppression for avg_latency and send_latency globals. 11819/head
Axel Viala [Tue, 2 Aug 2022 21:06:22 +0000 (23:06 +0200)] 
[tsan] Data race suppression for avg_latency and send_latency globals.

See <https://github.com/PowerDNS/pdns/issues/11814>

2 years agoUpdate pdns/pdns_recursor.cc
Otto Moerbeek [Wed, 17 Aug 2022 15:15:33 +0000 (17:15 +0200)] 
Update pdns/pdns_recursor.cc

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agoMerge pull request #11672 from phonedph1/patch-33
Otto Moerbeek [Wed, 17 Aug 2022 10:04:40 +0000 (12:04 +0200)] 
Merge pull request #11672 from phonedph1/patch-33

rec: make rec zone files with trailing dot

2 years agoMore consistent naming 11859/head
Otto Moerbeek [Wed, 17 Aug 2022 07:48:41 +0000 (09:48 +0200)] 
More consistent naming

2 years agoOnly include files really needed: skip non-mminimzed versions and LICENSE and fix...
Otto Moerbeek [Wed, 17 Aug 2022 07:35:39 +0000 (09:35 +0200)] 
Only include files really needed: skip non-mminimzed versions and LICENSE and fix dependencies

2 years agoClean up javascript files
Otto Moerbeek [Wed, 17 Aug 2022 07:33:08 +0000 (09:33 +0200)] 
Clean up javascript files

- d3.js is actually the minimized verison of d3.v3.js
- introduce minimized version of handlebars
- delete underscore*.js as it is unused

2 years agoMerge pull request #11857 from omoerbeek/rec-link-libcrypto-rec_control
Otto Moerbeek [Tue, 16 Aug 2022 12:45:38 +0000 (14:45 +0200)] 
Merge pull request #11857 from omoerbeek/rec-link-libcrypto-rec_control

res: Set rec_control_LDFLAGS, needed for MacOS or any platforms where libcrypto is not in default lib path.

2 years agoMerge pull request #11852 from rgacogne/ddist-less-contention-servers
Remi Gacogne [Tue, 16 Aug 2022 12:44:48 +0000 (14:44 +0200)] 
Merge pull request #11852 from rgacogne/ddist-less-contention-servers

dnsdist: Slightly reduce contention around a pool's servers

2 years agoMerge pull request #11850 from fredmorcos/fred/11795-fix-recursor-not-responsive...
Otto Moerbeek [Tue, 16 Aug 2022 12:19:39 +0000 (14:19 +0200)] 
Merge pull request #11850 from fredmorcos/fred/11795-fix-recursor-not-responsive-after-config-reload

Fix recursor not responsive after Lua config reload

2 years agoDocument desired DNS674 behaviour and tweak implementation to adhere to docs.
Otto Moerbeek [Tue, 16 Aug 2022 12:07:27 +0000 (14:07 +0200)] 
Document desired DNS674 behaviour and tweak implementation to adhere to docs.

2 years agoMerge pull request #11851 from rgacogne/ddist-doh-only-call-getsockname-once
Remi Gacogne [Tue, 16 Aug 2022 12:15:59 +0000 (14:15 +0200)] 
Merge pull request #11851 from rgacogne/ddist-doh-only-call-getsockname-once

dnsdist: Only call getsockname() once per incoming DoH connection

2 years agodnsdist: Make ServerPolicy::NumberedServerVector const 11852/head
Remi Gacogne [Tue, 16 Aug 2022 11:35:27 +0000 (13:35 +0200)] 
dnsdist: Make ServerPolicy::NumberedServerVector const

As suggested by Otto (Thanks!).

2 years agoMerge pull request #11845 from rgacogne/ddist-better-stats-handling
Remi Gacogne [Tue, 16 Aug 2022 11:25:58 +0000 (13:25 +0200)] 
Merge pull request #11845 from rgacogne/ddist-better-stats-handling

dnsdist: Better handling of the different types of metrics

2 years agoMerge pull request #11844 from rgacogne/ddist-destroy-initial-health-mplexer
Remi Gacogne [Tue, 16 Aug 2022 11:24:34 +0000 (13:24 +0200)] 
Merge pull request #11844 from rgacogne/ddist-destroy-initial-health-mplexer

dnsdist: Do not keep the mplexer created for the initial health-check around

2 years agoMerge pull request #11798 from rgacogne/ddist-fix-cache-counters-latency
Remi Gacogne [Tue, 16 Aug 2022 11:24:04 +0000 (13:24 +0200)] 
Merge pull request #11798 from rgacogne/ddist-fix-cache-counters-latency

dnsdist: Fix latency and counters update for UDP cache hits

2 years agoMerge pull request #11790 from rgacogne/ddist-fix-exception-discovery
Remi Gacogne [Tue, 16 Aug 2022 11:23:49 +0000 (13:23 +0200)] 
Merge pull request #11790 from rgacogne/ddist-fix-exception-discovery

dnsdist: Use the correct delay when a backend cannot be upgraded to Do{T,H}

2 years agoMerge pull request #11812 from zeha/recnojquery
Otto Moerbeek [Tue, 16 Aug 2022 11:23:41 +0000 (13:23 +0200)] 
Merge pull request #11812 from zeha/recnojquery

Recursor: replace/remove jQuery

2 years agoMerge pull request #11854 from omoerbeek/rec-slog-ws-followup
Otto Moerbeek [Tue, 16 Aug 2022 11:21:12 +0000 (13:21 +0200)] 
Merge pull request #11854 from omoerbeek/rec-slog-ws-followup

rec: structured logging for sebserver followup: An HttpException creates a new response body.

2 years agoSet rec_control_LDFLAGS, needed for MacOS or any platforms where libcryto is not... 11857/head
Otto Moerbeek [Tue, 16 Aug 2022 10:31:46 +0000 (12:31 +0200)] 
Set rec_control_LDFLAGS, needed for MacOS or any platforms where libcryto is not in default lib path.

Fixes #11855

2 years agorec js: use searchParams.append to build URL 11812/head
Chris Hofstaedtler [Tue, 16 Aug 2022 10:12:52 +0000 (12:12 +0200)] 
rec js: use searchParams.append to build URL

2 years agorec: split config for fetch out of get_json
Chris Hofstaedtler [Wed, 3 Aug 2022 18:48:16 +0000 (20:48 +0200)] 
rec: split config for fetch out of get_json

Makes for easier development of the embedded JS/HTML files.
To use this, use the commented out fetchConfig, and open index.html
in a browser directly from the filesystem.

2 years agoAn HttpException creates a new response body. 11854/head
Otto Moerbeek [Tue, 16 Aug 2022 08:00:52 +0000 (10:00 +0200)] 
An HttpException creates a new response body.

Initialize the s_dlog field of that new response. I would prefer to do that in the
exception's ct, but we do not have the uniqueid there.

2 years agoMerge pull request #11838 from rgacogne/ddist-fix-cdb-tests
Remi Gacogne [Mon, 15 Aug 2022 19:31:23 +0000 (21:31 +0200)] 
Merge pull request #11838 from rgacogne/ddist-fix-cdb-tests

dnsdist: Fix a possible race in the CDB reload regression tests

2 years agoRec: Move FrameStreamServersInfo to rec-main 11850/head
Fred Morcos [Fri, 12 Aug 2022 11:25:25 +0000 (13:25 +0200)] 
Rec: Move FrameStreamServersInfo to rec-main

2 years agoRec: Asynchronously destroy old connections to dnstap servers
Fred Morcos [Thu, 11 Aug 2022 13:35:29 +0000 (15:35 +0200)] 
Rec: Asynchronously destroy old connections to dnstap servers

With @omoerbeek

Closes #11795

2 years agoRec: Don't reload Lua config if it hasn't changed
Fred Morcos [Thu, 11 Aug 2022 13:27:38 +0000 (15:27 +0200)] 
Rec: Don't reload Lua config if it hasn't changed

This also groups together 1) the list of frame stream servers, 2) the config from which
the list was created and 3) the config's generation into a single struct called
FrameStreamServersInfo. The struct is used to compare the old and new configuration to
decide whether to destroy the old config object or not.

Part of #11795

2 years agodnsdist: Slightly reduce contention around a pool's servers
Remi Gacogne [Fri, 12 Aug 2022 08:50:04 +0000 (10:50 +0200)] 
dnsdist: Slightly reduce contention around a pool's servers

We only need to take the lock to get the shared pointer, as the
actual content is guaranteed not to change, so we do not need to
hold the lock while we iterate over the servers list to check
whether they are up, or what their current outstanding count is.

2 years agoTransform a AAAA NoData result into a FormErr in Lua and see if dns64 is still applied
Otto Moerbeek [Fri, 12 Aug 2022 08:28:37 +0000 (10:28 +0200)] 
Transform a AAAA NoData result into a FormErr in Lua and see if dns64 is still applied

2 years agoMove dns64 processing before postresolve processing
Otto Moerbeek [Fri, 12 Aug 2022 07:18:04 +0000 (09:18 +0200)] 
Move dns64 processing before postresolve processing

2 years agodnsdist: Only call getsockname() once per incoming DoH connection 11851/head
Remi Gacogne [Thu, 11 Aug 2022 15:58:29 +0000 (17:58 +0200)] 
dnsdist: Only call getsockname() once per incoming DoH connection

The current code is calling h2o_socket_getpeername() and
h2o_socket_getsockname() once per DoH _query_, and while the former
is cheap because h2o caches the result for us, the latter is actually
expensive, so this code caches both values so that we only retrieve
them once per DoH connection.

2 years agoFurther simplification of processing of policy result
Otto Moerbeek [Wed, 3 Aug 2022 08:10:22 +0000 (10:10 +0200)] 
Further simplification of processing of policy result

2 years agoWhen considering dns64, we also should consider handling RCodes != 0.
Otto Moerbeek [Wed, 3 Aug 2022 07:34:54 +0000 (09:34 +0200)] 
When considering dns64, we also should consider handling RCodes != 0.

This make the logic as described in RFC 6147, section 5.1

2 years agoAlso check qperq limit if throttling happened, as it increases counters. 11848/head
Otto Moerbeek [Thu, 11 Aug 2022 12:30:48 +0000 (14:30 +0200)] 
Also check qperq limit if throttling happened, as it increases counters.

This condition would be caught when going out previously, so is
an optimisation, not a behaviour difference.

2 years agoMerge pull request #11843 from omoerbeek/rec-authzones-wipe
Otto Moerbeek [Thu, 11 Aug 2022 06:46:35 +0000 (08:46 +0200)] 
Merge pull request #11843 from omoerbeek/rec-authzones-wipe

Clear the caches *after* loading authzones.

2 years agodnsdist: Better handling of the different types of metrics 11845/head
Remi Gacogne [Wed, 10 Aug 2022 14:56:55 +0000 (16:56 +0200)] 
dnsdist: Better handling of the different types of metrics

This commit ensures that we don't crash if we forget to update a part of code
if we ever add a new type of metrics, as happened in 9f4fa5ae01efa878d2aa27e4398740d7ed6ef01f.

2 years agodnsdist: Do not keep the mplexer created for the initial health-check around 11844/head
Remi Gacogne [Wed, 10 Aug 2022 12:55:44 +0000 (14:55 +0200)] 
dnsdist: Do not keep the mplexer created for the initial health-check around

We do not need after that initial health-check round so it is only wasting
(a very small amount of) memory and one file descriptor at that point.

2 years agoClear the caches *after* loading authzones. 11843/head
Otto Moerbeek [Wed, 10 Aug 2022 11:30:24 +0000 (13:30 +0200)] 
Clear the caches *after* loading authzones.

2 years agoauth: use getInnerRemote() for the remotes ring 11842/head
Kees Monshouwer [Wed, 10 Aug 2022 10:17:01 +0000 (12:17 +0200)] 
auth: use getInnerRemote() for the remotes ring

2 years agoMerge pull request #11830 from asgeirn/dnsdist-4155-enetunreach
Remi Gacogne [Wed, 10 Aug 2022 06:08:26 +0000 (08:08 +0200)] 
Merge pull request #11830 from asgeirn/dnsdist-4155-enetunreach

Also reconnect on ENETUNREACH.

2 years agodnsdist: Mention the need to allow CAP_BPF in the AppArmor policy in the unit file 11839/head
Remi Gacogne [Tue, 9 Aug 2022 16:05:01 +0000 (18:05 +0200)] 
dnsdist: Mention the need to allow CAP_BPF in the AppArmor policy in the unit file

2 years agodnsdist: Document that AppArmor can impact eBPF operations
Remi Gacogne [Tue, 9 Aug 2022 15:59:19 +0000 (17:59 +0200)] 
dnsdist: Document that AppArmor can impact eBPF operations