mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
[VS] Fix in ipv4_netscan the host not detected case. (#8086)
This commit is contained in:
parent
8db0945eba
commit
98bea0a032
4 changed files with 28 additions and 18 deletions
|
|
@ -2762,12 +2762,22 @@ function vs_utils.get_network_pref_value(network_ip, scan_type)
|
|||
end
|
||||
|
||||
-- **********************************************************
|
||||
-- Function to find if an ip is configured with the scan_type
|
||||
-- Function to find if an ip is configured with a specific scan_type
|
||||
|
||||
function vs_utils.isVSConfiguredHost(ip,scan_type)
|
||||
function vs_utils.isVSConfiguredHostScanType(ip,scan_type)
|
||||
local host_configured_key = vs_utils.get_host_hash_key(ip, scan_type)
|
||||
local pref_value = ntop.getHashCache(prefs_host_values_key,host_configured_key)
|
||||
return not isEmptyString(pref_value)
|
||||
end
|
||||
|
||||
|
||||
-- **********************************************************
|
||||
-- Function to find if an ip is configured
|
||||
|
||||
function vs_utils.isVSConfiguredHost(ip)
|
||||
local hosts_scanned = ntop.getHashKeysCache(prefs_host_values_key) or {}
|
||||
for key, _ in pairs(hosts_scanned) do
|
||||
if key:find(ip) and key:find(scan_type) then
|
||||
if key:find(ip) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue