From e6cc9e8761f3540920baced58cca5f08433013a3 Mon Sep 17 00:00:00 2001 From: George Melikov Date: Tue, 5 Oct 2021 16:00:52 +0300 Subject: [PATCH] powerdns-example-script.lua: clean up empty lines and spaces --- .../contrib/powerdns-example-script.lua | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pdns/recursordist/contrib/powerdns-example-script.lua b/pdns/recursordist/contrib/powerdns-example-script.lua index 1a9cab081d..adebcb0330 100644 --- a/pdns/recursordist/contrib/powerdns-example-script.lua +++ b/pdns/recursordist/contrib/powerdns-example-script.lua @@ -50,31 +50,31 @@ function preresolve(dq) then pdnslog("Faster magic") -- compares against existing DNSName end -- sadly, dq.qname == magic2 won't work yet - + if blockset:check(dq.qname) then dq.variable = true -- disable packet cache in any case if dq.qtype == pdns.A then dq:addAnswer(pdns.A, "1.2.3.4") - dq:addAnswer(pdns.TXT, "\"Hello!\"", 3601) -- ttl + dq:addAnswer(pdns.TXT, "\"Hello!\"", 3601) -- ttl return true; end end - + if dropset:check(dq.qname) then - dq.rcode = pdns.DROP + dq.rcode = pdns.DROP return true; end - - + + if malwareset:check(dq.qname) then dq:addAnswer(pdns.CNAME, "xs.powerdns.com.") dq.rcode = 0 dq.followupFunction="followCNAMERecords" -- this makes PowerDNS lookup your CNAME return true; - end - - return false; + end + + return false; end @@ -87,13 +87,13 @@ function nodata(dq) dq.followupPrefix="fe80::" return true end - + if dq.qtype == pdns.PTR then dq.followupFunction="getFakePTRRecords" dq.followupName=dq.qname dq.followupPrefix="fe80::" return true - end + end return false end -- 2.47.2