Skip to content

auth: allow EDNS Client Subnet prefix to be narrowed - #17879

Open
miodvallat wants to merge 1 commit into
PowerDNS:masterfrom
miodvallat:defaultscopeprefix
Open

auth: allow EDNS Client Subnet prefix to be narrowed#17879
miodvallat wants to merge 1 commit into
PowerDNS:masterfrom
miodvallat:defaultscopeprefix

Conversation

@miodvallat

Copy link
Copy Markdown
Contributor

Short description

This PR adds two new settings, edns-scope-mask-ipv4 and edns-scope-mask-ipv6, which will be used to narrow the scope mask in EDNS responses, except for packets which have hit a view, in which case the view netmask is still used.

Note that this PR is built ontop the first commit of #17878. No need to review more than once.

This could help people mitigate #16803.

Todo:

  • tests
  • documentation

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document, including the AI Policy, and added a "Signed-off-by" to my commits
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@miodvallat miodvallat added the auth label Aug 7, 2026
Comment thread pdns/dnspacket.cc Dismissed
@coveralls

coveralls commented Aug 7, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32354577197

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-0.02%) to 71.205%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: 11 of 11 lines across 2 files are fully covered (100%).
  • 61 coverage regressions across 15 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

61 previously-covered lines in 15 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
pdns/misc.cc 11 62.54%
pdns/dnsproxy.cc 6 55.61%
pdns/recursordist/lwres.cc 6 66.78%
pdns/recursordist/syncres.cc 6 81.51%
pdns/recursordist/test-syncres_cc1.cc 6 80.18%
pdns/dnsdistdist/dnsdist-carbon.cc 4 59.8%
pdns/dnspacket.cc 4 72.71%
pdns/shuffle.cc 4 53.93%
pdns/recursordist/test-syncres_cc2.cc 3 79.39%
pdns/stubresolver.cc 3 75.0%

Coverage Stats

Coverage Status
Relevant Lines: 173289
Covered Lines: 135297
Line Coverage: 78.08%
Relevant Branches: 82898
Covered Branches: 47120
Branch Coverage: 56.84%
Branches in Coverage %: Yes
Coverage Strength: 5871217.09 hits per line

💛 - Coveralls

@Habbie Habbie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first commit (from other PR) already looked good to me. Second commit (wrapup cleanup) looks good to me but deserves another pair of eyes.

Third commit also looks good, but needs docs. I'd also like rec and dnsdist people to have a brief look (perhaps once docs are written) to make sure all our products interact correctly with this change.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants