Prevents server names from being shown with ports

This commit is contained in:
Simone Mainardi 2019-02-12 15:08:57 +01:00
parent 6e3a0e3a2d
commit 3f29fec4cb

View file

@ -1510,7 +1510,8 @@ function flowinfo2hostname(flow_info, host_type)
if(host_type == "srv") then
if(flow_info["host_server_name"] ~= nil and flow_info["host_server_name"] ~= "") then
return(flow_info["host_server_name"])
-- remove possible ports from the name
return(flow_info["host_server_name"]:gsub(":%d+$", ""))
end
if(flow_info["protos.ssl.certificate"] ~= nil and flow_info["protos.ssl.certificate"] ~= "") then
return(flow_info["protos.ssl.certificate"])