luci-base: break circular luci.config <> luci.model.uci dependency
[project/luci.git] / modules / luci-base / luasrc / model / firewall.lua
index a0f334a..feff085 100644 (file)
@@ -1,4 +1,4 @@
--- Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
+-- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org>
 -- Licensed to the public under the Apache License 2.0.
 
 local type, pairs, ipairs, table, luci, math
@@ -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