applications/luci-statistics: cope with rules having no target in iptables plugin...
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / iptables.lua
index f353d8b5335f4b2e83e961c075230814ba9f089c..1f7341c46ecbfd0d5cfcee24d696651f38dbbe61 100644 (file)
@@ -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