mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Implements web UI ACL
This commit is contained in:
parent
3dadc3bb78
commit
b980a1808f
5 changed files with 52 additions and 6 deletions
|
|
@ -2160,6 +2160,14 @@ function getIPv4Pattern()
|
|||
return "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$"
|
||||
end
|
||||
|
||||
function getACLPattern()
|
||||
local ipv4 = "(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])"
|
||||
local netmask = "(\\/([0-9]|[1-2][0-9]|3[0-2]))"
|
||||
local cidr = ipv4..netmask
|
||||
local yesorno_cidr = "[\\+\\-]"..cidr
|
||||
return "^"..yesorno_cidr.."(,"..yesorno_cidr..")*$"
|
||||
end
|
||||
|
||||
function getMacPattern()
|
||||
return "^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F]{2}$"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue