Handle mac addresses which are already formatted

This commit is contained in:
Alfredo Cardigliano 2024-10-30 12:33:39 +01:00
parent 6adb699c3a
commit 046027f859

View file

@ -349,6 +349,7 @@ end
local function dt_format_mac(mac)
if mac == nil then return "" end
if type(mac) == "string" and isMacAddress(mac) then return mac end
mac = tonumber(mac)
if not mac or mac == 0 then return "" end
return ntop.decodeMac64(mac)