Changeset

8421:3d21c63ec03f

net.dns: Don't compress a single zero group in IPv6 addresses to match behaviour of inet_ntop
author Kim Alvefur <zash@zash.se>
date Fri, 01 Dec 2017 04:50:20 +0100
parents 8420:fb27aff6d491
children 8440:4e6710b4f873 8453:6b3e7fddd723
files net/dns.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/dns.lua	Thu Nov 30 19:35:35 2017 +0100
+++ b/net/dns.lua	Fri Dec 01 04:50:20 2017 +0100
@@ -390,7 +390,7 @@
 	end
 	addr = table.concat(addr, ":"):gsub("%f[%x]0+(%x)","%1");
 	local zeros = {};
-	for item in addr:gmatch(":[0:]+:") do
+	for item in addr:gmatch(":[0:]+:[0:]+:") do
 		table.insert(zeros, item)
 	end
 	if #zeros == 0 then