summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-ppp/luasrc/model
diff options
context:
space:
mode:
authorDaniel Dickinson <openwrt@daniel.thecshore.com>2015-12-14 22:51:29 -0500
committerDaniel Dickinson <openwrt@daniel.thecshore.com>2015-12-15 20:41:01 -0500
commitc481f3f34325b9c1cf817b16a567a6b10fdd1f2e (patch)
tree5fe6f363c0ff7544a25bdbb21c17873ade06d272 /protocols/luci-proto-ppp/luasrc/model
parentbbcfad7953489ed87336e3a1981c9cb19e390cdb (diff)
validation: Add option ipv4only option to host and hostport datatypes
Some applications only support ipv4 so add ipv4only option to host and hostport datatypes so that for thos applications that when an IP address is specified only and ipv4 ip address gets accepted.
Diffstat (limited to 'protocols/luci-proto-ppp/luasrc/model')
-rw-r--r--protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua2
-rw-r--r--protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua2
-rw-r--r--protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua
index 5e8b3fcaae..506170c2de 100644
--- a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua
+++ b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua
@@ -8,7 +8,7 @@ local ipv6, defaultroute, metric, peerdns, dns, mtu
server = section:taboption("general", Value, "server", translate("L2TP Server"))
-server.datatype = "or(host, hostport)"
+server.datatype = "or(host(1), hostport(1))"
username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))
diff --git a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua
index c93353af90..eca7bdd4d3 100644
--- a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua
+++ b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua
@@ -8,7 +8,7 @@ local sshuser, server, port, ssh_options, identity, ipaddr, peeraddr
sshuser = section:taboption("general", Value, "sshuser", translate("SSH username"))
server = section:taboption("general", Value, "server", translate("SSH server address"))
-server.datatype = "host"
+server.datatype = "host(0)"
port = section:taboption("general", Value, "port", translate("SSH server port"))
port.datatype = "port"
diff --git a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua
index d81db1faee..462d7019f0 100644
--- a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua
+++ b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua
@@ -9,7 +9,7 @@ local defaultroute, metric, peerdns, dns,
server = section:taboption("general", Value, "server", translate("VPN Server"))
-server.datatype = "host"
+server.datatype = "host(0)"
username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))