Improves HTTP(S) server names handling

This commit is contained in:
Simone Mainardi 2016-09-28 17:38:03 +02:00
parent 96e44265e7
commit 15d240e3cc
2 changed files with 12 additions and 4 deletions

View file

@ -1102,8 +1102,12 @@ function flowinfo2hostname(flow_info, host_type, vlan)
local orig_name
if(host_type == "srv") then
if(flow_info["host_server_name"] ~= nil) then return(flow_info["host_server_name"]) end
if(flow_info["protos.ssl.certificate"] ~= nil) then return(flow_info["protos.ssl.certificate"]) end
if(flow_info["host_server_name"] ~= nil and flow_info["host_server_name"] ~= "") then
return(flow_info["host_server_name"])
end
if(flow_info["protos.ssl.certificate"] ~= nil and flow_info["protos.ssl.certificate"] ~= "") then
return(flow_info["protos.ssl.certificate"])
end
end
name = flow_info[host_type..".host"]