Skip to content

dnsdist-2.1: Backport 17380 - Fix OPT rdlen computation when adding ECS#17436

Merged
rgacogne merged 1 commit into
PowerDNS:rel/dnsdist-2.1.xfrom
rgacogne:ddist21-backport-17380
May 21, 2026
Merged

dnsdist-2.1: Backport 17380 - Fix OPT rdlen computation when adding ECS#17436
rgacogne merged 1 commit into
PowerDNS:rel/dnsdist-2.1.xfrom
rgacogne:ddist21-backport-17380

Conversation

@rgacogne
Copy link
Copy Markdown
Member

Short description

Backport #17380 to dnsdist-2.1.x

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)
  • checked that this code was merged to master

If an incoming query has a very large EDNS OPT rdata length, but
not the corresponding bytes, the existing code could have wrapped
around to a small value after adding ECS. We would then send an invalid
OPT record with some trailing bytes. The query would have been discarded
by the backend but that's not very nice, let's drop it early AND make
sure we don't wrap around.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 5041ad7)
@rgacogne rgacogne merged commit b5caed4 into PowerDNS:rel/dnsdist-2.1.x May 21, 2026
19 checks passed
@rgacogne rgacogne deleted the ddist21-backport-17380 branch May 21, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants