]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
4 years agorec: Add a regression test for answers generated from gettag 9682/head
Remi Gacogne [Fri, 6 Nov 2020 14:28:53 +0000 (15:28 +0100)] 
rec: Add a regression test for answers generated from gettag

(cherry picked from commit 9fbfe39b195982fbce4123014a943a6f02bbe58d)

4 years agorec: Fix the processing of answers generated from gettag
Remi Gacogne [Fri, 6 Nov 2020 10:56:58 +0000 (11:56 +0100)] 
rec: Fix the processing of answers generated from gettag

The logic to let a RPZ match override the answers generated from Lua
was broken, ignoring the generated values.

(cherry picked from commit 995884ff35d9591857edd6aef0df07e892c19485)

4 years agoMerge pull request #9605 from omoerbeek/rec-backport-to-4.4.x-sec-2020-07 rec-4.4.0
Otto Moerbeek [Tue, 13 Oct 2020 10:17:29 +0000 (12:17 +0200)] 
Merge pull request #9605 from omoerbeek/rec-backport-to-4.4.x-sec-2020-07

rec: Backport of CVE-2020-25829 (any-cache-update) to 4.4.x

4 years agorec: Add a unit test for the ANY "just-in-time" cached records case 9605/head
Remi Gacogne [Thu, 24 Sep 2020 16:02:13 +0000 (18:02 +0200)] 
rec: Add a unit test for the ANY "just-in-time" cached records case

4 years agorec: Fix validation when more than one cached record is returned
Remi Gacogne [Thu, 24 Sep 2020 16:01:16 +0000 (18:01 +0200)] 
rec: Fix validation when more than one cached record is returned

We need to validate them RRSet by RRSet.

4 years agorec: Fix returning more than one cached records
Remi Gacogne [Tue, 22 Sep 2020 14:49:34 +0000 (16:49 +0200)] 
rec: Fix returning more than one cached records

The existing implementation did not properly update the DNSSEC
and authoritative status, and did not include all the needed
RRSIG and additional records.

4 years agorec: Prevent updating the status of all cached records for a name
Remi Gacogne [Tue, 22 Sep 2020 14:48:11 +0000 (16:48 +0200)] 
rec: Prevent updating the status of all cached records for a name

Before that fix, it was possible to make the recursor update the
DNSSEC status of all cached records for a given name using an ANY
query.
This real issue is that we should retrieve the needed RRSIGs and
authority records for all cached records when processing an ANY
query, but this fix prevents the cache pollution which is the worst
part of the issue.

4 years agoMerge pull request #9579 from omoerbeek/backport-9434-to-rec-4.4.x rec-4.4.0-rc2
Otto Moerbeek [Fri, 2 Oct 2020 10:23:25 +0000 (12:23 +0200)] 
Merge pull request #9579 from omoerbeek/backport-9434-to-rec-4.4.x

rec: Backport 9434 to rec 4.4.x: When deciding if we are auth in the local auth or forwarding case, DS is special

4 years agoFix test 9579/head
Otto Moerbeek [Fri, 4 Sep 2020 09:13:17 +0000 (11:13 +0200)] 
Fix test

(cherry picked from commit 4459dcf53f77a6de1b2802567146622cd80db276)

4 years agoTest for the reported issue wrt doing an spurious DS queries
Otto Moerbeek [Wed, 2 Sep 2020 13:57:40 +0000 (15:57 +0200)] 
Test for the reported issue wrt doing an spurious DS queries

I'm trying to setup a valid a.test and b.test, using a non-recursive forward
but somehow my DNSSEC setup is not right. Cannot spot the issue atm.

(cherry picked from commit 5879cd2d6d8d374a3aaa38e280a16c4d01d16ef4)

4 years agoWhen deciding if we are auth in the local auth or forwarding case,
Otto Moerbeek [Wed, 2 Sep 2020 12:03:44 +0000 (14:03 +0200)] 
When deciding if we are auth in the local auth or forwarding case,
for DS records we need to look at the parent of the particular name.

Seems to fix #9433

(cherry picked from commit 68f6b16cb2709d5cc9ca53823def2781cc2f1f06)

4 years agoMerge pull request #9577 from omoerbeek/backport-9569-to-rec-4.4.x
Otto Moerbeek [Fri, 2 Oct 2020 09:10:45 +0000 (11:10 +0200)] 
Merge pull request #9577 from omoerbeek/backport-9569-to-rec-4.4.x

rec: backport 9569 to rec 4.4.x: Don't parse any config with `--version`

4 years agoMerge pull request #9576 from omoerbeek/backport-9562-to-rec-4.4.x
Otto Moerbeek [Fri, 2 Oct 2020 09:10:24 +0000 (11:10 +0200)] 
Merge pull request #9576 from omoerbeek/backport-9562-to-rec-4.4.x

rec: Backport 9562 to rec 4.4.x: Expose typed cache flush via Web API

4 years agorecursor: Don't parse any config with `--version` 9577/head
Pieter Lexis [Thu, 1 Oct 2020 11:47:27 +0000 (13:47 +0200)] 
recursor: Don't parse any config with `--version`

This ensures we don't log anything _apart_ from the version info.
Spotted in https://github.com/PowerDNS/pdns_recursor-ansible/issues/66

(cherry picked from commit 2733183fc0b35ed2b59c87aab5aaaa86688db778)

4 years agoBe explicit we're talking about the recursor. 9576/head
Otto Moerbeek [Fri, 2 Oct 2020 08:21:21 +0000 (10:21 +0200)] 
Be explicit we're talking about the recursor.

(cherry picked from commit 193a9a7a0b1c8791d4d9de2bee290d62a8d0114c)

4 years agoExpose typed cache flush via Web API
Otto Moerbeek [Wed, 30 Sep 2020 08:24:33 +0000 (10:24 +0200)] 
Expose typed cache flush via Web API

(cherry picked from commit 3bb2d9875c82776d91c2c7a7d4de1a8ce8ed3097)

4 years agoMerge pull request #9557 from omoerbeek/rec-backport-9515-to-4.4.x
Otto Moerbeek [Wed, 30 Sep 2020 06:31:14 +0000 (08:31 +0200)] 
Merge pull request #9557 from omoerbeek/rec-backport-9515-to-4.4.x

rec: Backport #9515 to rec 4.4.x: actually fix wipe-cache-typed

4 years agoBackport #9515 to 4.4.x: actually fix wipe-cache-typed 9557/head
Otto Moerbeek [Tue, 29 Sep 2020 13:46:20 +0000 (15:46 +0200)] 
Backport #9515 to 4.4.x: actually fix wipe-cache-typed

4 years agoMerge pull request #9528 from omoerbeek/backport-9471-to-rec-4.4.x
Otto Moerbeek [Fri, 25 Sep 2020 12:38:29 +0000 (14:38 +0200)] 
Merge pull request #9528 from omoerbeek/backport-9471-to-rec-4.4.x

rec: Backport 9471 to rec-4.4.x: Log when going Bogus because of a missing SOA in authority

4 years agoMerge pull request #9526 from omoerbeek/backport-9495-to-rec-4.4.x
Otto Moerbeek [Fri, 25 Sep 2020 12:38:03 +0000 (14:38 +0200)] 
Merge pull request #9526 from omoerbeek/backport-9495-to-rec-4.4.x

rec: Backport 9495 to rec 4.4.x: Watch the descriptor again after an out-of-order read timeout

4 years agorec: Log when going Bogus because of a missing SOA in authority 9528/head
Remi Gacogne [Tue, 15 Sep 2020 13:03:34 +0000 (15:03 +0200)] 
rec: Log when going Bogus because of a missing SOA in authority

A missing SOA in the authority section of negative (NXDOMAIN, NODATA)
answers in a DNSSEC-secure zone currently leads to a Bogus result,
because the needed NSEC/NSEC3 could not be validated.

(cherry picked from commit 832f4fbdd7ef50d0e0ff5135ee6e270acc22df9d)

4 years agorec: Fix a typo in a comment 9526/head
Remi Gacogne [Wed, 23 Sep 2020 08:31:36 +0000 (10:31 +0200)] 
rec: Fix a typo in a comment

Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit ebcde9cbc9e1239157963e581327cdacde3a862f)

4 years agorec: Watch the descriptor again after an out-of-order read timeout
Remi Gacogne [Mon, 21 Sep 2020 15:24:55 +0000 (17:24 +0200)] 
rec: Watch the descriptor again after an out-of-order read timeout

It might be that there was no other incoming query on that connection
and we timed out while the response had not been sent yet, but the
client might want to re-use the connection after receving the response.
We try to reset the TTD, but that might fail when the socket descriptor
has already been removed.

(cherry picked from commit b05ef1b472cfa3597dda44075f3947abd565008b)

4 years agoMerge pull request #9506 from omoerbeek/backport-9497-to-rec-4.4.x
Otto Moerbeek [Fri, 25 Sep 2020 06:39:11 +0000 (08:39 +0200)] 
Merge pull request #9506 from omoerbeek/backport-9497-to-rec-4.4.x

rec: Backport 9497 to rec 4.4.x: raise an exception on invalid content in unknown record

4 years agorec: Fix invalid unknown record in the unit tests 9506/head
Remi Gacogne [Tue, 11 Aug 2020 13:31:57 +0000 (15:31 +0200)] 
rec: Fix invalid unknown record in the unit tests

(cherry picked from commit dda934facbac96a0aad5a82f84113009ddf3ec92)

4 years agoRaise an exception on invalid first part (!= \#) in unknown records
Remi Gacogne [Tue, 11 Aug 2020 12:07:32 +0000 (14:07 +0200)] 
Raise an exception on invalid first part (!= \#) in unknown records

(cherry picked from commit 2d79e3273b9b68bbdb0e45a2df1fbe4769296d07)

4 years agoRaise an exception on invalid hex content in unknown records
Remi Gacogne [Tue, 11 Aug 2020 09:25:06 +0000 (11:25 +0200)] 
Raise an exception on invalid hex content in unknown records

Otherwise we can end up reading uninitialised memory from the stack,
possibly leaking information.
This is only an issue if the content is read from an untrusted source
and can be passed back to an attacker.

(cherry picked from commit f5234115710094a8a7bd0b5ebddaa1fde83a52f0)

4 years agoMerge pull request #9465 from omoerbeek/backport-9448-to-rec-4.4.x rec-4.4.0-rc1
Remi Gacogne [Fri, 18 Sep 2020 06:44:12 +0000 (08:44 +0200)] 
Merge pull request #9465 from omoerbeek/backport-9448-to-rec-4.4.x

rec: Backport 9448 to rec 4.4.x: We only want to do QName Minimization for the names in a forwarded  domain.

4 years agoUse boost::optional to pass optional cutoff point. This way the 9465/head
Otto Moerbeek [Mon, 14 Sep 2020 09:30:42 +0000 (11:30 +0200)] 
Use boost::optional to pass optional cutoff point. This way the
proper cutoff point can be specified for forwarded zones only,
making it possible to change it meaning witjout regular nameserver
lookups.

(cherry picked from commit 96ce7d340951b31a3e3d042455a1f0e7f3a6eb56)

4 years agoMake code more clear by eliminating the "ancestor" as suggested by @rgacogne
Otto Moerbeek [Mon, 14 Sep 2020 08:56:40 +0000 (10:56 +0200)] 
Make code more clear by eliminating the "ancestor" as suggested by @rgacogne

(cherry picked from commit 1722d283bd3cf119870988213e9052bf0312a3e3)

4 years agoIf we're looking in the cache for NS for a forwarded name, we
Otto Moerbeek [Fri, 11 Sep 2020 08:06:24 +0000 (10:06 +0200)] 
If we're looking in the cache for NS for a forwarded name, we
can cut off the search at the forwarding domain.

I'm not sure if I like the added complexity...

(cherry picked from commit 007fb8008a7da4698dde9f65a8d7ace72d47970c)

4 years agoTake into account a potentially more specific NS we might
Otto Moerbeek [Tue, 8 Sep 2020 09:59:32 +0000 (11:59 +0200)] 
Take into account a potentially more specific NS we might
have in cache.

Also, do the forward lookup only once before the loop.

(cherry picked from commit afb1d0393abd613b2f362e48d1e3dde3d34689ca)

4 years agoWe only want to do QName Minimization for the names in a forwarded
Otto Moerbeek [Mon, 7 Sep 2020 10:17:30 +0000 (12:17 +0200)] 
We only want to do QName Minimization for the names in a forwarded
domain.

E.g. if foo.bar.com is forwarded and the qname is x.foo.bar.com,
start the QM process with ancestor foo.bar.com, so the query is
directed to the forwarder.  But if the qname is baz.bar.com, we do
regular QM, starting with the regular ancestor.

Should fix #9438 without breaking having forward for .

(cherry picked from commit 21af3294a6fdacd9632ecb3a05eb2ccf204d2fdb)

4 years agoMerge pull request #9458 from omoerbeek/backport-9454-to-rec-4.4.x
Otto Moerbeek [Fri, 11 Sep 2020 07:37:36 +0000 (09:37 +0200)] 
Merge pull request #9458 from omoerbeek/backport-9454-to-rec-4.4.x

rec: backport to 4.4.x: Parts is reused, so clear the names it might contain.

4 years agoMerge pull request #9459 from rgacogne/rec44-remove-non-rec-tests
Otto Moerbeek [Fri, 11 Sep 2020 06:34:20 +0000 (08:34 +0200)] 
Merge pull request #9459 from rgacogne/rec44-remove-non-rec-tests

rec-4.4.x: Remove non-recursor tests

4 years agorec-4.4.x: Remove non-recursor tests 9459/head
Remi Gacogne [Thu, 10 Sep 2020 09:27:03 +0000 (11:27 +0200)] 
rec-4.4.x: Remove non-recursor tests

4 years agoParts is reused, so clear the names it might contain. 9458/head
Otto Moerbeek [Wed, 9 Sep 2020 13:11:26 +0000 (15:11 +0200)] 
Parts is reused, so clear the names it might contain.

(cherry picked from commit bc3d2b7386e058c39872a3aa74101283b6f1af45)

4 years agoMerge pull request #9376 from omoerbeek/rec-rpz-store-trigger rec-4.4.0-beta1
Otto Moerbeek [Fri, 28 Aug 2020 11:19:53 +0000 (13:19 +0200)] 
Merge pull request #9376 from omoerbeek/rec-rpz-store-trigger

Rec: rpz store trigger in appliedPolicy and protobuf message

4 years agoAdd new field `AppliedPolicyHit` to regress test. 9376/head
Otto Moerbeek [Fri, 28 Aug 2020 09:36:50 +0000 (11:36 +0200)] 
Add new field `AppliedPolicyHit` to regress test.

4 years agoDocument new Lua dq fields and centralize logging in handle olicyHit functions.
Otto Moerbeek [Fri, 28 Aug 2020 09:29:33 +0000 (11:29 +0200)] 
Document new Lua dq fields and centralize logging in handle olicyHit functions.
Plus corrections from review.

4 years agoDefine a log string method for a Policy and use it in appropriate places
Otto Moerbeek [Mon, 17 Aug 2020 12:44:42 +0000 (14:44 +0200)] 
Define a log string method for a Policy and use it in appropriate places
to log what is going on wrt RPZ processing.

4 years agoAlso record the value that caused a hit.
Otto Moerbeek [Fri, 14 Aug 2020 08:51:28 +0000 (10:51 +0200)] 
Also record the value that caused a hit.

For triggers fomr rpz zones it makes sense to store them as listed there.
For hit values (names or IPs) it makes more sense to store them
in the regular string value and not list them as rpz trigger format.
e.g.: a trigger is listed

24.0.2.0.192.rpz-ip.rpz.local.

A corresponding hit as

192.0.2.1

4 years agoUse static constr string instead of string literals for some well-known names.
Otto Moerbeek [Fri, 14 Aug 2020 08:24:17 +0000 (10:24 +0200)] 
Use static constr string instead of string literals for some well-known names.

4 years agoAppease spell check
Otto Moerbeek [Mon, 10 Aug 2020 12:41:07 +0000 (14:41 +0200)] 
Appease spell check

4 years agoCheck appliedPolicyTrigger in protobuf regress test
Otto Moerbeek [Mon, 10 Aug 2020 12:17:29 +0000 (14:17 +0200)] 
Check appliedPolicyTrigger in protobuf regress test

4 years agoLog trigger in protobuf message
Otto Moerbeek [Mon, 10 Aug 2020 09:37:28 +0000 (11:37 +0200)] 
Log trigger in protobuf message

4 years agoStore the trigger hit in the (applied)Policy.
Otto Moerbeek [Fri, 7 Aug 2020 12:30:30 +0000 (14:30 +0200)] 
Store the trigger hit in the (applied)Policy.

While there fix (a (I thnk) doc bug: appliedPolicy.policyAction does
not exists. I think what is meant is policyType. So document that.

4 years agoMerge pull request #9414 from rgacogne/rec-cname-rpz-4
Remi Gacogne [Fri, 28 Aug 2020 08:25:44 +0000 (10:25 +0200)] 
Merge pull request #9414 from rgacogne/rec-cname-rpz-4

rec: Apply filtering policies (RPZ) on CNAME chains as well

4 years agoMerge pull request #9379 from rgacogne/ddist-clear-console-history
Remi Gacogne [Thu, 27 Aug 2020 08:29:34 +0000 (10:29 +0200)] 
Merge pull request #9379 from rgacogne/ddist-clear-console-history

dnsdist: Add the 'clearConsoleHistory' command

4 years agoMerge pull request #9419 from Habbie/sdig-id-nonzero
Remi Gacogne [Thu, 27 Aug 2020 07:42:43 +0000 (09:42 +0200)] 
Merge pull request #9419 from Habbie/sdig-id-nonzero

sdig: report non-zero ID in response

4 years agoMerge pull request #8638 from threatstop/master
Peter van Dijk [Wed, 26 Aug 2020 22:08:05 +0000 (00:08 +0200)] 
Merge pull request #8638 from threatstop/master

Support for APL Records

4 years agosdig: report non-zero ID in response 9419/head
Peter van Dijk [Wed, 26 Aug 2020 20:45:11 +0000 (22:45 +0200)] 
sdig: report non-zero ID in response

4 years agoUse an union for the ipv4 and ipv6 fields 8638/head
Nicko Dehaine [Wed, 26 Aug 2020 18:32:03 +0000 (18:32 +0000)] 
Use an union for the ipv4 and ipv6 fields

4 years agoRemoved duplicate entry
Nicko Dehaine [Wed, 26 Aug 2020 18:29:07 +0000 (18:29 +0000)] 
Removed duplicate entry
Rewrote description as a single line

4 years agorec: Update the documentation to better describe our RPZ behaviour 9414/head
Remi Gacogne [Wed, 26 Aug 2020 14:39:00 +0000 (16:39 +0200)] 
rec: Update the documentation to better describe our RPZ behaviour

4 years agorec: Add DNSFilterEngine::Policy::wasHit() to prevent code duplication
Remi Gacogne [Wed, 26 Aug 2020 14:07:10 +0000 (16:07 +0200)] 
rec: Add DNSFilterEngine::Policy::wasHit() to prevent code duplication

4 years agorec: Trust the result from doCNAMECacheCheck() for RPZ hits
Remi Gacogne [Wed, 26 Aug 2020 12:57:10 +0000 (14:57 +0200)] 
rec: Trust the result from doCNAMECacheCheck() for RPZ hits

4 years agoMerge pull request #9411 from omoerbeek/rec-inited-capture-is-cxx14
Otto Moerbeek [Wed, 26 Aug 2020 11:25:10 +0000 (13:25 +0200)] 
Merge pull request #9411 from omoerbeek/rec-inited-capture-is-cxx14

rec: Fix warning: initialized lambda captures are a C++14 extension

4 years agoMerge pull request #9417 from PowerDNS/omoerbeek-patch-1
Otto Moerbeek [Wed, 26 Aug 2020 11:22:59 +0000 (13:22 +0200)] 
Merge pull request #9417 from PowerDNS/omoerbeek-patch-1

rec: FIx a few "warning: comparison of integers of different signs" on clang.OpenBSD

4 years agoFIx a few "warning: comparison of integers of different signs" on clang/OpenBSD 9417/head
Otto Moerbeek [Wed, 26 Aug 2020 11:21:45 +0000 (13:21 +0200)] 
FIx a few "warning: comparison of integers of different signs" on clang/OpenBSD

4 years agoMerge pull request #9375 from omoerbeek/rec-qmin-fallback-depth
Otto Moerbeek [Wed, 26 Aug 2020 10:59:58 +0000 (12:59 +0200)] 
Merge pull request #9375 from omoerbeek/rec-qmin-fallback-depth

rec: Allow some more depth headroom for the no-qname-minimization fallback case

4 years agoMerge pull request #9415 from PowerDNS/omoerbeek-patch-1
Otto Moerbeek [Wed, 26 Aug 2020 08:31:14 +0000 (10:31 +0200)] 
Merge pull request #9415 from PowerDNS/omoerbeek-patch-1

auth: missing override

4 years agomissing override 9415/head
Otto Moerbeek [Wed, 26 Aug 2020 08:04:16 +0000 (10:04 +0200)] 
missing override

4 years agoMerge remote-tracking branch 'origin/rec-cname-rpz-4' into rec-cname-rpz
Remi Gacogne [Tue, 25 Aug 2020 15:28:58 +0000 (17:28 +0200)] 
Merge remote-tracking branch 'origin/rec-cname-rpz-4' into rec-cname-rpz

4 years agorec: Add regression tests for RPZ CNAME chains
Remi Gacogne [Tue, 25 Aug 2020 15:28:00 +0000 (17:28 +0200)] 
rec: Add regression tests for RPZ CNAME chains

4 years agorec: Properly handle RPZ hits for records retrieved from the cache
Remi Gacogne [Tue, 25 Aug 2020 15:26:46 +0000 (17:26 +0200)] 
rec: Properly handle RPZ hits for records retrieved from the cache

4 years agorec: When adding custom records from RPZ, remove conflicting ones
Remi Gacogne [Tue, 25 Aug 2020 15:25:47 +0000 (17:25 +0200)] 
rec: When adding custom records from RPZ, remove conflicting ones

4 years agoDocument the extra allowance in case of qname-minimization fallback. 9375/head
Otto Moerbeek [Tue, 25 Aug 2020 11:27:51 +0000 (13:27 +0200)] 
Document the extra allowance in case of qname-minimization fallback.

4 years agoZap some redundant args
Otto Moerbeek [Tue, 25 Aug 2020 09:01:54 +0000 (11:01 +0200)] 
Zap some redundant args

4 years agodnsdist: Dcocument the new 'clearConsoleHistory()' command 9379/head
Remi Gacogne [Tue, 25 Aug 2020 08:47:25 +0000 (10:47 +0200)] 
dnsdist: Dcocument the new 'clearConsoleHistory()' command

4 years agoMerge pull request #9412 from omoerbeek/rec-channel-coverity
Otto Moerbeek [Tue, 25 Aug 2020 07:44:28 +0000 (09:44 +0200)] 
Merge pull request #9412 from omoerbeek/rec-channel-coverity

rec: Clean some coverity reported cases of exceptions thrown but not caught.

4 years agoMerge pull request #9401 from Habbie/statbag-declare-pointer
Peter van Dijk [Tue, 25 Aug 2020 07:43:18 +0000 (09:43 +0200)] 
Merge pull request #9401 from Habbie/statbag-declare-pointer

statbag: handle key redeclarations better

4 years agoDo not use ref 9411/head
Otto Moerbeek [Tue, 25 Aug 2020 07:43:15 +0000 (09:43 +0200)] 
Do not use ref

Co-authored-by: Remi Gacogne <rgacogne+github@valombre.net>
4 years agorec: Fix formatting
Remi Gacogne [Tue, 25 Aug 2020 07:08:32 +0000 (09:08 +0200)] 
rec: Fix formatting

4 years agorec: Document the new RPZ behaviour, objects and hooks
Remi Gacogne [Mon, 24 Aug 2020 13:59:23 +0000 (15:59 +0200)] 
rec: Document the new RPZ behaviour, objects and hooks

4 years agorec: Add a new policy filter event Lua hook
Remi Gacogne [Mon, 24 Aug 2020 13:52:00 +0000 (15:52 +0200)] 
rec: Add a new policy filter event Lua hook

We now do the filtering during the resolution, instead of at the end,
to better match the RPZ specifications. Unfortunately it means that
we need a new hook to be able to act on policy events, since they
can occur in various places.

4 years agorec: Update tests since we now filter on CNAME chains
Remi Gacogne [Fri, 21 Aug 2020 15:45:42 +0000 (17:45 +0200)] 
rec: Update tests since we now filter on CNAME chains

4 years agorec: Handle RPZ CNAME chains, post-policies on cache hits as well
Remi Gacogne [Tue, 18 Aug 2020 08:45:30 +0000 (10:45 +0200)] 
rec: Handle RPZ CNAME chains, post-policies on cache hits as well

4 years agoSimplify things a bit
Otto Moerbeek [Wed, 12 Aug 2020 08:29:55 +0000 (10:29 +0200)] 
Simplify things a bit

4 years agoWe have a rather fundamental issue here: in some cases, we want
Otto Moerbeek [Tue, 4 Aug 2020 12:51:23 +0000 (14:51 +0200)] 
We have a rather fundamental issue here: in some cases, we want
the RPZ post policy to extend the current result vector and in some cases
we want to replace the result vector built up earlier.

ATM I have no clear method how that should be determined.

4 years agoAdded depth check for qnameRPZHit() and some comments.
Otto Moerbeek [Tue, 4 Aug 2020 08:47:25 +0000 (10:47 +0200)] 
Added depth check for qnameRPZHit() and some comments.

4 years agoSimplified getClientPolicy()
Otto Moerbeek [Tue, 4 Aug 2020 08:46:46 +0000 (10:46 +0200)] 
Simplified getClientPolicy()

4 years agoHandle non-CNAME cases and auth/forward case.
Otto Moerbeek [Wed, 15 Jul 2020 12:21:31 +0000 (12:21 +0000)] 
Handle non-CNAME cases and auth/forward case.

Though regression test is not happy yet this should be an improvement.
Also refactor qnameRPZHit a bit.

4 years agoMove Query policy handling to SyncRes.
Otto Moerbeek [Wed, 15 Jul 2020 09:47:54 +0000 (11:47 +0200)] 
Move Query policy handling to SyncRes.

This allows for intermediate CNAMEs to be subject to RPZ
processing.

4 years agoSplit the ClientIP and QName processing for RPZ.
Otto Moerbeek [Wed, 15 Jul 2020 09:05:35 +0000 (11:05 +0200)] 
Split the ClientIP and QName processing for RPZ.

The first will be done initially only, while the second
will be used during CNAME chasing.

4 years agoMerge pull request #9409 from mind04/pdns-race2
Peter van Dijk [Mon, 24 Aug 2020 12:54:26 +0000 (14:54 +0200)] 
Merge pull request #9409 from mind04/pdns-race2

auth: clear the key cache after addKey()

4 years agoMerge pull request #9381 from rgacogne/ddist-delaypipe-eintr
Remi Gacogne [Mon, 24 Aug 2020 11:42:14 +0000 (13:42 +0200)] 
Merge pull request #9381 from rgacogne/ddist-delaypipe-eintr

dnsdist: Handle EINTR in DelayPipe

4 years agoMerge pull request #9382 from rgacogne/ddist-speedup-rr
Remi Gacogne [Mon, 24 Aug 2020 11:41:51 +0000 (13:41 +0200)] 
Merge pull request #9382 from rgacogne/ddist-speedup-rr

dnsdist: Speed up the round robin policy

4 years agoClean some coverity reported cases of exceptions thrown but not caught. 9412/head
Otto Moerbeek [Mon, 24 Aug 2020 09:54:53 +0000 (11:54 +0200)] 
Clean some coverity reported cases of exceptions thrown but not caught.

See e.g. coverity report 1431930

4 years agoauth: clear the key cache after addKey() 9409/head
Kees Monshouwer [Mon, 24 Aug 2020 09:12:01 +0000 (11:12 +0200)] 
auth: clear the key cache after addKey()

4 years agoMerge pull request #9391 from omoerbeek/rec-new-rc-stats
Otto Moerbeek [Mon, 24 Aug 2020 09:03:38 +0000 (11:03 +0200)] 
Merge pull request #9391 from omoerbeek/rec-new-rc-stats

rec: export record cache mutex stats via the various channels.

4 years agoMerge pull request #9405 from rgacogne/fix-doc-per-zone-settings-domain-metadata
Remi Gacogne [Mon, 24 Aug 2020 08:59:31 +0000 (10:59 +0200)] 
Merge pull request #9405 from rgacogne/fix-doc-per-zone-settings-domain-metadata

doc: Fix broken link to "per-zone-settings-domain-metadata"

4 years agoMerge pull request #9406 from Habbie/pdnsutil-static-declaration
Remi Gacogne [Mon, 24 Aug 2020 08:59:18 +0000 (10:59 +0200)] 
Merge pull request #9406 from Habbie/pdnsutil-static-declaration

pdnsutil: file-local functions need to be static

4 years agoFix warning: initialized lambda captures are a C++14 extension
Otto Moerbeek [Mon, 24 Aug 2020 08:51:52 +0000 (10:51 +0200)] 
Fix warning: initialized lambda captures are a C++14 extension

4 years agodnsdist: Handle an empty servers list in the RR policy 9382/head
Remi Gacogne [Mon, 24 Aug 2020 07:54:44 +0000 (09:54 +0200)] 
dnsdist: Handle an empty servers list in the RR policy

Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
4 years agodnsdist: Speed up the round robin policy
Remi Gacogne [Wed, 29 Jul 2020 14:23:26 +0000 (16:23 +0200)] 
dnsdist: Speed up the round robin policy

Working with indices instead of copying shared pointers results in
a nice speed up, cutting the CPU time in half.

4 years agoMerge pull request #9408 from RvdE/patch-5
Remi Gacogne [Mon, 24 Aug 2020 07:29:17 +0000 (09:29 +0200)] 
Merge pull request #9408 from RvdE/patch-5

Fix building with LLVM11

4 years agoMerge pull request #9396 from omoerbeek/rec-rpz-ip-multi
Otto Moerbeek [Mon, 24 Aug 2020 07:21:50 +0000 (09:21 +0200)] 
Merge pull request #9396 from omoerbeek/rec-rpz-ip-multi

Rec: allow multipe local data records when doing RPZ IP matching

4 years agoSorting of items 9391/head
Otto Moerbeek [Mon, 24 Aug 2020 07:21:02 +0000 (09:21 +0200)] 
Sorting of items

4 years agos/mutex/lock in descriptions
Otto Moerbeek [Mon, 24 Aug 2020 07:18:22 +0000 (09:18 +0200)] 
s/mutex/lock in descriptions

Co-authored-by: Remi Gacogne <rgacogne+github@valombre.net>