mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fix protocol categories association lost after reboot
After the recent changes, there is only one global nDPI struct which is share across all the interfaces. However, the struct can be swapped during normal operating, so it's necessary to reload the associations every time a new nDPI struct is allocated. Fixes #3139
This commit is contained in:
parent
d69367f7be
commit
139a16ffe3
12 changed files with 82 additions and 67 deletions
|
|
@ -104,7 +104,7 @@ local function matchesCategoryFilter(item_id)
|
|||
return true
|
||||
end
|
||||
|
||||
local cat = interface.getnDPIProtoCategory(tonumber(item_id))
|
||||
local cat = ntop.getnDPIProtoCategory(tonumber(item_id))
|
||||
return category == cat.name
|
||||
end
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ for item_name, item_id in pairs(items) do
|
|||
goto continue
|
||||
end
|
||||
|
||||
local cat = interface.getnDPIProtoCategory(tonumber(item_id))
|
||||
local cat = ntop.getnDPIProtoCategory(tonumber(item_id))
|
||||
|
||||
items[item_name] = { name = item_name, id = item_id, conf = device_policies[tonumber(item_id)], catName = cat.name }
|
||||
num_items = num_items + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue