]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
rebinding nitpick: respect ALLOW_LOCAL flag
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 9 Aug 2019 10:04:29 +0000 (12:04 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 12 Aug 2019 08:02:30 +0000 (10:02 +0200)
Some people might want the rebinding module generally but still use
policy to allow local addresses in some specific cases.

modules/rebinding/rebinding.lua

index 967abe44eaba72ea1420d9e36cc8cc671945151a..25f92c9a43cba94b55e1650c6385e98f5c38ac81 100644 (file)
@@ -95,7 +95,7 @@ function M.layer.consume(state, req, pkt)
                return state end
 
        local qry = req:current()
-       if qry.flags.CACHED then  -- do not slow down cached queries
+       if qry.flags.CACHED or qry.flags.ALLOW_LOCAL then  -- do not slow down cached queries
                return state end
 
        local bad_rr = check_pkt(pkt)