luci.dispatcher.build_url("admin", "status", "iptables")
)
elseif luci.http.formvalue("restart") == "1" then
- luci.util.exec("/etc/init.d/firewall restart")
+ luci.util.exec("/etc/init.d/firewall reload")
luci.http.redirect(
luci.dispatcher.build_url("admin", "status", "iptables")
)
end
end
-function action_bandwidth()
- local path = luci.dispatcher.context.requestpath
- local iface = path[#path]
-
+function action_bandwidth(iface)
luci.http.prepare_content("application/json")
local bwc = io.popen("luci-bwc -i %q 2>/dev/null" % iface)
end
end
-function action_wireless()
- local path = luci.dispatcher.context.requestpath
- local iface = path[#path]
-
+function action_wireless(iface)
luci.http.prepare_content("application/json")
local bwc = io.popen("luci-bwc -r %q 2>/dev/null" % iface)