]> granicus.if.org Git - pdns/commit
Merge work-in-progress Lua policy engine.
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Fri, 6 Jun 2014 10:43:27 +0000 (12:43 +0200)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Fri, 13 Feb 2015 14:43:16 +0000 (15:43 +0100)
commit3e8216c8461e01e7a08d1985d7e1354adac3413b
tree7fb8e69153370fbed58f71697c42964b049967ce
parentacd45a5ecfb981f252df3d082476df9e3f8277dd
Merge work-in-progress Lua policy engine.

Some text from the Pull Request at the time of merge:

Should not break anything when not used; should not break anything when used
(assuming the loaded script is free of bugs). Example script may not be
entirely correct. Needs tests (dnsperf QPS is a fine KPI).

Run `git show <thiscommit> | grep FIXME` to see known issues.

Todo/evolution ideas:

Copy reload/unload behaviour from recursor (allow reloading different script,
don't replace running instance when loading fails due to syntax errors etc).
Related, make sure we do PASS when the police() call fails.

Add pdns-side metrics (drops/passes/truncates/lua errors) (probably some
actual breakage in the metrics area right now). Log (sample of) lua errors.

Call metrics() periodically (every second) and merge those into our own,
including carbon submission? Perhaps with incremental (number since last read)
vs. absolute flag (number since startup). If absolute, consider
'checkpointing' on script reload.

Call statsline() periodically (every X minutes) for a summary we can log?

Write wrapper (in Lua?) to allow loading policy scripts into recursor using
the hooks already present there (pre/postresolve).

Expose header/extra flags (RD, DO, etc.).
23 files changed:
.travis.yml
docs/WIP/luapolicy.xml [new file with mode: 0644]
pdns/common_startup.cc
pdns/common_startup.hh
pdns/dnspacket.cc
pdns/dnspacket.hh
pdns/dynhandler.cc
pdns/dynhandler.hh
pdns/lua-auth.cc
pdns/lua-auth.hh
pdns/lua-pdns.cc
pdns/lua-pdns.hh
pdns/packethandler.cc
pdns/pdns.conf-dist
pdns/pdns_recursor.cc
pdns/policy-example-rrl.lua [new file with mode: 0644]
pdns/receiver.cc
pdns/tcpreceiver.cc
regression-tests.nobackend/lua-policy/command [new file with mode: 0755]
regression-tests.nobackend/lua-policy/description [new file with mode: 0644]
regression-tests.nobackend/lua-policy/expected_result [new file with mode: 0644]
regression-tests.nobackend/lua-policy/named.conf [new file with mode: 0644]
regression-tests.nobackend/lua-policy/policy.lua [new file with mode: 0644]