diff options
author | Kim Alvefur <zash@zash.se> | 2017-12-01 03:31:37 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-12-01 03:31:37 +0100 |
commit | 45a9e749b3fad76466d7a4eecf21c72d5e892ff6 (patch) | |
tree | 38b1fc9f16a816c91df51e528a7796d88f16e84f /util | |
parent | 58da2819ae49ae089e312df4dad1179efb9d91f6 (diff) | |
download | prosody-45a9e749b3fad76466d7a4eecf21c72d5e892ff6.tar.gz prosody-45a9e749b3fad76466d7a4eecf21c72d5e892ff6.zip |
util.ip: Do exact match for longer bit counts than available
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 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; |