summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-firewall/luasrc/tools/firewall.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-06-08 17:09:18 +0200
committerJo-Philipp Wich <jo@mein.io>2018-06-08 17:09:18 +0200
commit2eb4015e18e17e23cf7df3b8f485224a82d0d4e8 (patch)
tree7f035edee4fd34cd27666696017573e61907fc36 /applications/luci-app-firewall/luasrc/tools/firewall.lua
parente7866c7dccd72943bd985de32031002f37f9a777 (diff)
luci-app-firewall: recognize egress rules in rule overview
Along with 74be6f397 ("treewide: switch firewall zone, network and iface lists to dropdown code"), this change allows luci-app-firewall to recognize OUTPUT rules. Fixes #1457. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-firewall/luasrc/tools/firewall.lua')
-rw-r--r--applications/luci-app-firewall/luasrc/tools/firewall.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/applications/luci-app-firewall/luasrc/tools/firewall.lua b/applications/luci-app-firewall/luasrc/tools/firewall.lua
index 2d89bfa2a..055342bfb 100644
--- a/applications/luci-app-firewall/luasrc/tools/firewall.lua
+++ b/applications/luci-app-firewall/luasrc/tools/firewall.lua
@@ -198,8 +198,18 @@ function fmt_limit(limit, burst)
end
end
-function fmt_target(x, dest)
- if dest and #dest > 0 then
+function fmt_target(x, src, dest)
+ if not src or #src == 0 then
+ if x == "ACCEPT" then
+ return _("Accept output")
+ elseif x == "REJECT" then
+ return _("Refuse output")
+ elseif x == "NOTRACK" then
+ return _("Do not track output")
+ else --if x == "DROP" then
+ return _("Discard output")
+ end
+ elseif dest and #dest > 0 then
if x == "ACCEPT" then
return _("Accept forward")
elseif x == "REJECT" then