summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua27
1 files changed, 3 insertions, 24 deletions
diff --git a/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua b/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua
index a4763d5dc..def01c669 100644
--- a/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua
+++ b/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua
@@ -1,15 +1,10 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2010-2012 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-
-local sys = require "luci.sys"
-local utl = require "luci.util"
local dsp = require "luci.dispatcher"
-local nxo = require "nixio"
-
local ft = require "luci.tools.firewall"
local nw = require "luci.model.network"
-local m, s, o, k, v
+local m, s, o, v, _
arg[1] = arg[1] or ""
@@ -46,22 +41,6 @@ elseif rule_type == "redirect" then
m.title = "%s - %s" %{ translate("Firewall - Traffic Rules"), name }
- local wan_zone = nil
-
- m.uci:foreach("firewall", "zone",
- function(s)
- local n = s.network or s.name
- if n then
- local i
- for i in utl.imatch(n) do
- if i == "wan" then
- wan_zone = s.name
- return false
- end
- end
- end
- end)
-
s = m:section(NamedSection, arg[1], "redirect", "")
s.anonymous = true
s.addremove = false
@@ -154,9 +133,9 @@ elseif rule_type == "redirect" then
o.rmempty = false
o.datatype = "ip4addr"
- for k, v in ipairs(nw:get_interfaces()) do
+ for _, v in ipairs(nw:get_interfaces()) do
local a
- for k, a in ipairs(v:ipaddrs()) do
+ for _, a in ipairs(v:ipaddrs()) do
o:value(a:host():string(), '%s (%s)' %{
a:host():string(), v:shortname()
})