Fixes protos ID not assigned in case of 0 ID

This commit is contained in:
Matteo Biscosi 2024-02-12 09:24:35 +00:00
parent 7d6b49fbfb
commit ccce98a264

View file

@ -353,7 +353,7 @@ function protos_utils.generateProtosTxt(rules, defined_protos)
proto_id = ntop.getHashCache(proto_key, proto_name) or ''
end
if isEmptyString(proto_id) then
if isEmptyString(proto_id) or proto_id == 0 then
proto_id = tonumber(ntop.getCache(proto_last_id)) or 0
if proto_id == 0 then
proto_id = first_proto_id