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
commit36adf39958bcb5d4622bee2798cb456085bec065 (patch)
treeb994d9478a17b5285ea3dde71c7a813680a07e13 /util/ip.lua
parenta586b19dfd852b998d51f09ef4c3d90693f869ad (diff)
downloadprosody-36adf39958bcb5d4622bee2798cb456085bec065.tar.gz
prosody-36adf39958bcb5d4622bee2798cb456085bec065.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 = {