aboutsummaryrefslogtreecommitdiffstats
path: root/util/ip.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-01 05:13:28 +0100
committerKim Alvefur <zash@zash.se>2017-12-01 05:13:28 +0100
commite2ef028b09f279bd53e991bc52c1ca1a3b8eff0a (patch)
treeb994d9478a17b5285ea3dde71c7a813680a07e13 /util/ip.lua
parentf31e73eb4857a08a82825a19e65a765d2848491b (diff)
downloadprosody-e2ef028b09f279bd53e991bc52c1ca1a3b8eff0a.tar.gz
prosody-e2ef028b09f279bd53e991bc52c1ca1a3b8eff0a.zip
util.ip: Do equality checking by comparing packed representation to avoid any variations
Diffstat (limited to 'util/ip.lua')
-rw-r--r--util/ip.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/ip.lua b/util/ip.lua
index 9a77a8e1..6f704c75 100644
--- a/util/ip.lua
+++ b/util/ip.lua
@@ -19,7 +19,7 @@ local ip_mt = {
return ret;
end,
__tostring = function (ip) return ip.addr; end,
- __eq = function (ipA, ipB) return ipA.addr == ipB.addr; end
+ __eq = function (ipA, ipB) return ipA.packed == ipB.packed; end
};
local hex2bits = {