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: Fix Dynamic Block RCode rules messing up the queries count #9980



Copy link

Short description

When a dynamic rcode rule was present, with a low traffic we could have been counting all the responses received by a client present in the in-memory ring-buffer, even very old ones, as queries. This could have triggered a query rate based dynamic block even though the client was not sending a lot of queries, in some none at all.
Also fixed a refreshing issue for SMT-based dynamic blocks.

Already fixed in master by #9756.

This PR could use additional regression tests (master as well)!


I have:

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

We now properly skip the too old entries when scanning responses,
so we need to set a long enough period so that the responses are
still valids when we compute the ratio.

(cherry picked from commit dcc50bd)
@rgacogne rgacogne merged commit 8c78c37 into PowerDNS:rel/dnsdist-1.5.x Jan 20, 2021
@rgacogne rgacogne deleted the ddist15-fix-dynamic-blocks branch January 20, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant