applications/luci-statistics: cope with rules having no target in iptables plugin config
This commit is contained in:
parent
015d95e3f4
commit
bbd5aa1831
1 changed files with 4 additions and 2 deletions
|
@ -20,9 +20,11 @@ chains = { }
|
||||||
targets = { }
|
targets = { }
|
||||||
|
|
||||||
for i, rule in ipairs( ip:find() ) do
|
for i, rule in ipairs( ip:find() ) do
|
||||||
|
if rule.chain and rule.target then
|
||||||
chains[rule.chain] = true
|
chains[rule.chain] = true
|
||||||
targets[rule.target] = true
|
targets[rule.target] = true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
m = Map("luci_statistics",
|
m = Map("luci_statistics",
|
||||||
|
|
Loading…
Reference in a new issue