From 43a4481e103d764d6f656f2ed1f5c57f8580858e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 18 Dec 2019 21:57:01 +0100 Subject: luci-mod-status: replace iptables controller actions with cgi-io calls Signed-off-by: Jo-Philipp Wich --- .../luasrc/controller/admin/status.lua | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'modules/luci-mod-status/luasrc/controller') diff --git a/modules/luci-mod-status/luasrc/controller/admin/status.lua b/modules/luci-mod-status/luasrc/controller/admin/status.lua index 2684bdf715..e84f88d642 100644 --- a/modules/luci-mod-status/luasrc/controller/admin/status.lua +++ b/modules/luci-mod-status/luasrc/controller/admin/status.lua @@ -14,27 +14,6 @@ function action_dmesg() luci.template.render("admin_status/dmesg", {dmesg=dmesg}) end -function dump_iptables(family, table) - local prefix = (family == "6") and "ip6" or "ip" - local ok, lines = pcall(io.lines, "/proc/net/%s_tables_names" % prefix) - if ok and lines then - local s - for s in lines do - if s == table then - luci.http.prepare_content("text/plain") - luci.sys.process.exec({ - "/usr/sbin/%stables" % prefix, "-w", "-t", table, - "--line-numbers", "-nxvL" - }, luci.http.write) - return - end - end - end - - luci.http.status(404, "No such table") - luci.http.prepare_content("text/plain") -end - function action_iptables() if luci.http.formvalue("zero") then if luci.http.formvalue("family") == "6" then -- cgit v1.2.3