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 | 9709fe286b042b5c4172ec84d3a87282b23e85dd (patch) | |
tree | 2a1443c2f73f28d7a0a20524bcfc5eaf769c3498 | |
parent | e786f43af6f2bda98a586a8029155758a8c82f6b (diff) | |
download | prosody-9709fe286b042b5c4172ec84d3a87282b23e85dd.tar.gz prosody-9709fe286b042b5c4172ec84d3a87282b23e85dd.zip |
util.ip: Convert the correct IP to IPv6-mapped for comparison (fixes traceback, possibly invalid result)
-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 |