From: bert hubert Date: Tue, 26 Jan 2016 10:11:12 +0000 (+0100) Subject: add a sample MAC address extraction to powerdns example Lua script X-Git-Tag: dnsdist-1.0.0-alpha2~29^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=250376aae35ec8c83bc1204c3f9e63140fe57cc5;p=thirdparty%2Fpdns.git add a sample MAC address extraction to powerdns example Lua script --- diff --git a/pdns/powerdns-example-script.lua b/pdns/powerdns-example-script.lua index 6b08dcedc5..3374e4e468 100644 --- a/pdns/powerdns-example-script.lua +++ b/pdns/powerdns-example-script.lua @@ -20,6 +20,11 @@ magicMetric = getMetric("magic") function preresolve(dq) print("Got question for "..dq.qname:toString().." from "..dq.remoteaddr:toString().." to "..dq.localaddr:toString()) + local a=dq:getEDNSOption(3) + if(a) then + print("There is an EDNS option 3 present: "..a) + end + loc = newCA("127.0.0.1") if(dq.remoteaddr:equal(loc)) then