aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-09 20:53:37 +0100
committerKim Alvefur <zash@zash.se>2017-12-09 20:53:37 +0100
commit9709fe286b042b5c4172ec84d3a87282b23e85dd (patch)
tree2a1443c2f73f28d7a0a20524bcfc5eaf769c3498 /util
parente786f43af6f2bda98a586a8029155758a8c82f6b (diff)
downloadprosody-9709fe286b042b5c4172ec84d3a87282b23e85dd.tar.gz
prosody-9709fe286b042b5c4172ec84d3a87282b23e85dd.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.lua2
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