summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-firewall/luasrc/model
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-04-24 21:42:55 +0000
committerJo-Philipp Wich <jow@openwrt.org>2014-04-24 21:42:55 +0000
commitf26e8e95165a1bc70469cb5f30230a6855d5f000 (patch)
treed68536ca64afaa88c55f05c3a1d210b841a17848 /applications/luci-firewall/luasrc/model
parentb2d5843ddc739fdd1f4a7359222d04cef5f88938 (diff)
applications/luci-firewall: cope with both tables and strings when processing zone name or network in rule detail page (#675)
Diffstat (limited to 'applications/luci-firewall/luasrc/model')
-rw-r--r--applications/luci-firewall/luasrc/model/cbi/firewall/rule-details.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/applications/luci-firewall/luasrc/model/cbi/firewall/rule-details.lua b/applications/luci-firewall/luasrc/model/cbi/firewall/rule-details.lua
index 3f5eb35b20..d29879c247 100644
--- a/applications/luci-firewall/luasrc/model/cbi/firewall/rule-details.lua
+++ b/applications/luci-firewall/luasrc/model/cbi/firewall/rule-details.lua
@@ -13,6 +13,7 @@ You may obtain a copy of the License at
]]--
local sys = require "luci.sys"
+local utl = require "luci.util"
local dsp = require "luci.dispatcher"
local nxo = require "nixio"
@@ -62,7 +63,7 @@ elseif rule_type == "redirect" then
local n = s.network or s.name
if n then
local i
- for i in n:gmatch("%S+") do
+ for i in utl.imatch(n) do
if i == "wan" then
wan_zone = s.name
return false