dnsdist: Add `QNameLabelsCountRule()` and `QNameWireLengthRule()` #4114

Merged
merged 1 commit into from Jul 21, 2016

Projects

None yet

2 participants

@rgacogne
Member
rgacogne commented Jul 5, 2016
  • QNameLabelsCountRule(min, max) matches if the qname has less than
    min or more than max labels.
  • QNameWireLengthRule(min, max) matches if the qname's length on the
    wire is less than min or more than max bytes.
  • Also add Lua bindings for DNSName's countLabels() and wirelength()
@rgacogne rgacogne dnsdist: Add `QNameLabelsCountRule()` and `QNameWireLengthRule()`
* QNameLabelsCountRule(min, max) matches if the qname has less than
min or more than max labels.
* QNameWireLengthRule(min, max) matches if the qname's length on the
wire is less than min or more than max bytes.
* Also add Lua bindings for DNSName's `countLabels()` and `wirelength()`
57c61ce
@Habbie Habbie commented on the diff Jul 7, 2016
pdns/dnsdist-console.cc
@@ -248,7 +248,7 @@ char* my_generator(const char* text, int state)
"PoolAction(", "printDNSCryptProviderFingerprint(",
"RegexRule(", "RemoteLogAction(", "RemoteLogResponseAction(", "rmResponseRule(",
"rmRule(", "rmServer(", "roundrobin",
- "QTypeRule(",
+ "QNameLabelsCountRule(", "QNameWireLengthRule(", "QTypeRule(",
@Habbie
Habbie Jul 7, 2016 Member

wonder if this list should be one item per line for better diffs. Just a thought, not suggesting it for this PR.

@Habbie
Member
Habbie commented Jul 7, 2016

LGTM.

@Habbie Habbie merged commit 64b9ac4 into PowerDNS:master Jul 21, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rgacogne rgacogne deleted the rgacogne:dnsdist-labelscount-rule branch Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment