From 953d480b0533eb84953f5e86adef949596148ca7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?H=C3=A5kan=20Lindqvist?= Date: Sun, 6 Mar 2016 09:36:45 +0100 Subject: [PATCH] Handle unset 'zone' in policy RRL script --- pdns/policy-example-rrl.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/policy-example-rrl.lua b/pdns/policy-example-rrl.lua index 4180c7718d..cd4f762877 100644 --- a/pdns/policy-example-rrl.lua +++ b/pdns/policy-example-rrl.lua @@ -85,7 +85,7 @@ function police (req, resp, isTcp) reqsize = req:getSize() respsize = resp:getSize() rcode = resp:getRcode() - print ("< ", qname, qtype, remote, "wild: "..(wild or "EMPTY"), "zone: "..zone, reqsize.."/"..respsize, rcode, isTcp ) + print ("< ", qname, qtype, remote, "wild: "..(wild or "EMPTY"), "zone: "..(zone or "EMPTY"), reqsize.."/"..respsize, rcode, isTcp ) if isTcp then return pdns.PASS end -- mywindow[1][1] = mywindow[1][1]+1 @@ -100,7 +100,7 @@ function police (req, resp, isTcp) imputedname = wild elseif rcode == pdns.NXDOMAIN or errorstatus then - imputedname = zone + imputedname = zone or "EMPTY" end token = mask(remote).."/"..imputedname.."/"..tostring(errorstatus) submit(mywindow[1], token) -- FIXME: only submit when doing PASS/TRUNCATE? -- 2.47.2