applications/luci-firewall: cope with both tables and strings when processing zone name or network in rule detail page (#675)
This commit is contained in:
parent
b2d5843ddc
commit
f26e8e9516
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@ You may obtain a copy of the License at
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
local sys = require "luci.sys"
|
local sys = require "luci.sys"
|
||||||
|
local utl = require "luci.util"
|
||||||
local dsp = require "luci.dispatcher"
|
local dsp = require "luci.dispatcher"
|
||||||
local nxo = require "nixio"
|
local nxo = require "nixio"
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ elseif rule_type == "redirect" then
|
||||||
local n = s.network or s.name
|
local n = s.network or s.name
|
||||||
if n then
|
if n then
|
||||||
local i
|
local i
|
||||||
for i in n:gmatch("%S+") do
|
for i in utl.imatch(n) do
|
||||||
if i == "wan" then
|
if i == "wan" then
|
||||||
wan_zone = s.name
|
wan_zone = s.name
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue