mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixes possibly clashing interface ids after interface data deletion
Fixes #3963
This commit is contained in:
parent
21e274e933
commit
d5166394a5
1 changed files with 6 additions and 1 deletions
|
|
@ -264,6 +264,9 @@ local function delete_interfaces_redis_keys(interfaces_list, preserve_prefs)
|
|||
-- examples:
|
||||
-- ntopng.prefs.enp2s0f0_not_idle
|
||||
string.format("%s.%s_*", pref_prefix, if_name),
|
||||
-- examples:
|
||||
-- ntopng.dhcp.0.cache
|
||||
string.format("ntopng.dhcp.%d.*", if_id),
|
||||
}
|
||||
|
||||
delete_keys_patterns(keys_patterns, preserve_prefs)
|
||||
|
|
@ -325,7 +328,9 @@ end
|
|||
local function delete_interfaces_ids(interfaces_list)
|
||||
local status = "OK"
|
||||
|
||||
for if_id, if_name in pairs(interfaces_list) do
|
||||
for if_id, _ in pairs(interfaces_list) do
|
||||
local if_name = ntop.getHashCache(ALL_INTERFACES_HASH_KEYS, if_id)
|
||||
|
||||
-- delete the interface from the all interfaces hash
|
||||
-- this will cause the id to be re-used
|
||||
if not dry_run then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue