projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libs/core: fix firewall model
[project/luci.git]
/
libs
/
core
/
luasrc
/
model
/
firewall.lua
diff --git
a/libs/core/luasrc/model/firewall.lua
b/libs/core/luasrc/model/firewall.lua
index
6fc207c
..
a6158c2
100644
(file)
--- a/
libs/core/luasrc/model/firewall.lua
+++ b/
libs/core/luasrc/model/firewall.lua
@@
-74,21
+74,21
@@
function get_zones(self)
return zones
end
return zones
end
-function get_zone
s
_by_network(self, net)
- local z
ones = { }
+function get_zone_by_network(self, net)
+ local z
ub.uci:foreach("firewall", "zone",
function(s)
ub.uci:foreach("firewall", "zone",
function(s)
- if s.name then
+ if s.name
and net
then
local n
for _, n in ipairs(ub:list(s.network or s.name)) do
if n == net then
local n
for _, n in ipairs(ub:list(s.network or s.name)) do
if n == net then
- z
ones[#zones+1] = zone(s['.name'])
- return
tru
e
+ z
= s['.name']
+ return
fals
e
end
end
end
end)
end
end
end
end)
- return z
ones
+ return z
and zone(z)
end
function del_zone(self, n)
end
function del_zone(self, n)