luci-app-https_dns_proxy: fix datatype of subnet address option
authoralphakk <kkspaces@mail.com>
Thu, 15 Nov 2018 04:06:09 +0000 (12:06 +0800)
committerJo-Philipp Wich <jo@mein.io>
Thu, 15 Nov 2018 06:45:49 +0000 (07:45 +0100)
The datatype ip4prefix only accept numbers from 0 to 32, not subnet/mask
(i.e. 192.168.1.0/24), this affects option "-e".

https://github.com/openwrt/luci/wiki/Datatypes#ip4prefix the description
is wrong, according to src
http://luci.subsignal.org/trac/browser/luci/branches/luci-0.10/libs/web/luasrc/cbi/datatypes.lua#L76

Submitted-by: alphakk <kkspaces@mail.com>
[slightly reword commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-https_dns_proxy/luasrc/model/cbi/https_dns_proxy.lua

index 61511a41301f1374523632bd335de41a22007215..20d486f3785bde473704ba15a9ef840f5023b73b 100644 (file)
@@ -43,7 +43,7 @@ lp.rmempty     = true
 -- group.rmempty = true
 
 sa = s3:option(Value, "subnet_addr", translate("Subnet address"))
-sa.datatype = "ip4prefix"
+sa.datatype = "ip4addr"
 sa.rmempty  = true
 
 ps = s3:option(Value, "proxy_server", translate("Proxy server"))