summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-08-27 14:39:33 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-08-27 14:39:33 +0000
commitf66a13dc4d8a40e1b0af0b9fb18a97af70ee9f70 (patch)
treeebf03bc434463a57e8d3cd33ce302306ec8bef19 /libs
parentc755e818c402e1f307a37cc90d0e8dfc3087b4c1 (diff)
libs/sys: use 100ms timeouts for name resolution of host hints
Diffstat (limited to 'libs')
-rw-r--r--libs/sys/luasrc/sys.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index bcffe7c4e..825092fff 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -342,17 +342,17 @@ end
function net.mac_hints(callback)
if callback then
_nethints(1, function(mac, v4, v6, name)
- name = name or nixio.getnameinfo(v4 or v6) or v4
+ name = name or nixio.getnameinfo(v4 or v6, nil, 100) or v4
if name and name ~= mac then
- callback(mac, name or nixio.getnameinfo(v4 or v6) or v4)
+ callback(mac, name or nixio.getnameinfo(v4 or v6, nil, 100) or v4)
end
end)
else
local rv = { }
_nethints(1, function(mac, v4, v6, name)
- name = name or nixio.getnameinfo(v4 or v6) or v4
+ name = name or nixio.getnameinfo(v4 or v6, nil, 100) or v4
if name and name ~= mac then
- rv[#rv+1] = { mac, name or nixio.getnameinfo(v4 or v6) or v4 }
+ rv[#rv+1] = { mac, name or nixio.getnameinfo(v4 or v6, nil, 100) or v4 }
end
end)
return rv
@@ -366,7 +366,7 @@ end
function net.ipv4_hints(callback)
if callback then
_nethints(2, function(mac, v4, v6, name)
- name = name or nixio.getnameinfo(v4) or mac
+ name = name or nixio.getnameinfo(v4, nil, 100) or mac
if name and name ~= v4 then
callback(v4, name)
end
@@ -374,7 +374,7 @@ function net.ipv4_hints(callback)
else
local rv = { }
_nethints(2, function(mac, v4, v6, name)
- name = name or nixio.getnameinfo(v4) or mac
+ name = name or nixio.getnameinfo(v4, nil, 100) or mac
if name and name ~= v4 then
rv[#rv+1] = { v4, name }
end
@@ -390,7 +390,7 @@ end
function net.ipv6_hints(callback)
if callback then
_nethints(3, function(mac, v4, v6, name)
- name = name or nixio.getnameinfo(v6) or mac
+ name = name or nixio.getnameinfo(v6, nil, 100) or mac
if name and name ~= v6 then
callback(v6, name)
end
@@ -398,7 +398,7 @@ function net.ipv6_hints(callback)
else
local rv = { }
_nethints(3, function(mac, v4, v6, name)
- name = name or nixio.getnameinfo(v6) or mac
+ name = name or nixio.getnameinfo(v6, nil, 100) or mac
if name and name ~= v6 then
rv[#rv+1] = { v6, name }
end