Fix validation of list of networks with vlan (fix #3068)

This commit is contained in:
Alfredo Cardigliano 2019-11-22 19:11:06 +01:00
parent 3cfee777c5
commit b84ca05217
3 changed files with 52 additions and 14 deletions

View file

@ -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