Skip to content

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

Open
miodvallat wants to merge 3 commits into
PowerDNS:masterfrom
miodvallat:defaultscopeprefix
Open

auth: allow EDNS Client Subnet prefix to be narrowed#17879
miodvallat wants to merge 3 commits 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)

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
@miodvallat miodvallat added the auth label Aug 7, 2026
Comment thread pdns/dnspacket.cc Dismissed
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 31175548763

Coverage increased (+9.4%) to 71.205%

Details

  • Coverage increased (+9.4%) from the base build.
  • Patch coverage: 41 of 41 lines across 3 files are fully covered (100%).
  • 23753 coverage regressions across 295 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

23753 previously-covered lines in 295 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
pdns/dnsdistdist/dnsdist-lua.cc 1032 52.04%
pdns/lua-record.cc 912 0.16%
pdns/recursordist/rec-main.cc 778 65.83%
pdns/recursordist/syncres.cc 611 81.52%
pdns/dnsdistdist/dnsdist.cc 607 68.8%
modules/lmdbbackend/lmdbbackend.cc 579 72.42%
pdns/recursordist/rec_channel_rec.cc 561 36.35%
pdns/dnsdistdist/dnsdist-configuration-yaml.cc 543 55.78%
pdns/dnsdistdist/dnsdist-actions-factory.cc 503 62.71%
pdns/recursordist/ws-recursor.cc 502 22.03%

Coverage Stats

Coverage Status
Relevant Lines: 173021
Covered Lines: 135094
Line Coverage: 78.08%
Relevant Branches: 82778
Covered Branches: 47047
Branch Coverage: 56.84%
Branches in Coverage %: Yes
Coverage Strength: 6860912.5 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.

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