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: LogResponseAction #8654

Merged
merged 2 commits into from Jan 6, 2020
Merged

dnsdist: LogResponseAction #8654

merged 2 commits into from Jan 6, 2020

Conversation

phonedph1
Copy link
Contributor

@phonedph1 phonedph1 commented Dec 20, 2019

Short description

dnsdist currently lacks a LogResponseAction but does have other response logging. It would be nice to have some basic LogResponseAction so things can be logged based on RCode, etc.

This version does not do the binary log, but if there is a desire to have LogAction + LogResponseAction the same interface I'll try to do that.

Largely copy&paste from LogAction but added RCode in the log.

> addResponseAction(AllRule(),LogResponseAction("", true, false, true, true))
> Got query for google.ca|A from 127.0.0.1:60897, relayed to 8.8.8.8:53
[1576861363.424282583] Answer to 127.0.0.1:60897 for google.ca. A (No Error) with id 1139
Got answer from 8.8.8.8:53, relayed to 127.0.0.1:60897, took 16722.2 usec

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)

Copy link
Member

@rgacogne rgacogne left a comment

Looks very good, thanks! A bit of documentation in pdns/dnsdistdist/docs/rules-actions.rst would be even better ;-)

Copy link
Member

@rgacogne rgacogne left a comment

Looks good, thanks!

@rgacogne rgacogne merged commit 8c5ba87 into PowerDNS:master Jan 6, 2020
28 checks passed
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