projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03a6d3f
)
libs/core: fix firewall model
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 10 Oct 2009 04:48:57 +0000
(
04:48
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 10 Oct 2009 04:48:57 +0000
(
04:48
+0000)
libs/core/luasrc/model/firewall.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/model/firewall.lua
b/libs/core/luasrc/model/firewall.lua
index 6fc207cac484d95e37749ee6fd31f251d88325a9..a6158c20523125f8d0e77f63f6a5c14b241de9c2 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
-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)
- 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
- z
ones[#zones+1] = zone(s['.name'])
- return
tru
e
+ z
= s['.name']
+ return
fals
e
end
end
end
end)
- return z
ones
+ return z
and zone(z)
end
function del_zone(self, n)