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: Add an option to return ServFail when no server is available #4726

Merged
merged 1 commit into from Dec 8, 2016

Conversation

rgacogne
Copy link
Member

@rgacogne rgacogne commented Dec 2, 2016

Short description

By default dnsdist drops the query if there is no server available to forward it to. This PR adds the setServFailWhenNoServer(bool) directive to reply with a ServFail instead.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added regression tests

@@ -1385,6 +1385,7 @@ instantiate a server with additional parameters
* `setServerPolicyLua(name, function)`: set server selection policy to one named 'name' and provided by 'function'
* `showServerPolicy()`: show name of currently operational server selection policy
* `newServerPolicy(name, function)`: create a policy object from a Lua function
* `setServFailWhenNoServer(bool)`: if set, returns a ServFail when no server are available instead of dropping the query (the default)
Copy link
Member

Choose a reason for hiding this comment

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

'if set, return a ServFail when no servers are available, instead of the default behaviour of dropping the query'

@@ -339,6 +339,7 @@ const std::vector<ConsoleKeyword> g_consoleKeywords{
{ "setRules", true, "list of rules", "replace the current rules with the supplied list of pairs of DNS Rules and DNS Actions (see `newRuleAction()`)" },
{ "setServerPolicy", true, "policy", "set server selection policy to that policy" },
{ "setServerPolicyLua", true, "name, function", "set server selection policy to one named 'name' and provided by 'function'" },
{ "setServFailWhenNoServer", true, "bool", "if set, returns a ServFail when no server are available instead of dropping the query (the default)" },
Copy link
Member

Choose a reason for hiding this comment

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

and update same text here. We still need to figure something out against this duplication :)

@rgacogne rgacogne merged commit eb038ad into PowerDNS:master Dec 8, 2016
@rgacogne rgacogne deleted the dnsdist-servfail-no-server branch December 8, 2016 09:09
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