summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/model
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-09-07 15:29:45 +0200
committerJo-Philipp Wich <jo@mein.io>2017-10-17 17:35:01 +0200
commit98aacba3ac4b307e8bd2000175cfd66a3b8162c3 (patch)
treed27b1b6560553d865a0cf6cff9d50f86592e1e30 /modules/luci-base/luasrc/model
parent462779c38419039880aca5583fa30b274aba6ba6 (diff)
luci-base: gracefully handle broken firewall forwarding sections
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/model')
-rw-r--r--modules/luci-base/luasrc/model/firewall.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/luci-base/luasrc/model/firewall.lua b/modules/luci-base/luasrc/model/firewall.lua
index 5573a9b86..feff0855c 100644
--- a/modules/luci-base/luasrc/model/firewall.lua
+++ b/modules/luci-base/luasrc/model/firewall.lua
@@ -498,11 +498,13 @@ function forwarding.dest(self)
end
function forwarding.src_zone(self)
- return zone(self:src())
+ local z = zone(self:src())
+ return z.sid and z
end
function forwarding.dest_zone(self)
- return zone(self:dest())
+ local z = zone(self:dest())
+ return z.sid and z
end