Fixes missing functions

This commit is contained in:
Matteo Biscosi 2024-02-17 09:31:51 +00:00
parent e770c09dea
commit 952fa6e995
6 changed files with 8 additions and 7 deletions

View file

@ -80,7 +80,7 @@ end
function ts_dump.subnet_update_rrds(when, ifstats, verbose)
local subnet_stats = interface.getNetworksStats()
for subnet, sstats in pairs(subnet_stats) do
for subnet, sstats in pairs(subnet_stats or {}) do
if ntop.isPro() and not isEmptyString(ntop.getPref("ntopng.prefs.intranet_traffic_rrd_creation") or "") then
for second_subnet, traffic in pairs(sstats["intranet_traffic"]) do
if traffic.bytes_sent ~= 0 or traffic.bytes_rcvd ~= 0 then