From 000692788a003d11afbe24bd44387e5337f51517 Mon Sep 17 00:00:00 2001 From: spirillen <44526987+spirillen@users.noreply.github.com> Date: Mon, 14 Sep 2020 11:41:10 +0200 Subject: [PATCH] Small rewrite of `addMasks(dofile` I have made this little rewrite to avoid other from pit falling into the same mistake I made myself, and read the existent code as a list of IP's inside `bad.ips`, and not a script returning pre-formatted IPs. --- pdns/recursordist/docs/lua-scripting/netmask.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/recursordist/docs/lua-scripting/netmask.rst b/pdns/recursordist/docs/lua-scripting/netmask.rst index f50ad8f101..8508ec6c24 100644 --- a/pdns/recursordist/docs/lua-scripting/netmask.rst +++ b/pdns/recursordist/docs/lua-scripting/netmask.rst @@ -86,7 +86,7 @@ They can be matched against netmasks objects: nmg = newNMG() nmg:addMask("127.0.0.0/8") nmg:addMasks({"213.244.168.0/24", "130.161.0.0/16"}) - nmg:addMasks(dofile("bad.ips")) -- contains return {"ip1","ip2"..} + nmg:addMasks(dofile("bad-ips.lua")) -- a lua script that return {"ip1","ip2"..} if nmg:match(dq.remoteaddr) then print("Intercepting query from ", dq.remoteaddr) -- 2.47.2