]>
git.ipfire.org Git - thirdparty/pdns.git/log
Remi Gacogne [Thu, 26 Aug 2021 15:54:07 +0000 (17:54 +0200)]
dnsdist: Enable GnuTLS support on Circle CI as well
Remi Gacogne [Thu, 26 Aug 2021 14:26:04 +0000 (16:26 +0200)]
dnsdist: Check that the expected TLS provider is in use in the regression tests
Remi Gacogne [Thu, 26 Aug 2021 14:25:36 +0000 (16:25 +0200)]
dnsdist: Provide bindings to know which TLS provider is in use
Remi Gacogne [Thu, 26 Aug 2021 15:18:18 +0000 (17:18 +0200)]
Merge pull request #10670 from rgacogne/ddist-gnutls-github-actions
dnsdist: Enable GnuTLS support in GitHub actions
Peter van Dijk [Thu, 26 Aug 2021 14:54:12 +0000 (16:54 +0200)]
Merge pull request #10673 from Habbie/dnsdist-tests-generate-cdb
dnsdist test: generate CDB files
Peter van Dijk [Thu, 26 Aug 2021 10:27:07 +0000 (12:27 +0200)]
dnsdist test: generate CDB files
Remi Gacogne [Thu, 26 Aug 2021 09:02:26 +0000 (11:02 +0200)]
Merge pull request #10671 from rgacogne/ddist-init-dq-cacheflags
dnsdist: Initialize the cacheFlags member of DNSQuestion to 0
Remi Gacogne [Thu, 26 Aug 2021 07:45:18 +0000 (09:45 +0200)]
dnsdist: Initialize the cacheFlags member of DNSQuestion to 0
Remi Gacogne [Wed, 25 Aug 2021 14:36:48 +0000 (16:36 +0200)]
dnsdist: Enable GnuTLS support in GitHub actions
It looks like it was not enabled in CircleCI, meaning that some of
our regression tests were done with OpenSSL twice since we fallback
gracefully when the requested provider is not available.
Remi Gacogne [Wed, 25 Aug 2021 12:37:37 +0000 (14:37 +0200)]
Merge pull request #10664 from rgacogne/ddist-fix-cache-flags
dnsdist: Cache based on the DNS flags of the query after applying the rules
Peter van Dijk [Wed, 25 Aug 2021 11:40:48 +0000 (13:40 +0200)]
Merge pull request #10661 from Habbie/gh-actions
github actions: build auth+rec+dnsdist; test auth-api, dnsdist-regression, rec-api
Otto Moerbeek [Wed, 25 Aug 2021 10:57:10 +0000 (12:57 +0200)]
Merge pull request #10666 from rgacogne/rec-cache-contention-counters
rec: Fix the acquired/contended cache counters not being updated
Otto Moerbeek [Wed, 25 Aug 2021 10:49:25 +0000 (12:49 +0200)]
Merge pull request #10668 from omoerbeek/rec-bulktest-script
rec: Improve the rec bulk test script
Otto Moerbeek [Wed, 25 Aug 2021 09:32:02 +0000 (09:32 +0000)]
Improve the rec bulk test script
- Exit if rec did not start up
- Status requesting commands (rec_control and kill -USR1) failures are non-fatal
except for the last 'ping' command.
- Increase timeout of rec_control command (to help investigating issues on buildbot)
The script is run with -e, so failure will lead to exit without killing
the running recursor atm.
Remi Gacogne [Wed, 25 Aug 2021 09:01:48 +0000 (11:01 +0200)]
rec: Fix formatting
Remi Gacogne [Wed, 25 Aug 2021 07:57:10 +0000 (09:57 +0200)]
rec: Fix the acquired/contended cache counters not being updated
Peter van Dijk [Tue, 24 Aug 2021 09:35:27 +0000 (11:35 +0200)]
run auth remotebackend regression tests in GH Actions; remove from CircleCI
Remi Gacogne [Tue, 24 Aug 2021 10:23:42 +0000 (12:23 +0200)]
Merge pull request #10633 from rgacogne/rec-policy-event-filter-follow-cname
rec: Pass the Lua context to follow up queries (follow CNAME, dns64)
Remi Gacogne [Tue, 24 Aug 2021 09:23:54 +0000 (11:23 +0200)]
dnsdist: Cache based on the DNS flags of the query after applying the rules
The tentative fix in
dbadb4d272a3317407e6bc934f55c2d41a87c0ac actually
introduced an issue, because the backend might not perfectly echo the
RD and CD flags as they were in the query.
We can't use the "original" (before applying rules) flags either, so
we need to store the flags as they were sent to the backend to be
able to correctly store them in the cache.
Peter van Dijk [Tue, 24 Aug 2021 08:21:51 +0000 (10:21 +0200)]
new remotebackend ruby deps are too new for CircleCI; disable auth make check there
Peter van Dijk [Mon, 23 Aug 2021 19:43:54 +0000 (21:43 +0200)]
circleci: remove items that we now test in github actions
Peter van Dijk [Thu, 25 Mar 2021 12:48:49 +0000 (13:48 +0100)]
github actions: build auth+rec+dnsdist; test auth-api, dnsdist-regression, rec-api
Otto Moerbeek [Mon, 23 Aug 2021 09:21:57 +0000 (11:21 +0200)]
Merge pull request #10659 from omoerbeek/rec-fix-dot-to-port-853
rec: Fix wrong default value call for dot-to-port-853 setting
Otto [Mon, 23 Aug 2021 08:14:42 +0000 (10:14 +0200)]
Fix wrong default value call for dot-to-port-853 setting
Otto Moerbeek [Fri, 20 Aug 2021 13:01:07 +0000 (15:01 +0200)]
Merge pull request #10605 from omoerbeek/rec-policy-hit-stats
rec: Keep a count of per rpz (or filter) hits
Otto [Fri, 20 Aug 2021 11:49:37 +0000 (13:49 +0200)]
One way of solving the race. Still needs operator[] though, since policyName
can vary.
Otto [Thu, 19 Aug 2021 07:08:53 +0000 (09:08 +0200)]
Prometheus help texts and general cleanup. Example output:
pdns_recursor_policy_hits 10
pdns_recursor_policy_hits{type="filter"} 3
pdns_recursor_policy_hits{type="rpz",policyname="rpz.local"} 5
pdns_recursor_policy_hits{type="rpz",policyname="rpzFile"} 2
Remi Gacogne [Wed, 18 Aug 2021 13:17:14 +0000 (15:17 +0200)]
Merge pull request #10622 from rgacogne/rec-loop-ds-child-zone
rec: Detect a loop when the denial of the DS comes from the child zone
Otto [Tue, 20 Jul 2021 12:07:20 +0000 (14:07 +0200)]
Keep a count of per rpz (or filter) hits, by default only exported via
Prometheus. After #10554 is merged the Promethus help info should be added
to this branch.
Otto Moerbeek [Wed, 18 Aug 2021 12:55:07 +0000 (14:55 +0200)]
Merge pull request #10554 from omoerbeek/rec-per-cpu-thread-metrics
rec: Modify per-thread cpu usage stats to be Prometheus-friendly
Otto Moerbeek [Wed, 18 Aug 2021 09:57:05 +0000 (11:57 +0200)]
Merge pull request #10643 from omoerbeek/rec-ns-from-cache-fw-vs-dontquery
rec: NS from the cache could be a forwarder
Remi Gacogne [Wed, 18 Aug 2021 09:39:40 +0000 (11:39 +0200)]
Merge pull request #10631 from rgacogne/mplexer-read-write
Handle waiting for a descriptor to become readable OR writable
Remi Gacogne [Wed, 18 Aug 2021 09:31:36 +0000 (11:31 +0200)]
Merge pull request #10649 from rgacogne/lock-guarded-ddist
Convert dnsdist and the recursor to LockGuarded
Otto [Wed, 18 Aug 2021 08:54:53 +0000 (10:54 +0200)]
Make it explicit that IP addresses are taken into account when deciding to not block
an IP being forwarded to.
Remi Gacogne [Wed, 18 Aug 2021 08:44:44 +0000 (10:44 +0200)]
Merge pull request #10650 from rgacogne/ddist-rd-cache-miss
dnsdist: Fix the wrong RD and CD flags being cached, causing misses
Otto [Wed, 30 Jun 2021 08:27:04 +0000 (10:27 +0200)]
Modify per-thread cpu usage stats to be Prometheus-friendly.
Plus fix a few small issues wrt HELP texts.
Example output:
pdns_recursor_cpu_msec{thread=0} 10
pdns_recursor_cpu_msec{thread=1} 0
pdns_recursor_cpu_msec{thread=2} 0
Otto [Wed, 18 Aug 2021 07:24:45 +0000 (09:24 +0200)]
Also check if the remoteIP is one of the IPs we would have forwarded to,
even if it's coming from the cache.
Remi Gacogne [Wed, 30 Jun 2021 13:26:57 +0000 (15:26 +0200)]
rec: Appease the formatting gods (negcache.hh)
Otto [Fri, 25 Jun 2021 09:16:04 +0000 (11:16 +0200)]
Change the static lock() method of MemRecursorCache to be an instance
method of MapCombo. Likewise for negcache.
Remi Gacogne [Wed, 16 Jun 2021 15:41:26 +0000 (17:41 +0200)]
Document how our wrappers around mutexes work
Remi Gacogne [Wed, 16 Jun 2021 15:31:38 +0000 (17:31 +0200)]
rec: Do not require taking the lock to know the size of a cache
Remi Gacogne [Tue, 25 May 2021 07:52:32 +0000 (09:52 +0200)]
dnsdist: Remove unused mutex include
Remi Gacogne [Thu, 20 May 2021 07:12:25 +0000 (09:12 +0200)]
rec: Store the carbon configuration in a StateHolder
Remi Gacogne [Thu, 20 May 2021 06:38:59 +0000 (08:38 +0200)]
rec: Convert the dynmetrics to LockGuarded
Remi Gacogne [Thu, 20 May 2021 06:23:31 +0000 (08:23 +0200)]
rec: Move the record caches to LockGuarded (WIP: size() should not need a lock)
Remi Gacogne [Wed, 19 May 2021 10:57:09 +0000 (12:57 +0200)]
Rename the lock() method to write_lock() for shared mutexes
Remi Gacogne [Mon, 10 May 2021 16:19:14 +0000 (18:19 +0200)]
rec: Move the NOD code to LockGuarded
Remi Gacogne [Mon, 10 May 2021 15:57:53 +0000 (17:57 +0200)]
rec: Convert RPZ loader stats to LockGuarded
Remi Gacogne [Fri, 7 May 2021 16:29:04 +0000 (18:29 +0200)]
rec: Convert the aggressive NSEC cache to LockGuarded
Remi Gacogne [Fri, 7 May 2021 09:10:33 +0000 (11:10 +0200)]
dnsdist: Convert remaining Action mutexes to LockGuarded
Remi Gacogne [Fri, 7 May 2021 09:09:38 +0000 (11:09 +0200)]
LockGuarded: Add move constructors
Remi Gacogne [Fri, 30 Apr 2021 13:53:30 +0000 (15:53 +0200)]
dnsdist: Convert most of the remaining locks to LockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:53:00 +0000 (15:53 +0200)]
Convert the StateHolder to LockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:52:12 +0000 (15:52 +0200)]
dnsdist: Convert CDBKVStore to SharedLockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:51:35 +0000 (15:51 +0200)]
dnsdist: Convert the dynamic blocks topN to LockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:51:00 +0000 (15:51 +0200)]
dnsdist: Convert ConcurrentConnectionManager to LockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:50:09 +0000 (15:50 +0200)]
dnsdist: Convert GnuTLSTicketsKey to SharedLockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:49:34 +0000 (15:49 +0200)]
dnsdist: Convert the web server configuration to LockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:48:58 +0000 (15:48 +0200)]
dnsdist: Convert the TCP client counts map to LockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:48:26 +0000 (15:48 +0200)]
dnsdist: Convert DynBPF to LockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:47:41 +0000 (15:47 +0200)]
dnsdist: Convert the Packet Cache to SharedLockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:46:02 +0000 (15:46 +0200)]
dnsdist: Convert DNSCrypt to SharedLockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:43:25 +0000 (15:43 +0200)]
speedtest: Add tests for LockGuarded
Remi Gacogne [Fri, 30 Apr 2021 13:42:10 +0000 (15:42 +0200)]
Add SharedLockGuarded, a read-write lock version of LockGuarded
Remi Gacogne [Fri, 16 Apr 2021 13:40:34 +0000 (15:40 +0200)]
dnsdist: Move the Lua mutex to LockGuarded
Remi Gacogne [Fri, 16 Apr 2021 13:39:53 +0000 (15:39 +0200)]
dnsdist: Move the ring buffers to LockGuarded
Remi Gacogne [Fri, 16 Apr 2021 13:39:18 +0000 (15:39 +0200)]
Move the remote logger class to LockGuarded
Remi Gacogne [Fri, 16 Apr 2021 13:38:55 +0000 (15:38 +0200)]
dnsdist: Move the eBPF filter class to LockGuarded
Remi Gacogne [Fri, 16 Apr 2021 13:34:50 +0000 (15:34 +0200)]
Introduce LockGuarded, a lock-protected data
The general idea has been borrowed from Rust's locks: instead of
defining two objects, the one to be protected, T, and the lock, we
define a single LockGuarded<T> object which contains the object.
That provides two big advantages:
- it is immediately clear which data is protected by the lock
- that data simply can't be accessed without holding the lock.
Otto Moerbeek [Tue, 17 Aug 2021 11:31:17 +0000 (13:31 +0200)]
Merge pull request #10598 from omoerbeek/rec-almost-expired-refactor-and-stats
Rec: almost expired refactor and stats
Otto [Tue, 17 Aug 2021 10:23:40 +0000 (12:23 +0200)]
From review feedback: only inc s_almost_expired_tasks_run after task has ended without exceptions
and check for nullptr function in task record.
Otto [Tue, 20 Jul 2021 08:47:51 +0000 (10:47 +0200)]
Expose almost-expired metrics
Otto [Tue, 20 Jul 2021 07:33:17 +0000 (09:33 +0200)]
Refactor stats queue, introducing a pointor to a function that does the work
(pointing to a resolve function) and almost-expired specific stats.
Otto Moerbeek [Tue, 17 Aug 2021 09:43:14 +0000 (11:43 +0200)]
Merge pull request #10546 from omoerbeek/rec-dns64-metrics
rec: Add dns64 metrics
Remi Gacogne [Tue, 17 Aug 2021 09:33:16 +0000 (11:33 +0200)]
rec: Add a test for 'denial of the DS comes from the child zone' loop
Otto Moerbeek [Tue, 17 Aug 2021 07:42:10 +0000 (09:42 +0200)]
Merge pull request #10602 from omoerbeek/rec-drop-after-preresolve
rec: Process policy and potential Drop action after Lua hooks
Remi Gacogne [Tue, 17 Aug 2021 07:37:34 +0000 (09:37 +0200)]
Merge pull request #10647 from rgacogne/decaf-polymorphic-exception
Fix a warning about catching a polymorphic exception type by value
Remi Gacogne [Tue, 17 Aug 2021 07:32:40 +0000 (09:32 +0200)]
dnsdist: Avoid arithmetic on bitfields, as suggested by Otto
Remi Gacogne [Mon, 16 Aug 2021 15:45:18 +0000 (17:45 +0200)]
rec: check that the policy event filter is called for follow-up queries
Remi Gacogne [Mon, 16 Aug 2021 14:27:13 +0000 (16:27 +0200)]
Update multiplexer priorities so completion ports are preferred over /dev/poll
Remi Gacogne [Mon, 16 Aug 2021 10:51:15 +0000 (12:51 +0200)]
dnsdist: Fix the wrong RD and CD flags being cached, causing misses
We used to restore the RD and CD flags from the initial query before
inserting the response into the cache. That would cause an issue
if the flags had been altered, for example via SetNoRecurseAction,
as the cache lookup is done _after_ the actions have been applied
and thus after the flags altered.
If the initial query had the RD bit set, and thus was cleared by the
rule, the response would have been inserted with the RD bit restored,
and no lookup would then succeed because it would be done with the
bit cleared.
This commit fixes the insertion to use the RD and CD bits as set in
the response before restoring them, and restores the RD and CD bits
after a cache hit as well, to ensure that:
- cache lookups are done after the rules are applied
- cache insertions are done before the flags are restored
Remi Gacogne [Mon, 16 Aug 2021 08:01:04 +0000 (10:01 +0200)]
Fix a warning about catching a polymorphic exception type by value
```
decafsigners.cc: In member function ‘virtual bool DecafED25519DNSCryptoKeyEngine::verify(const string&, const string&) const’:
decafsigners.cc:140:11: warning: catching polymorphic type ‘class decaf::CryptoException’ by value [-Wcatch-value=]
140 | } catch(CryptoException) {
| ^~~~~~~~~~~~~~~
decafsigners.cc: In member function ‘virtual bool DecafED448DNSCryptoKeyEngine::verify(const string&, const string&) const’:
decafsigners.cc:276:11: warning: catching polymorphic type ‘class decaf::CryptoException’ by value [-Wcatch-value=]
276 | } catch(CryptoException) {
| ^~~~~~~~~~~~~~~
```
Remi Gacogne [Mon, 16 Aug 2021 07:03:36 +0000 (09:03 +0200)]
Merge pull request #10640 from Habbie/dnsdist-docs-grepq
dnsdist docs: clarify grepq num parameter
Otto [Wed, 11 Aug 2021 11:14:37 +0000 (13:14 +0200)]
If we get an NS from the cache, it still could be one forwarding applies to.
Take that into acount when determining dont-query status. Should fix #10638.
Peter van Dijk [Tue, 10 Aug 2021 13:18:45 +0000 (15:18 +0200)]
Merge pull request #10642 from Habbie/checkkey-null-error
checkKey: handle NULL error string from OpenSSL more gracefully
Peter van Dijk [Tue, 10 Aug 2021 11:56:25 +0000 (13:56 +0200)]
checkKey: handle NULL error string from OpenSSL more gracefully
fixes #10641
Otto Moerbeek [Tue, 10 Aug 2021 09:49:06 +0000 (11:49 +0200)]
Merge pull request #10639 from omoerbeek/rec-tfo-update
rec: Google is working to fix their TFO issues on their DNS servers
Peter van Dijk [Tue, 10 Aug 2021 07:52:47 +0000 (09:52 +0200)]
dnsdist docs: clarify grepq num parameter
Otto [Tue, 10 Aug 2021 07:22:52 +0000 (09:22 +0200)]
Google is working to fix their TFO issues on their DNS servers
Otto Moerbeek [Mon, 9 Aug 2021 06:19:43 +0000 (08:19 +0200)]
Merge pull request #10627 from omoerbeek/rec-policy-rm-race
rec: Check in more places if the policy has been updated before using or modifying it.
Otto [Fri, 6 Aug 2021 10:08:24 +0000 (12:08 +0200)]
Handle policy hit after nodata nxdomain Lua hooks and add
regression test for those two and the preresolve case.
Otto Moerbeek [Fri, 6 Aug 2021 09:42:57 +0000 (11:42 +0200)]
Merge pull request #10634 from omoerbeek/rec-macos-kqueue-and-fixes
Move MacOS to kqueue and assorted compile fixes
Otto [Fri, 6 Aug 2021 08:26:41 +0000 (10:26 +0200)]
Move MacOS to kqueue and assorted compile fixes
Remi Gacogne [Fri, 6 Aug 2021 07:51:49 +0000 (09:51 +0200)]
rec: Pass the Lua context to follow up queries (follow CNAME, dns64)
Remi Gacogne [Thu, 5 Aug 2021 09:22:50 +0000 (11:22 +0200)]
Handle descriptor de-duplication on addFD/removeFD in the poll mplexer
Remi Gacogne [Thu, 5 Aug 2021 09:22:19 +0000 (11:22 +0200)]
Add a sample (disabled) benchmark test for the multiplexer
Remi Gacogne [Thu, 5 Aug 2021 09:16:49 +0000 (11:16 +0200)]
Take a ref, not a copy, of the multiplexer callback parameter in the unit tests
It does not matter there but we don't want to copy that code and
keep the copy in a place where it does.
Remi Gacogne [Thu, 5 Aug 2021 07:20:40 +0000 (09:20 +0200)]
Work around a formatting oddity
Remi Gacogne [Thu, 5 Aug 2021 07:04:22 +0000 (09:04 +0200)]
Run the unit tests for all the available multiplexers
And not just the "best" one.
Remi Gacogne [Thu, 5 Aug 2021 06:50:55 +0000 (08:50 +0200)]
Consistently return the number of ready events, not descriptor
We might have two events for the same descriptor, readable AND
writable. It was already counted as two separate events by the
kqueue multiplexer but not by the other ones.