mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fix validation of list of networks with vlan (fix #3068)
This commit is contained in:
parent
3cfee777c5
commit
b84ca05217
3 changed files with 52 additions and 14 deletions
|
|
@ -1204,6 +1204,16 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function splitNetworkWithVLANPrefix(net_mask_vlan)
|
||||
local vlan = tonumber(net_mask_vlan:match("@(.+)"))
|
||||
local net_mask = net_mask_vlan:gsub("@.+","")
|
||||
local prefix = tonumber(net_mask:match("/(.+)"))
|
||||
local address = net_mask:gsub("/.+","")
|
||||
return address, prefix, vlan
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function splitProtocol(proto_string)
|
||||
local parts = string.split(proto_string, "%.")
|
||||
local app_proto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue