mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
fixed local MAC address conversion for issue #126
This commit is contained in:
parent
a5216a6166
commit
d7ab1d3313
4 changed files with 20 additions and 12 deletions
|
|
@ -63,6 +63,11 @@ interface.select(ifname)
|
|||
|
||||
if((group_col == "mac") or (group_col == "antenna_mac")) then
|
||||
hosts_stats = interface.getLocalHostsInfo()
|
||||
--PRINT
|
||||
-- for n in pairs(hosts_stats) do
|
||||
-- io.write("= "..n..'\n')
|
||||
-- end
|
||||
|
||||
else
|
||||
hosts_stats = interface.getHostsInfo()
|
||||
end
|
||||
|
|
@ -116,6 +121,10 @@ for key,value in pairs(hosts_stats) do
|
|||
|
||||
elseif (group_col == "mac") then
|
||||
stats_by_group_col[id]["name"] = value["mac"]
|
||||
|
||||
--PRINT
|
||||
-- io.write("MAC = "..value["mac"]..'\n')
|
||||
|
||||
if (stats_by_group_col[id]["name"] == nil) then
|
||||
stats_by_group_col[id]["name"] = "Unknown MAC"
|
||||
end
|
||||
|
|
@ -173,6 +182,8 @@ function print_single_group(value)
|
|||
print("hosts_stats.lua?antenna_mac="..value["id"].."'>")
|
||||
elseif (group_col == "mac") then
|
||||
print("hosts_stats.lua?mac="..value["id"].."'>")
|
||||
--PRINT
|
||||
-- io.write("ID = "..value["id"]..'\n')
|
||||
else
|
||||
print("hosts_stats.lua'>")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue