]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
2 years agoYaHTTP: Prevent integer overflow on very large chunks 13078/head
Remi Gacogne [Wed, 8 Mar 2023 17:25:30 +0000 (18:25 +0100)] 
YaHTTP: Prevent integer overflow on very large chunks

If the chunk_size is very close to the maximum value of an integer,
we trigger an integer overflow when checking if we have a trailing
newline after the payload.
Reported by OSS-Fuzz as:
https://oss-fuzz.com/testcase-detail/6439610474692608
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56804

(cherry picked from commit b602982fc5b4fb9139dec591541e0c070ceb47f5)

2 years agoMerge pull request #12700 from omoerbeek/rec-48-spoof rec-4.8.4
Otto Moerbeek [Wed, 29 Mar 2023 10:33:21 +0000 (12:33 +0200)] 
Merge pull request #12700 from omoerbeek/rec-48-spoof

rec: Backport 12699 to rec-4.8.x: Deterred spoofing attempts can lead to authoritative servers being marked unavailable

2 years agoPowerDNS Security Advisory 2023-02: Deterred spoofing attempts can lead to authoritat... 12700/head
Otto Moerbeek [Thu, 16 Mar 2023 07:28:31 +0000 (08:28 +0100)] 
PowerDNS Security Advisory 2023-02: Deterred spoofing attempts can lead to authoritative servers being marked unavailable (CVE-2023-26437)

2 years agoMerge pull request #12623 from romeroalx/update-gh-actions-rec-4.8
Otto Moerbeek [Wed, 8 Mar 2023 13:38:10 +0000 (14:38 +0100)] 
Merge pull request #12623 from romeroalx/update-gh-actions-rec-4.8

Backport GH Actions updates from master to rec-4.8.x

2 years agogh actions: simplified collector job in build-and-test-all.yml 12623/head
Alexis Romero [Thu, 16 Feb 2023 05:54:23 +0000 (06:54 +0100)] 
gh actions: simplified collector job in build-and-test-all.yml

2 years agoAvoid Microsoft repo for ODBC. Step 1: codeql allow apt downgrades
Alexis Romero [Thu, 23 Feb 2023 10:03:30 +0000 (11:03 +0100)] 
Avoid Microsoft repo for ODBC. Step 1: codeql allow apt downgrades

2 years agoAvoid Microsoft repo for ODBC. Step 1: allow apt downgrades
Alexis Romero [Wed, 22 Feb 2023 10:48:28 +0000 (11:48 +0100)] 
Avoid Microsoft repo for ODBC. Step 1: allow apt downgrades

2 years agocodeql workflow: set ubuntu mirror
Peter van Dijk [Mon, 6 Feb 2023 10:41:18 +0000 (11:41 +0100)] 
codeql workflow: set ubuntu mirror

2 years agobuild-and-test-all: add functionality to quickly switch ubuntu mirrors
Peter van Dijk [Fri, 13 Jan 2023 10:06:14 +0000 (11:06 +0100)] 
build-and-test-all: add functionality to quickly switch ubuntu mirrors

2 years agobuild(deps): bump actions/setup-python from 2 to 4
dependabot[bot] [Wed, 19 Oct 2022 14:28:07 +0000 (14:28 +0000)] 
build(deps): bump actions/setup-python from 2 to 4

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoSwitch from set-output tot GITHUB_OUTPUT
Josh Soref [Tue, 6 Dec 2022 17:39:08 +0000 (12:39 -0500)] 
Switch from set-output tot GITHUB_OUTPUT

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2 years agobuild(deps): bump actions/upload-artifact from 1 to 3
dependabot[bot] [Wed, 19 Oct 2022 14:28:01 +0000 (14:28 +0000)] 
build(deps): bump actions/upload-artifact from 1 to 3

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump actions/download-artifact from 2 to 3
dependabot[bot] [Wed, 19 Oct 2022 14:27:58 +0000 (14:27 +0000)] 
build(deps): bump actions/download-artifact from 2 to 3

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump actions/checkout from 2.3.4 to 3.1.0
dependabot[bot] [Wed, 19 Oct 2022 14:44:55 +0000 (14:44 +0000)] 
build(deps): bump actions/checkout from 2.3.4 to 3.1.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump actions/cache from 2 to 3.0.11
dependabot[bot] [Wed, 19 Oct 2022 14:28:05 +0000 (14:28 +0000)] 
build(deps): bump actions/cache from 2 to 3.0.11

Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.0.11.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3.0.11)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoMerge pull request #12617 from omoerbeek/backport-12614-to-rec-4.8.x rec-4.8.3
Otto Moerbeek [Mon, 6 Mar 2023 13:32:11 +0000 (14:32 +0100)] 
Merge pull request #12617 from omoerbeek/backport-12614-to-rec-4.8.x

Rec: backport 12614 to rec-4.8.x: test that an ImmediateServFailException isn't hidden by the serve-stale logic

2 years agoRec: test that an ImmediateServFailException isn't hidden by the serve-stale logic 12617/head
Otto Moerbeek [Fri, 3 Mar 2023 14:24:58 +0000 (15:24 +0100)] 
Rec: test that an ImmediateServFailException isn't hidden by the serve-stale logic

(cherry picked from commit 60a0965f82283249e8f054afe474adc33a57b8bc)

2 years agoMerge pull request #12613 from omoerbeek/rec-48-serve-stale-pegging
Otto Moerbeek [Fri, 3 Mar 2023 12:37:48 +0000 (13:37 +0100)] 
Merge pull request #12613 from omoerbeek/rec-48-serve-stale-pegging

rec: Backport 12595, 12610 and 12611 to rec-4.8.x: fix serve-stale logic

2 years agoReinstate refresh && served-stale logic 12613/head
Otto Moerbeek [Fri, 3 Mar 2023 11:19:34 +0000 (12:19 +0100)] 
Reinstate refresh && served-stale logic

2 years agoMerge pull request #12609 from omoerbeek/backport-12598-to-rec-4.8.x
Otto Moerbeek [Fri, 3 Mar 2023 09:35:04 +0000 (10:35 +0100)] 
Merge pull request #12609 from omoerbeek/backport-12598-to-rec-4.8.x

rec: Backport 12598 to rec-4.8.x: Update validation state after a missing negative indication

2 years agoMerge pull request #12608 from omoerbeek/backport-12495-to-rec-4.8.x
Otto Moerbeek [Fri, 3 Mar 2023 09:34:50 +0000 (10:34 +0100)] 
Merge pull request #12608 from omoerbeek/backport-12495-to-rec-4.8.x

rec: Backport 12495 to rex-4.8.x: Change a few logging urgency levels

2 years agoMerge pull request #12607 from omoerbeek/backport-12347-to-rec-4.8.x
Otto Moerbeek [Fri, 3 Mar 2023 09:34:35 +0000 (10:34 +0100)] 
Merge pull request #12607 from omoerbeek/backport-12347-to-rec-4.8.x

rec: Backport 12347 to rec-4.x.8: Use correct logic for isEntryUsable()

2 years agorec: Backport 12598 to rec-4.8.x: Update validation state after a missing negative... 12609/head
Otto Moerbeek [Fri, 3 Mar 2023 08:30:23 +0000 (09:30 +0100)] 
rec: Backport 12598 to rec-4.8.x: Update validation state after a missing negative indication

Backport of #12598

2 years agorec: Backport 12495 to rex-4.8.x: Change a few logging urgency levels 12608/head
Otto Moerbeek [Fri, 3 Mar 2023 08:25:27 +0000 (09:25 +0100)] 
rec: Backport 12495 to rex-4.8.x: Change a few logging urgency levels

Backport of #12495

2 years agorec: Backport 12347 to rec-4.x.8: Use correct logic for isEntryUsable() 12607/head
Otto Moerbeek [Fri, 3 Mar 2023 08:14:55 +0000 (09:14 +0100)] 
rec: Backport 12347 to rec-4.x.8: Use correct logic for isEntryUsable()

Backport of #12347

2 years agoFix serve-stale logic in negcache by following the record cache case more closely
Otto Moerbeek [Wed, 1 Mar 2023 08:28:20 +0000 (09:28 +0100)] 
Fix serve-stale logic in negcache by following the record cache case more closely

2 years agoSimplify serve-stale logic
Otto Moerbeek [Wed, 1 Mar 2023 08:23:37 +0000 (09:23 +0100)] 
Simplify serve-stale logic

- No more special handling of ImmediateServFailException, they remain fatal
(individual failure to contact an NS returns and does not throw)
- Explicitly only look in cache on serve-stale iteration of loop

2 years agoCall the right wipe function for negcache
Otto Moerbeek [Wed, 1 Mar 2023 08:16:52 +0000 (09:16 +0100)] 
Call the right wipe function for negcache

2 years agoMerge pull request #12475 from omoerbeek/backport-12467-to-rec-4.8.x rec-4.8.2
Otto Moerbeek [Thu, 26 Jan 2023 09:09:16 +0000 (10:09 +0100)] 
Merge pull request #12475 from omoerbeek/backport-12467-to-rec-4.8.x

rec: Backport 12467 to rec: 4.8.x: do not use "message" as key, it has a special meaning to systemd-journal

2 years agorec: Backport 12467 to rec: 4.8.x: do not use "message" as key, it has a special... 12475/head
Otto Moerbeek [Thu, 26 Jan 2023 08:35:25 +0000 (09:35 +0100)] 
rec: Backport 12467 to rec: 4.8.x: do not use "message" as key, it has a special meaning to systemd-journal

2 years agoMerge pull request #12459 from Habbie/backport-12453-to-rec-4.8.x
Otto Moerbeek [Wed, 25 Jan 2023 08:55:13 +0000 (09:55 +0100)] 
Merge pull request #12459 from Habbie/backport-12453-to-rec-4.8.x

rec-4.8: lock.hh: include <stdexcept>

2 years agoMerge pull request #12457 from omoerbeek/backport-12395-to-rec-4.8.x
Otto Moerbeek [Wed, 25 Jan 2023 08:54:42 +0000 (09:54 +0100)] 
Merge pull request #12457 from omoerbeek/backport-12395-to-rec-4.8.x

rec: Backport 12395 to rec-4.8.x: When the stale function is triggered, wrong data can be returned from negcache and record cache

2 years agoMerge pull request #12456 from omoerbeek/backport-12368-to-rec-4.8.x
Otto Moerbeek [Wed, 25 Jan 2023 08:54:29 +0000 (09:54 +0100)] 
Merge pull request #12456 from omoerbeek/backport-12368-to-rec-4.8.x

rec: Backport 12368 to rec-4.8.x: Add the 'parse packet from auth' error message to structured logging

2 years agoMerge pull request #12455 from omoerbeek/backport-12352-to-rec-4.8.x
Otto Moerbeek [Wed, 25 Jan 2023 08:53:48 +0000 (09:53 +0100)] 
Merge pull request #12455 from omoerbeek/backport-12352-to-rec-4.8.x

rec: Backport 12352 to rec 4.8.x: Refresh of negcache stale entry might use wrong qtype

2 years agolock.hh: include <stdexcept> 12459/head
Peter van Dijk [Mon, 23 Jan 2023 13:54:09 +0000 (14:54 +0100)] 
lock.hh: include <stdexcept>

(cherry picked from commit d8b4ea24dc5dbe7c53c24bfffba24bcae7f58e02)

2 years agorec: backport 12395 to rec-4.8.x: When the stale function is triggered, wrong data... 12457/head
Otto Moerbeek [Mon, 23 Jan 2023 15:55:14 +0000 (16:55 +0100)] 
rec: backport 12395 to rec-4.8.x: When the stale function is triggered, wrong data can be returned from negcache and record cache

Backport of #12395

2 years agorec: backport 12368 to rec-4.8.x: Add the 'parse packet from auth' error message... 12456/head
Otto Moerbeek [Mon, 23 Jan 2023 15:44:56 +0000 (16:44 +0100)] 
rec: backport 12368 to rec-4.8.x: Add the 'parse packet from auth' error message to structured logging

2 years agoChange the logic a bit, as negcache->get() can be called with qtype = QType:::ENT, 12455/head
Otto Moerbeek [Wed, 21 Dec 2022 09:12:46 +0000 (10:12 +0100)] 
Change the logic a bit, as negcache->get() can be called with qtype = QType:::ENT,
but we do not want to push a task with QType::ENT

Also change a few QType& to QType, it's a small int, no need to pass by reference.

(cherry picked from commit 2541e0f53c6abba298b4a86032bdbc7dfff3ee03)

2 years agochange negcache stale resolveTask qtype
zhaojingshi [Wed, 21 Dec 2022 03:22:57 +0000 (11:22 +0800)] 
change negcache stale resolveTask qtype

(cherry picked from commit cce57cb0c4a7112c02b82549149818faccaaa5f7)

2 years agoMerge pull request #12418 from omoerbeek/rec-backport-12374-to-4.8.x
Otto Moerbeek [Fri, 20 Jan 2023 12:42:28 +0000 (13:42 +0100)] 
Merge pull request #12418 from omoerbeek/rec-backport-12374-to-4.8.x

rec: Backport 12374 to rec-4.8.x: make cache cleaning more fair when under pressure

2 years agoMerge pull request #12408 from omoerbeek/rec-backport-12407-to-4.8.x
Otto Moerbeek [Fri, 20 Jan 2023 12:42:12 +0000 (13:42 +0100)] 
Merge pull request #12408 from omoerbeek/rec-backport-12407-to-4.8.x

rec: Backport 12407 to 4.8.x: do not chain ecs enabled queries

2 years agoMerge pull request #12346 from omoerbeek/backport-12317-to-rec-4.8.x
Otto Moerbeek [Fri, 20 Jan 2023 12:41:35 +0000 (13:41 +0100)] 
Merge pull request #12346 from omoerbeek/backport-12317-to-rec-4.8.x

rec: Backport 12317 to rec-4.8.x: Fix compilation on FreeBSD. reported by HellSpawn

2 years agoMerge pull request #12345 from omoerbeek/backport-12333-to-rec-4.8.x
Otto Moerbeek [Fri, 20 Jan 2023 12:41:19 +0000 (13:41 +0100)] 
Merge pull request #12345 from omoerbeek/backport-12333-to-rec-4.8.x

rec: Backport 12333 to rec-4.8.x: For setting socket buf size not decreasing is not an error

2 years agoMerge pull request #12344 from omoerbeek/backport-12260-to-rec-4.8.x
Otto Moerbeek [Fri, 20 Jan 2023 12:41:04 +0000 (13:41 +0100)] 
Merge pull request #12344 from omoerbeek/backport-12260-to-rec-4.8.x

rec: Backport 12260 to rec-4.8.x: Properly encode json string containing binary data

2 years agoMerge pull request #12343 from omoerbeek/backport-12254-to-rec-4.8.x
Otto Moerbeek [Fri, 20 Jan 2023 12:40:48 +0000 (13:40 +0100)] 
Merge pull request #12343 from omoerbeek/backport-12254-to-rec-4.8.x

rec: Backport 12254 to rec-4.8.x: Restrict permissions for GITHUB_TOKEN in our workflows

2 years agoMerge pull request #12442 from omoerbeek/rec-48-backport-qm-ds-fallback
Otto Moerbeek [Fri, 20 Jan 2023 11:51:20 +0000 (12:51 +0100)] 
Merge pull request #12442 from omoerbeek/rec-48-backport-qm-ds-fallback

rec: Backport to 4.8.x: Do *not* use QName Minimization for DS retrievals in QM fallback mode.

2 years agoBackport to 4.8.x: Do *not* use QName Minimization for DS retrievals in QM fallback... 12442/head rec-4.8.1
Otto Moerbeek [Mon, 2 Jan 2023 15:34:56 +0000 (16:34 +0100)] 
Backport to 4.8.x: Do *not* use QName Minimization for DS retrievals in QM fallback mode.

2 years agoInclude <cmath> 12418/head
Otto Moerbeek [Mon, 16 Jan 2023 13:23:36 +0000 (14:23 +0100)] 
Include <cmath>

2 years agoclose newfs on fopen fail
Otto Moerbeek [Mon, 16 Jan 2023 13:20:37 +0000 (14:20 +0100)] 
close newfs on fopen fail

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agorec: Backport 12374 to rec-4.8.x: make cache cleaning more fair when under pressure
Otto Moerbeek [Mon, 16 Jan 2023 12:48:14 +0000 (13:48 +0100)] 
rec: Backport 12374 to rec-4.8.x: make cache cleaning more fair when under pressure

2 years agoReformat 12408/head
Otto Moerbeek [Tue, 10 Jan 2023 14:06:45 +0000 (15:06 +0100)] 
Reformat

2 years agorec: Backport 12407 to rec-4.8.x: do not chain ecs enabled queries
Otto Moerbeek [Tue, 10 Jan 2023 13:48:39 +0000 (14:48 +0100)] 
rec: Backport 12407 to rec-4.8.x: do not chain ecs enabled queries

Backport of #12407

2 years agoFor setting socket buf size not decreasing is not an error 12345/head
Otto Moerbeek [Fri, 16 Dec 2022 08:24:44 +0000 (09:24 +0100)] 
For setting socket buf size not decreasing is not an error

(cherry picked from commit fe65dec04f3fadaca8f5319cf02f4b302463afe9)

2 years agoFix compilation on FreeBSD. reported by HellSpawn 12346/head
Otto Moerbeek [Mon, 12 Dec 2022 19:03:04 +0000 (20:03 +0100)] 
Fix compilation on FreeBSD. reported by HellSpawn

(cherry picked from commit 398bb0f1e7122d6de0e6c5ec3383ba49a446d580)

2 years agoProperly encode json string containing binary data 12344/head
Otto Moerbeek [Fri, 2 Dec 2022 08:16:55 +0000 (09:16 +0100)] 
Properly encode json string containing binary data

The existing code assumes the strings are alreayd valid UTF8 and contain potential out-of-bound accesses.

Also urlEncode path in log lines, as it trips pytest.xml:

Running tests...

$ 'pytest' '--junitxml=pytest.xml' '-v'
==STDOUT===

==STDERRR===
  File "/home/otto/pdns/regression-tests.api/runtests.py", line 304, in <module>
    print(serverproc.stderr.read())
  File "/usr/lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xeb in position 4304: invalid continuation byte

There might be more places where this is needed.

(cherry picked from commit 1478a2c8713535e4cbd1943e2526e3527d58a19b)

2 years agoRestrict permissions for GITHUB_TOKEN in our workflows 12343/head
Remi Gacogne [Thu, 1 Dec 2022 13:34:19 +0000 (14:34 +0100)] 
Restrict permissions for GITHUB_TOKEN in our workflows

Added using https://github.com/step-security/secure-workflows
For more information see:
- https://github.com/ossf/scorecard/blob/d8fefc9b246db3600c777e9d60d441d7c386ce1d/docs/checks.md#token-permissions
- https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/

(cherry picked from commit aff4e1eafa5bbc4e9ef6acee9d73b2154e0ab9b9)

2 years agoMerge pull request #12293 from omoerbeek/backport-12289-to-rec-4.8.x 12353/head 12393/head rec-4.8.0
Otto Moerbeek [Wed, 7 Dec 2022 14:29:38 +0000 (15:29 +0100)] 
Merge pull request #12293 from omoerbeek/backport-12289-to-rec-4.8.x

rec: Backport 12289 to rec 4.8.x: refactor unsuppored qtype code and make sure we ServFail on all unsupported qtypes

2 years agoElaborate on NSEC/NSEC3 diffference in comment 12293/head
Otto Moerbeek [Wed, 7 Dec 2022 12:37:13 +0000 (13:37 +0100)] 
Elaborate on NSEC/NSEC3 diffference in comment

(cherry picked from commit 2cdafbdeae085e1443d13e4ddf578c86ce24c1e6)

2 years agoApply suggestions from code review
Otto Moerbeek [Wed, 7 Dec 2022 12:30:19 +0000 (13:30 +0100)] 
Apply suggestions from code review

Co-authored-by: Peter van Dijk <peter.van.dijk@powerdns.com>
(cherry picked from commit bca5ab3a353ac1dcf1171176bee6c22bd4ed92b0)

2 years agorec: refactor unsuppored qtype code and make sure we ServFail on all unsupported...
Otto Moerbeek [Wed, 7 Dec 2022 09:54:49 +0000 (10:54 +0100)] 
rec: refactor unsuppored qtype code and make sure we ServFail on all unsupported qtypes

This fixes #12251

Also I'd like to know why we ServFail on NSEC3 but not on NSEC: we should either fix that or add a comment explaining this.

(cherry picked from commit e7cc83fd617c877f272b8344d5fb7252acfdc297)

2 years agoMerge pull request #12221 from omoerbeek/backport-12219-to-rec-4.8.x
Otto Moerbeek [Tue, 22 Nov 2022 12:22:43 +0000 (13:22 +0100)] 
Merge pull request #12221 from omoerbeek/backport-12219-to-rec-4.8.x

recL Backport to rec-4.8.x: Infra queries should not use refresh mode

2 years agoInfra queries should not use refresh mode. 12221/head
Otto Moerbeek [Mon, 21 Nov 2022 10:38:54 +0000 (11:38 +0100)] 
Infra queries should not use refresh mode.

When I introduced serve state in #11776, I reintroduced the mistake previously fixed in #11376.
Fixes #12078

(cherry picked from commit 28a3eea55d15d33a65b2108c1598c15d00e0173c)

2 years agoMerge pull request #12201 from omoerbeek/backport-12199-to-rec-4.8.x rec-4.8.0-rc1
Otto Moerbeek [Thu, 17 Nov 2022 16:02:59 +0000 (17:02 +0100)] 
Merge pull request #12201 from omoerbeek/backport-12199-to-rec-4.8.x

rec: Backport 12199 to rec-4.8.x: Also consider recursive forward in the "forwarded DS should not end up in negCache code"

2 years agoMerge pull request #12200 from omoerbeek/backport-12198-to-rec-4.8.x
Otto Moerbeek [Thu, 17 Nov 2022 16:02:45 +0000 (17:02 +0100)] 
Merge pull request #12200 from omoerbeek/backport-12198-to-rec-4.8.x

rec: Backport 12198 to rec-4.8.x: Correct skip record condition in processRecords.

2 years agoAlso consider recursive forward in the "forwarded DS should not end up in negCache... 12201/head
Otto Moerbeek [Wed, 16 Nov 2022 12:58:04 +0000 (13:58 +0100)] 
Also consider recursive forward in the "forwarded DS should not end up in negCache code."

With @rgacogne and @phonedph1
Fixes #12189

(cherry picked from commit af746aaf59a2e977bafabd5814635f59b01e5835)

2 years agoCorrect skip record condition in processRecords. 12200/head
Otto Moerbeek [Wed, 16 Nov 2022 12:49:59 +0000 (13:49 +0100)] 
Correct skip record condition in processRecords.

Noted the other day by @rgacogne

(cherry picked from commit d1321ff57909f8fb9d0bd7a20e3c4eb85a6b76e1)

2 years agoMerge pull request #12197 from omoerbeek/backport-12175-to-rec-4.8.x
Otto Moerbeek [Wed, 16 Nov 2022 13:23:22 +0000 (14:23 +0100)] 
Merge pull request #12197 from omoerbeek/backport-12175-to-rec-4.8.x

rec: Backport 12175 to rec 4.8.x: Get DS records with QM switched on

2 years agoMerge pull request #12196 from omoerbeek/backport-12194-to-rec-4.8.x
Otto Moerbeek [Wed, 16 Nov 2022 13:09:17 +0000 (14:09 +0100)] 
Merge pull request #12196 from omoerbeek/backport-12194-to-rec-4.8.x

rec: Backport 12194 to rec-4.8.x: Fix typo in structured logging key

2 years agoFix test (from rgacogne) 12197/head
Otto Moerbeek [Mon, 14 Nov 2022 12:46:04 +0000 (13:46 +0100)] 
Fix test (from rgacogne)

Do this by merging https://github.com/PowerDNS/pdns/commit/994d2e09f088f2908a887e2539f8abbd1e36d003.diff

For some unknown reason (maybe the same reason rgacogne was not able to create a PR for this?)
a cherry pick did not work, so do a "manual" diff and patch of Remi's work.

(cherry picked from commit 4b0a0031b46d7e045e98ef073811e374717751b4)

2 years agoAvoid a race in wiping the cache and fix test_Bogus by explictly
Otto Moerbeek [Mon, 7 Nov 2022 13:24:19 +0000 (14:24 +0100)] 
Avoid a race in wiping the cache and fix test_Bogus by explictly
filling the aggressive cache.

(cherry picked from commit 2ec80d483f48fb042397456ad0b032a671232f48)

2 years agoGet DS records with QM switched on.
Otto Moerbeek [Mon, 7 Nov 2022 08:03:51 +0000 (09:03 +0100)] 
Get DS records with QM switched on.

This avoid a.root-servers.net going Bogus, which can happen
if the .net NS are not cached and we miss the cut.

Fixes #12160 and avoids the need to prime the .net NS records explicitly.

(cherry picked from commit e2307ada1210fee6198e54db2dc91dac8fa68070)

2 years agoFix typo 12196/head
Otto Moerbeek [Tue, 15 Nov 2022 13:47:51 +0000 (14:47 +0100)] 
Fix typo

(cherry picked from commit 68dbf30cebc92d29853314b1160257a9dbc5f4f1)

2 years agoMerge pull request #12163 from omoerbeek/backport-12155-to-rec-4.8.x rec-4.8.0-beta2
Otto Moerbeek [Fri, 4 Nov 2022 07:29:59 +0000 (08:29 +0100)] 
Merge pull request #12163 from omoerbeek/backport-12155-to-rec-4.8.x

rec: Backport 12155 to rec 4.8.x: Fix snmp OID numbers for rcode stats

2 years agoMerge pull request #12162 from omoerbeek/backport-12122-to-rec-4.8.x
Otto Moerbeek [Fri, 4 Nov 2022 07:29:46 +0000 (08:29 +0100)] 
Merge pull request #12162 from omoerbeek/backport-12122-to-rec-4.8.x

rec: Backport 12122 to rec 4.8.x: Implement output operator for QTypes

2 years agoMerge pull request #12161 from omoerbeek/backport-12125-to-rec-4.8.x
Otto Moerbeek [Fri, 4 Nov 2022 07:29:32 +0000 (08:29 +0100)] 
Merge pull request #12161 from omoerbeek/backport-12125-to-rec-4.8.x

rec: Backport 12125 to rec 4.8.x: handle ixfr connect and transfer timeouts

2 years agoTypo 12163/head
Otto Moerbeek [Thu, 3 Nov 2022 12:16:03 +0000 (13:16 +0100)] 
Typo

Co-authored-by: Charles-Henri Bruyand <charleshenri.bruyand+github@gmail.com>
(cherry picked from commit 38b69143124de1d2f7341148c6250e821c02e4be)

2 years agoClarify Prometheus names
Otto Moerbeek [Wed, 2 Nov 2022 14:56:17 +0000 (15:56 +0100)] 
Clarify Prometheus names

(cherry picked from commit fe6797befcdb8b9287ac87dacc796282920e7001)

2 years agoFix snmp OID numbers for rcode stats
Otto Moerbeek [Wed, 2 Nov 2022 14:44:46 +0000 (15:44 +0100)] 
Fix snmp OID numbers for rcode stats

(cherry picked from commit bdc4ee0a00ad913a4e0d909f4bfc4e1a404ead68)

2 years agoPass an object as const ref 12162/head
Otto Moerbeek [Wed, 26 Oct 2022 05:56:47 +0000 (07:56 +0200)] 
Pass an object as const ref

Co-authored-by: Charles-Henri Bruyand <charleshenri.bruyand+github@gmail.com>
(cherry picked from commit fa61cf82d85f5e26178853e9b0f4be14f55565db)

2 years agoImplement output operator for QTypes.
Otto Moerbeek [Mon, 24 Oct 2022 09:48:17 +0000 (11:48 +0200)] 
Implement output operator for QTypes.

This fixes #12089

The theory says there should be no unwanted side effects, but I'd like
that to be validated independently.

(cherry picked from commit da19e4feb842464659536076b47047b2910c73fb)

2 years agoBetter wording in comment 12161/head
Otto Moerbeek [Thu, 3 Nov 2022 08:50:12 +0000 (09:50 +0100)] 
Better wording in comment

Co-authored-by: Peter van Dijk <peter.van.dijk@powerdns.com>
(cherry picked from commit 240460d77be35a6a1c1e6fa22364efe19dc3ee84)

2 years agoTimout handling for ixfrs as a client.
Otto Moerbeek [Mon, 24 Oct 2022 14:25:59 +0000 (16:25 +0200)] 
Timout handling for ixfrs as a client.

One complicating factor is that this is shared code, but auth and
rec do not agree on the definiton of the timeout value: auth states
it is a maximum idle time, while rec state it is the total xfr time.
While both apporaches make sense and in the end we would like to
enforce both, we now go for a more simple solution that respects
auth or rec behaviour based on a flag.

(cherry picked from commit fee334ae0f5083d47f9adc207d5a1a6d36ebc2ac)

2 years agoMerge pull request #12146 from omoerbeek/backport-12063-to-rec-4.8.x
Otto Moerbeek [Wed, 2 Nov 2022 09:14:13 +0000 (10:14 +0100)] 
Merge pull request #12146 from omoerbeek/backport-12063-to-rec-4.8.x

rec: backport 12063 to 4.8.x: Also do the compare for protobuf logger config objects.

2 years agoMerge pull request #12150 from omoerbeek/backport-12140-to-rec-4.8.x
Otto Moerbeek [Wed, 2 Nov 2022 09:12:30 +0000 (10:12 +0100)] 
Merge pull request #12150 from omoerbeek/backport-12140-to-rec-4.8.x

rec: Backport 12140 to rec 4.8.x: be more lenient replacing auth by non-auth records in cache

2 years agoMerge pull request #12145 from omoerbeek/backport-12081-to-rec-4.8.x
Otto Moerbeek [Wed, 2 Nov 2022 09:12:12 +0000 (10:12 +0100)] 
Merge pull request #12145 from omoerbeek/backport-12081-to-rec-4.8.x

rec: backport 12081 to rec-4.8.x: Log invalid RPZ content when obtained via IXFR

2 years agoMerge pull request #12144 from omoerbeek/backport-12133-to-rec-4.8.x
Otto Moerbeek [Wed, 2 Nov 2022 09:11:53 +0000 (10:11 +0100)] 
Merge pull request #12144 from omoerbeek/backport-12133-to-rec-4.8.x

rec: backport 12054 to rec-4.8.x: Fix assertAlmostEqual call to compare absolute difference

2 years agoMerge pull request #12147 from omoerbeek/backport-12066-to-rec-4.8.x
Otto Moerbeek [Wed, 2 Nov 2022 09:01:31 +0000 (10:01 +0100)] 
Merge pull request #12147 from omoerbeek/backport-12066-to-rec-4.8.x

rec: backport 12066 to rec 4.8.x: Detect invalid bytes in makeBytesFromHex()

2 years agotypo in comment 12150/head
Otto Moerbeek [Tue, 1 Nov 2022 11:38:54 +0000 (12:38 +0100)] 
typo in comment

Co-authored-by: Peter van Dijk <peter.van.dijk@powerdns.com>
(cherry picked from commit 681a49f10b00ba7ee38a55402953d076c7221160)

2 years agoAdd test
Otto Moerbeek [Tue, 1 Nov 2022 11:06:32 +0000 (12:06 +0100)] 
Add test

(cherry picked from commit f4621cce40bdc1648edf82717239ef040eedb9b6)

2 years agoQM can get confused by expiring infra records, so be a bit more lenient
Otto Moerbeek [Fri, 28 Oct 2022 10:06:27 +0000 (12:06 +0200)] 
QM can get confused by expiring infra records, so be a bit more lenient
with replacing auth records by unauth, as unauth (typically infra
records) might come in while we are resolving.

Should fix #12078

(cherry picked from commit 1ce6006d7ddc925a13b868488b6e987bca41cc90)

2 years agoApply Otto's suggestion 12147/head
Remi Gacogne [Thu, 6 Oct 2022 08:14:50 +0000 (10:14 +0200)] 
Apply Otto's suggestion

(cherry picked from commit 7f73a566805979f94bc1a23c9088372e00177bec)

2 years agomisc: Switch to a std::array in makeHexDump()
Remi Gacogne [Thu, 6 Oct 2022 07:56:47 +0000 (09:56 +0200)] 
misc: Switch to a std::array in makeHexDump()

(cherry picked from commit 8c7a1b8a671291e6ee2e7e4abdbdd41e9c714b31)

2 years agoauth: Detect invalid bytes in makeBytesFromHex()
Remi Gacogne [Thu, 6 Oct 2022 07:55:48 +0000 (09:55 +0200)] 
auth: Detect invalid bytes in makeBytesFromHex()

Also only allocate the required number of bytes, not twice that.

(cherry picked from commit 50953de897023742e43d3feab976b891be1c6e63)

2 years agoAlso do the compare for protobuf logger config objects. 12146/head
Otto Moerbeek [Wed, 31 Aug 2022 14:58:30 +0000 (16:58 +0200)] 
Also do the compare for protobuf logger config objects.

I'm not doing the async part now, as tsan reports there would be a race.
The case occuring the most: no changes is now handled correctly and quickly and that is the main thing.

(cherry picked from commit babe943035818b7a97e59cfd70921ba06bbf31cf)

2 years agorec: Log invalid RPZ content when obtained via IXFR 12145/head
Remi Gacogne [Mon, 10 Oct 2022 15:47:46 +0000 (17:47 +0200)] 
rec: Log invalid RPZ content when obtained via IXFR

That kind of content was properly logged and handled when received
during the initial loading (AXFR) but not when received via an
incremental update.

(cherry picked from commit 55a99233728fc01e3946a97fb8dbb073a3003622)

2 years agoFix assertAlmostEqual call to compare absolute difference 12144/head
Otto Moerbeek [Tue, 25 Oct 2022 14:15:07 +0000 (16:15 +0200)] 
Fix assertAlmostEqual call to compare absolute difference

(cherry picked from commit 67dd4251f758a695dab05e206a32199ccee6c214)
(cherry picked from commit 23064464fe298ac748470942de6e04a429be9a31)

Backport of #12054 and #12133

2 years agoMerge pull request #12055 from omoerbeek/backport-12054-to-rec-4.8.x rec-4.8.0-beta1
Otto Moerbeek [Mon, 3 Oct 2022 14:48:37 +0000 (16:48 +0200)] 
Merge pull request #12055 from omoerbeek/backport-12054-to-rec-4.8.x

rec: Backport 12054 to rec 4.8.x: fix locked regr test

2 years agoRec: fix locked regr test 12055/head
Otto Moerbeek [Mon, 3 Oct 2022 13:47:46 +0000 (15:47 +0200)] 
Rec: fix locked regr test

(cherry picked from commit 23064464fe298ac748470942de6e04a429be9a31)

2 years agoMerge pull request #12051 from omoerbeek/rec-specialize-to-rec48
Otto Moerbeek [Mon, 3 Oct 2022 12:56:16 +0000 (14:56 +0200)] 
Merge pull request #12051 from omoerbeek/rec-specialize-to-rec48

rec 4.8.x branch: Remove unneeded targets according to checklist

2 years agoRemove unneeded targets according to checklist 12051/head
Otto Moerbeek [Mon, 3 Oct 2022 11:30:09 +0000 (13:30 +0200)] 
Remove unneeded targets according to checklist