Merge pull request #2681 from dibdot/shadowsocks-fix
luci-app-shadowsocks-libev: fix cidr datatype
This commit is contained in:
commit
3c7b3fa171
1 changed files with 4 additions and 0 deletions
|
@ -132,6 +132,10 @@ function ip6prefix(val)
|
|||
return ( val and val >= 0 and val <= 128 )
|
||||
end
|
||||
|
||||
function cidr(val)
|
||||
return cidr4(val) or cidr6(val)
|
||||
end
|
||||
|
||||
function cidr4(val)
|
||||
local ip, mask = val:match("^([^/]+)/([^/]+)$")
|
||||
|
||||
|
|
Loading…
Reference in a new issue