Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: Check the size of the query when re-sending a DoH query #11079

Merged
merged 2 commits into from
Dec 17, 2021

Conversation

rgacogne
Copy link
Member

@rgacogne rgacogne commented Dec 8, 2021

Short description

When the UDP response to a DoH query was truncated, we re-send the query via TCP, passing it to a TCP worker. We need to edit the ID to its original value before that, and while there is no reason that the query is smaller than a dnsheader, we need to check its size, not the size of the response.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • 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)

When the UDP response to a DoH query was truncated, we re-send the
query via TCP, passing it to a TCP worker. We need to edit the ID
to its original value before that, and while there is no reason
that the query is smaller than a dnsheader, we need to check its size,
not the size of the response.
pdns/dnsdistdist/doh.cc Outdated Show resolved Hide resolved
@rgacogne rgacogne requested a review from Habbie December 15, 2021 11:04
@rgacogne rgacogne merged commit f8cd664 into PowerDNS:master Dec 17, 2021
@rgacogne rgacogne deleted the ddist-doh-tc-check-query-size branch December 17, 2021 10:13
@rgacogne rgacogne restored the ddist-doh-tc-check-query-size branch December 17, 2021 10:13
@rgacogne rgacogne deleted the ddist-doh-tc-check-query-size branch December 17, 2021 10:13
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.

None yet

2 participants