Software /
code /
prosody
Diff
util/ip.lua @ 4432:cbc3224ed3c2
util.ip: Fix in IP range calculation for 172.16.0.0/12
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 30 Nov 2011 17:20:16 +0000 |
parent | 4419:b1e49cc314cb |
child | 4433:f0e72fbe4d6a |
line wrap: on
line diff
--- a/util/ip.lua Mon Nov 28 14:30:12 2011 +0000 +++ b/util/ip.lua Wed Nov 30 17:20:16 2011 +0000 @@ -65,7 +65,7 @@ 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