git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
4e1b884
)
luci-mod-admin-full: use rpcd-mod-rrdns for reverse DNS lookups
author
Jo-Philipp Wich
<redacted>
Tue, 11 Jul 2017 12:18:40 +0000
(14:18 +0200)
committer
Jo-Philipp Wich
<redacted>
Tue, 11 Jul 2017 12:18:40 +0000
(14:18 +0200)
Signed-off-by: Jo-Philipp Wich <redacted>
modules/luci-mod-admin-full/luasrc/controller/admin/status.lua
patch
|
blob
|
history
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 ad575e0d2611e4c0c8baae77fe15e2bec4a62e07..22e1b7e173a5907bc8c45eadec4b7e5a45d8d552 100644
(file)
--- 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
git clone https://git.99rst.org/PROJECT