Added check

This commit is contained in:
Luca Deri 2025-07-01 11:22:06 +02:00
parent 55ec9981fd
commit 5b77a31eb4

View file

@ -67,7 +67,7 @@ function formatASN(v, peer_as, ip, is_client_as)
asn = "<A HREF=\"" .. ntop.getHttpPrefix() .. "/lua/hosts_stats.lua?asn=" .. v .. "\">" .. label .. "</A>"
if((peer_as ~= 0) and (v ~= peer_as)) then
if((peer_as ~= nil) and (peer_as ~= 0) and (v ~= peer_as)) then
local peer_asn = "<A HREF=\"" .. ntop.getHttpPrefix() .. "/lua/hosts_stats.lua?asn=" .. peer_as .. "\">" .. peer_as .. "</A>"
if(is_client_as) then