Changeset

8468:5bfe58539b6c

util.ip: Convert the correct IP to IPv6-mapped for comparison (fixes traceback, possibly invalid result)
author Kim Alvefur <zash@zash.se>
date Sat, 09 Dec 2017 20:53:37 +0100
parents 8467:7269313c1324
children 8469:52d48cea1f60
files util/ip.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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