mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Store OS in discovery data to use it for offline devices
This commit is contained in:
parent
dd941b21ad
commit
b5a1cc1af7
2 changed files with 17 additions and 9 deletions
|
|
@ -1229,15 +1229,20 @@ function discover.discover2table(interface_name, recache)
|
|||
mdns, snmp[ip], snmpSysDescr[ip],
|
||||
osx_devices[ip], sym)
|
||||
|
||||
if isEmptyString(device_label) then
|
||||
local mac_info = interface.getMacInfo(mac)
|
||||
local mac_info = interface.getMacInfo(mac)
|
||||
|
||||
if isEmptyString(device_label) then
|
||||
entry["device_label_noicon"] = device_label
|
||||
|
||||
if mac_info ~= nil then
|
||||
device_label = discover.devtype2icon(mac_info.devtype)
|
||||
end
|
||||
end
|
||||
|
||||
if mac_info ~= nil then
|
||||
entry["os_type"] = mac_info.operatingSystem
|
||||
end
|
||||
|
||||
interface.setMacDeviceType(mac, discover.devtype2id(device_type), false) -- false means don't overwrite if already set to ~= unknown
|
||||
|
||||
entry["device_type"] = device_type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue