luci-proto-openconnect: Added option for default gateway
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 29 Mar 2015 06:31:26 +0000 (08:31 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 29 Mar 2015 06:31:32 +0000 (08:31 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
protocols/luci-proto-openconnect/luasrc/model/cbi/admin_network/proto_openconnect.lua

index 7b213127f8db9d3f2995736b8ea57604e9bb3e88..4ed34ae3bcbb79368fc00ff848b3fd15276ca265 100644 (file)
@@ -22,6 +22,20 @@ port.datatype    = "port"
 ifname = section:taboption("general", Value, "interface", translate("Output Interface"))
 ifname.template = "cbi/network_netlist"
 
+defaultroute = section:taboption("advanced", Flag, "defaultroute",
+       translate("Use default gateway"),
+       translate("If unchecked, no default route is configured"))
+
+defaultroute.default = defaultroute.enabled
+
+
+metric = section:taboption("advanced", Value, "metric",
+       translate("Use gateway metric"))
+
+metric.placeholder = "0"
+metric.datatype    = "uinteger"
+metric:depends("defaultroute", defaultroute.enabled)
+
 section:taboption("general", Value, "serverhash", translate("VPN Server's certificate SHA1 hash"))
 
 section:taboption("general", Value, "authgroup", translate("AuthGroup"))