# HG changeset patch # User Kim Alvefur # Date 1512849217 -3600 # Node ID 5bfe58539b6c460c93a792fd0e1679aaab941ed2 # Parent 7269313c132418fb8d705f05943cb8f36a4116dc util.ip: Convert the correct IP to IPv6-mapped for comparison (fixes traceback, possibly invalid result) diff -r 7269313c1324 -r 5bfe58539b6c util/ip.lua --- a/util/ip.lua Sat Dec 09 15:40:37 2017 +0100 +++ b/util/ip.lua Sat Dec 09 20:53:37 2017 +0100 @@ -238,7 +238,7 @@ 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