From 762989f7c94be6aee39ae01f91894dbd0fafb890 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 30 Nov 2011 17:20:16 +0000 Subject: util.ip: Fix in IP range calculation for 172.16.0.0/12 --- util/ip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/ip.lua b/util/ip.lua index 5e2f46bb..5b866b04 100644 --- a/util/ip.lua +++ b/util/ip.lua @@ -65,7 +65,7 @@ local function v4scope(ip) elseif fields[1] == 169 and fields[2] == 254 then return 0x2; -- Site-local unicast: - elseif (fields[1] == 10) or (fields[1] == 192 and fields[2] == 168) or (fields[1] == 172 and fields[2] > 16) then + elseif (fields[1] == 10) or (fields[1] == 192 and fields[2] == 168) or (fields[1] == 172 and (fields[2] >= 16 and fields[2] < 32) then return 0x5; -- Global unicast: else -- cgit v1.2.3