mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Fix host validation errors
This commit is contained in:
parent
251cc57970
commit
4da97c492a
1 changed files with 4 additions and 2 deletions
|
|
@ -413,8 +413,10 @@ end
|
|||
-- #################################################################
|
||||
|
||||
local function validateHost(p)
|
||||
-- TODO stricter checks, allow @vlan
|
||||
if(isIPv4(p) or isIPv6(p) or isMacAddress(p)) then
|
||||
local host = hostkey2hostinfo(p)
|
||||
|
||||
if(host.host ~= nil) and (host.vlan ~= nil)
|
||||
and (isIPv4(host.host) or isIPv6(host.host) or isMacAddress(host.host)) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue