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: Set a correct EDNS OPT RR for self-generated answers #6847

Merged
merged 3 commits into from
Sep 4, 2018

Conversation

rgacogne
Copy link
Member

@rgacogne rgacogne commented Aug 10, 2018

Short description

Fixes #6348 (but at the moment not #4857).
Needs:

  • documentation
  • unit tests would be nice

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)

@rgacogne rgacogne added this to the dnsdist-1.4.0 milestone Aug 10, 2018
@rgacogne rgacogne changed the title [WIP] dnsdist: Set a correct EDNS OPT RR for self-generated answers dnsdist: Set a correct EDNS OPT RR for self-generated answers Aug 20, 2018
@rgacogne
Copy link
Member Author

Should now fix #4857 as well.

@rgacogne
Copy link
Member Author

Ready for review!

@@ -423,6 +424,7 @@ const std::vector<ConsoleKeyword> g_consoleKeywords{
{ "setMaxTCPQueriesPerConnection", true, "n", "set the maximum number of queries in an incoming TCP connection. 0 means unlimited" },
{ "setMaxTCPQueuedConnections", true, "n", "set the maximum number of TCP connections queued (waiting to be picked up by a client thread)" },
{ "setMaxUDPOutstanding", true, "n", "set the maximum number of outstanding UDP queries to a given backend server. This can only be set at configuration time and defaults to 10240" },
{ "setPayloadSizeOnSelfGeneratedAnswers", true, "add", "set the UDP payload size advertised via EDNS on self-generated responses" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

payloadSize instead of add ?

@@ -450,6 +457,10 @@ DNSAction::Action SpoofAction::operator()(DNSQuestion* dq, string* ruleresult) c

dq->dh->ancount = htons(dq->dh->ancount);

if (hadEDNS && g_addEDNSToSelfGeneratedResponses) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing against g_addEDNSToSelfGeneratedResponses is redundant with setting hadEDNS just before.


.. versionadded:: 1.3.3

Set the UDP payload size advertised via EDNS on self-generated responses.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add there that it must be greater than 512 ?

@rgacogne
Copy link
Member Author

Comments fixed, thanks for the review!

@rgacogne
Copy link
Member Author

rgacogne commented Sep 3, 2018

Rebased to fix a conflict.

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.

dnsdist lua nxdomain spoof echoes flags and EDNS options
2 participants