Diff

net/dns.lua @ 7056:7b0651e4534f

net.dns: Allow a zone id in resolv.conf (eg like %eth0)
author Kim Alvefur <zash@zash.se>
date Mon, 04 Jan 2016 15:46:06 +0100
parent 7054:94d5e2f33a10
child 7059:7ec52755622f
line wrap: on
line diff
--- a/net/dns.lua	Mon Jan 04 17:47:40 2016 +0100
+++ b/net/dns.lua	Mon Jan 04 15:46:06 2016 +0100
@@ -600,7 +600,7 @@
 		if resolv_conf then
 			for line in resolv_conf:lines() do
 				line = line:gsub("#.*$", "")
-					:match('^%s*nameserver%s+([%x:%.]*)%s*$');
+					:match('^%s*nameserver%s+([%x:%.]*%%?%S*)%s*$');
 				if line then
 					local ip = new_ip(line);
 					if ip then