From bbd5aa1831fb49aee6843a951b202d9d09082008 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 22 Aug 2011 20:52:31 +0000 Subject: [PATCH] applications/luci-statistics: cope with rules having no target in iptables plugin config --- .../luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua | 6 ++++-- 1 file 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 f353d8b53..1f7341c46 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 -- 2.11.0