Fixes nIndexEnabled nil access

This commit is contained in:
Simone Mainardi 2021-10-22 18:15:18 +02:00
parent 448c5e288a
commit a2a3aa7fc6

View file

@ -921,7 +921,7 @@ end
-- NOTE: global nindex support may be enabled but some disable on some interfaces
function interfaceHasNindexSupport()
return(hasNindexSupport() and (interface.nIndexEnabled() or ntop.getPrefs()["is_dump_flows_to_clickhouse_enabled"]))
return(hasNindexSupport() and ((interface.nIndexEnabled and interface.nIndexEnabled()) or ntop.getPrefs()["is_dump_flows_to_clickhouse_enabled"]))
end
--for _key, _value in pairsByKeys(vals, rev) do