Fixes vlan not correctly added (#6342)

This commit is contained in:
MatteoBiscosi 2022-02-23 15:18:33 +01:00
parent 5b0eddea7a
commit 588e5ae8dd
2 changed files with 12 additions and 6 deletions

View file

@ -3312,8 +3312,8 @@ end
-- ##########################################
function historicalProtoHostHref(ifId, host, l4_proto, ndpi_proto_id, info)
if ntop.isPro() then
function historicalProtoHostHref(ifId, host, l4_proto, ndpi_proto_id, info, vlan)
if ntop.isEnterpriseM() then
local now = os.time()
local ago1h = now - 3600
@ -3335,6 +3335,9 @@ function historicalProtoHostHref(ifId, host, l4_proto, ndpi_proto_id, info)
if ndpi_proto_id then
params["l7proto"] = ndpi_proto_id..";eq"
end
if vlan and vlan ~= 0 then
params["vlan_id"] = vlan..";eq"
end
local url_params = table.tconcat(params, "=", "&")