aboutsummaryrefslogtreecommitdiffstats
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
commit9448c2766764a46a6ddae34f5129b96c5ee3b2d0 (patch)
tree2a1443c2f73f28d7a0a20524bcfc5eaf769c3498
parentd6405de8e247061949162605fdeed3549de01928 (diff)
downloadprosody-9448c2766764a46a6ddae34f5129b96c5ee3b2d0.tar.gz
prosody-9448c2766764a46a6ddae34f5129b96c5ee3b2d0.zip
util.ip: Convert the correct IP to IPv6-mapped for comparison (fixes traceback, possibly invalid result)
-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