diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-11-30 17:20:16 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-11-30 17:20:16 +0000 |
commit | 65ffc174876fadcd779692dafd642386b2b9a635 (patch) | |
tree | 406fb09919b3fdafa4eedde0514623761a5b1281 /util | |
parent | 05214cebac73c1559b0a794d9d982cfcb099717e (diff) | |
download | prosody-65ffc174876fadcd779692dafd642386b2b9a635.tar.gz prosody-65ffc174876fadcd779692dafd642386b2b9a635.zip |
util.ip: Fix in IP range calculation for 172.16.0.0/12
Diffstat (limited to 'util')
-rw-r--r-- | util/ip.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |