mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 01:10:10 +00:00
Add safety checks on all calls to ifstats.probes
This commit is contained in:
parent
334466c1f4
commit
1057d3b397
4 changed files with 32 additions and 29 deletions
|
|
@ -883,9 +883,8 @@ if ((page == "overview") or (page == nil)) then
|
|||
for _, v in pairs(ifstats.probes or {}) do
|
||||
for _, v1 in pairs(v or {}) do
|
||||
for _, v2 in pairs(v or {}) do
|
||||
if (v2["packets.total"] ~= nil) then probe_total_packets = probe_total_packets + v2["packets.total"] end
|
||||
if (v2["packets.drops"] ~= nil) then probe_total_packet_drops = probe_total_packet_drops +
|
||||
v2["packets.drops"] end
|
||||
probe_total_packets = probe_total_packets + (v2["packets.total"] or 0)
|
||||
probe_total_packet_drops = probe_total_packet_drops + (v2["packets.drops"] or 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue