diff options
author | Kim Alvefur <zash@zash.se> | 2017-12-01 05:13:28 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-12-01 05:13:28 +0100 |
commit | e2ef028b09f279bd53e991bc52c1ca1a3b8eff0a (patch) | |
tree | b994d9478a17b5285ea3dde71c7a813680a07e13 /util | |
parent | f31e73eb4857a08a82825a19e65a765d2848491b (diff) | |
download | prosody-e2ef028b09f279bd53e991bc52c1ca1a3b8eff0a.tar.gz prosody-e2ef028b09f279bd53e991bc52c1ca1a3b8eff0a.zip |
util.ip: Do equality checking by comparing packed representation to avoid any variations
Diffstat (limited to 'util')
-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 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 = { |