summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-07-11 12:14:55 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-07-11 12:14:55 +0000
commit1a221ddfb9315a35af654363dde38650be5ad3d9 (patch)
tree29b36933fda3c69ce98431b3bd1b7b4af2a38946 /libs
parent3faeaddc5e270c828382a5a45f17ce0db6daeff0 (diff)
libs/core: fix multiple errors in zone delete handling of firewall model
Diffstat (limited to 'libs')
-rw-r--r--libs/core/luasrc/model/firewall.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/core/luasrc/model/firewall.lua b/libs/core/luasrc/model/firewall.lua
index c4904eba8..0c574e0f7 100644
--- a/libs/core/luasrc/model/firewall.lua
+++ b/libs/core/luasrc/model/firewall.lua
@@ -154,7 +154,7 @@ function del_zone(self, n)
if uci_r:get("firewall", n) == "zone" then
local z = uci_r:get("firewall", n, "name")
- r = uci_r:delete("firwall", n)
+ r = uci_r:delete("firewall", n)
n = z
else
uci_r:foreach("firewall", "zone",
@@ -176,14 +176,14 @@ function del_zone(self, n)
uci_r:foreach("firewall", "redirect",
function(s)
- if s.src == n then
+ if s.src == n or s.dest == n then
uci_r:delete("firewall", s['.name'])
end
end)
uci_r:foreach("firewall", "forwarding",
function(s)
- if s.src == n then
+ if s.src == n or s.dest == n then
uci_r:delete("firewall", s['.name'])
end
end)