aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-08-08 13:12:09 +0300
committerTimo Teräs <timo.teras@iki.fi>2012-08-08 13:13:00 +0300
commitb2c9e70c11e887c46584e571e834d7ac87e4c538 (patch)
tree5c2194911a0365a3ed4a18b94f5b5ab0df60809e
parentcd6133557143232dce14ab87378b2a9ca5386cf2 (diff)
downloadawall-b2c9e70c11e887c46584e571e834d7ac87e4c538.tar.bz2
awall-b2c9e70c11e887c46584e571e834d7ac87e4c538.tar.xz
fix dns resolving on certain systems
dig can emit spaces also instead of tabs.
-rw-r--r--awall/host.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/awall/host.lua b/awall/host.lua
index be1dc61..aaa0854 100644
--- a/awall/host.lua
+++ b/awall/host.lua
@@ -26,9 +26,9 @@ function resolve(host, context)
if not dnscache[host] then
dnscache[host] = {}
- for rec in io.popen('dig '..host..' ANY'):lines() do
+ for rec in io.popen('dig -t ANY '..host):lines() do
local name, rtype, addr =
- string.match(rec, '^('..familypatterns.domain..')\t+%d+\t+IN\t+(A+)\t+(.+)')
+ string.match(rec, '^('..familypatterns.domain..')%s+%d+%s+IN%s+(A+)%s+(.+)')
if name and string.sub(name, 1, string.len(host) + 1) == host..'.' then
if rtype == 'A' then family = 'inet'