Added check for entries with no VLAN

This commit is contained in:
Luca Deri 2020-10-15 22:09:09 +02:00
parent 374b97c516
commit 827f3ad3a9

View file

@ -3928,7 +3928,7 @@ function buildHostHREF(ip_address, vlan_id, page)
if((name == nil) or (name == "")) then name = ip_address end
res = '<A HREF="'..ntop.getHttpPrefix()..'/lua/host_details.lua?host='..ip_address
if(vlan_id ~= 0) then res = res .. "@"..vlan_id end
if(vlan_id and (vlan_id ~= 0)) then res = res .. "@"..vlan_id end
res = res ..'&page='..page..'">'..name..'</A>'
return(res)