Diff

net/dns.lua @ 4422:c25dee24623f

s2smanager, net.dns: Fix handling for NXNAME and SRV target of "."
author Florian Zeitz <florob@babelmonkeys.de>
date Wed, 26 Oct 2011 02:03:33 +0200
parent 4400:ac651265766c
child 5266:5c3a3ef6b769
line wrap: on
line diff
--- a/net/dns.lua	Sat Oct 22 18:29:23 2011 +0200
+++ b/net/dns.lua	Wed Oct 26 02:03:33 2011 +0200
@@ -358,6 +358,7 @@
 	local remember, pointers = nil, 0;
 	local len = self:byte();
 	local n = {};
+	if len == 0 then return "." end -- Root label
 	while len > 0 do
 		if len >= 0xc0 then    -- name is "compressed"
 			pointers = pointers + 1;