Changeset

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
parents 7055:23de70d19e77
children 7057:c633e1338554
files net/dns.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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