Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
4431:bbede0141f7e | 4432:cbc3224ed3c2 |
---|---|
63 return 0x2; | 63 return 0x2; |
64 -- Link-local unicast: | 64 -- Link-local unicast: |
65 elseif fields[1] == 169 and fields[2] == 254 then | 65 elseif fields[1] == 169 and fields[2] == 254 then |
66 return 0x2; | 66 return 0x2; |
67 -- Site-local unicast: | 67 -- Site-local unicast: |
68 elseif (fields[1] == 10) or (fields[1] == 192 and fields[2] == 168) or (fields[1] == 172 and fields[2] > 16) then | 68 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 |
69 return 0x5; | 69 return 0x5; |
70 -- Global unicast: | 70 -- Global unicast: |
71 else | 71 else |
72 return 0xE; | 72 return 0xE; |
73 end | 73 end |