Improve flow alert message

This commit is contained in:
emanuele-f 2018-02-22 12:55:10 +01:00
parent 25210c3c37
commit 85298201c7
2 changed files with 26 additions and 6 deletions

View file

@ -489,6 +489,18 @@ function l4Label(proto)
return(_handleArray(l4_keys, proto))
end
function l4_proto_to_string(proto_id)
proto_id = tonumber(proto_id)
for _, proto in pairs(l4_keys) do
if proto[3] == proto_id then
return proto[1], proto[2]
end
end
return nil
end
-- ##############################################
-- Note: make sure the maximum id for checkpoint_keys honours CONST_MAX_NUM_CHECKPOINTS
@ -1788,7 +1800,7 @@ function hostinfo2url(host_info, host_type, novlan)
end
if(novlan == nil) then
if((host_info["vlan"] ~= nil) and (host_info["vlan"] ~= 0)) then
if((host_info["vlan"] ~= nil) and (tonumber(host_info["vlan"]) ~= 0)) then
if(version == 0) then
rsp = rsp..'&vlan='..tostring(host_info["vlan"])
elseif(version == 1) then