diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-04-23 17:29:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-23 17:29:52 +0200 |
commit | 3c7b3fa171fa84b153479af36e99b6ebe35920c2 (patch) | |
tree | 4cb4194c0b2e6828b5943cb6af368da247cdeb6f | |
parent | f223a76fdc675889017f9ff70a6b2c2e404882f6 (diff) | |
parent | 8fffadecc5d8080a7381fd6d00e5b4e91a6fc6fd (diff) |
Merge pull request #2681 from dibdot/shadowsocks-fix
luci-app-shadowsocks-libev: fix cidr datatype
-rw-r--r-- | modules/luci-base/luasrc/cbi/datatypes.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/cbi/datatypes.lua b/modules/luci-base/luasrc/cbi/datatypes.lua index b4206e98d..33d018d2d 100644 --- a/modules/luci-base/luasrc/cbi/datatypes.lua +++ b/modules/luci-base/luasrc/cbi/datatypes.lua @@ -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("^([^/]+)/([^/]+)$") |