Add support for filtering on MAC address

This commit is contained in:
Alfredo Cardigliano 2022-03-07 15:19:19 +01:00
parent 845abb081b
commit f6be6f685e
7 changed files with 45 additions and 5 deletions

View file

@ -215,10 +215,13 @@ local hosts = {}
local res = interface.findHost(query)
for k, v in pairs(res) do
tprint(k .. " - " ..v)
local links = {}
local historical_flows_url
if k == v then -- IP
historical_flows_url = build_historical_flows_url('ip', k)
if isMacAddress(v) then -- MAC
historical_flows_url = build_historical_flows_url('mac', v)
elseif k == v or isIPv6(v) then -- IP
historical_flows_url = build_historical_flows_url('ip', v)
else -- Name
historical_flows_url = build_historical_flows_url('name', v)
end