]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
add a sample MAC address extraction to powerdns example Lua script
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 26 Jan 2016 10:11:12 +0000 (11:11 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 26 Jan 2016 10:11:12 +0000 (11:11 +0100)
pdns/powerdns-example-script.lua

index 6b08dcedc5cc17b031fc27d5ddf9c6655df157b3..3374e4e4685d26f5d2d8b7586d1853d29d110495 100644 (file)
@@ -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