summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/controller/admin
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-07-11 14:18:40 +0200
committerJo-Philipp Wich <jo@mein.io>2017-07-11 14:18:40 +0200
commit00ae50134bba7df05e1c6743d250f0137261fdb7 (patch)
tree1bec817604380af84958c7a2b549c484304e38e6 /modules/luci-mod-admin-full/luasrc/controller/admin
parent4e1b884157017b6729d2523e95385756898eac7c (diff)
luci-mod-admin-full: use rpcd-mod-rrdns for reverse DNS lookups
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/controller/admin')
-rw-r--r--modules/luci-mod-admin-full/luasrc/controller/admin/status.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua
index ad575e0d26..22e1b7e173 100644
--- a/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua
+++ b/modules/luci-mod-admin-full/luasrc/controller/admin/status.lua
@@ -139,14 +139,12 @@ function action_connections()
end
function action_nameinfo(...)
- local i
- local rv = { }
- for i = 1, select('#', ...) do
- local addr = select(i, ...)
- local fqdn = nixio.getnameinfo(addr)
- rv[addr] = fqdn or (addr:match(":") and "[%s]" % addr or addr)
- end
+ local util = require "luci.util"
luci.http.prepare_content("application/json")
- luci.http.write_json(rv)
+ luci.http.write_json(util.ubus("network.rrdns", "lookup", {
+ addrs = { ... },
+ timeout = 5000,
+ limit = 1000
+ }) or { })
end