From 9be5c88b83b757139ba9e4405573b3cea407caae Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 1 Dec 2017 03:31:37 +0100 Subject: util.ip: Do exact match for longer bit counts than available --- util/ip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/ip.lua b/util/ip.lua index b65f6b6e..9575e499 100644 --- a/util/ip.lua +++ b/util/ip.lua @@ -228,7 +228,7 @@ local function parse_cidr(cidr) end function match(ipA, ipB, bits) - if not bits then + if not bits or bits >= 128 or ipB.proto == "IPv4" and bits >= 32 then return ipA == ipB; elseif bits < 1 then return true; -- cgit v1.2.3