diff options
author | Kim Alvefur <zash@zash.se> | 2017-12-09 20:53:37 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-12-09 20:53:37 +0100 |
commit | 9448c2766764a46a6ddae34f5129b96c5ee3b2d0 (patch) | |
tree | 2a1443c2f73f28d7a0a20524bcfc5eaf769c3498 /util | |
parent | d6405de8e247061949162605fdeed3549de01928 (diff) | |
download | prosody-9448c2766764a46a6ddae34f5129b96c5ee3b2d0.tar.gz prosody-9448c2766764a46a6ddae34f5129b96c5ee3b2d0.zip |
util.ip: Convert the correct IP to IPv6-mapped for comparison (fixes traceback, possibly invalid result)
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 6f704c75..f4a933ea 100644 --- a/util/ip.lua +++ b/util/ip.lua @@ -238,7 +238,7 @@ function match(ipA, ipB, bits) if ipA.proto == "IPv4" then ipA = ipA.toV4mapped; elseif ipB.proto == "IPv4" then - ipB = ipA.toV4mapped; + ipB = ipB.toV4mapped; bits = bits + (128 - 32); end end |