summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-08-22 20:52:31 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-08-22 20:52:31 +0000
commitbbd5aa1831fb49aee6843a951b202d9d09082008 (patch)
treeee8676c490893919324aef7a64a739978ce1deb4 /applications/luci-statistics/luasrc
parent015d95e3f4e702ba8040abaeeddbf0057dba562d (diff)
applications/luci-statistics: cope with rules having no target in iptables plugin config
Diffstat (limited to 'applications/luci-statistics/luasrc')
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua
index f353d8b533..1f7341c46e 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua
@@ -20,8 +20,10 @@ chains = { }
targets = { }
for i, rule in ipairs( ip:find() ) do
- chains[rule.chain] = true
- targets[rule.target] = true
+ if rule.chain and rule.target then
+ chains[rule.chain] = true
+ targets[rule.target] = true
+ end
end