2 LuCI - Lua Configuration Interface
4 Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
13 local map, section, net = ...
15 local ipaddr, defaultroute, metric, ttl, mtu
18 ipaddr = section:taboption("general", Value, "ipaddr",
19 translate("Local IPv4 address"),
20 translate("Leave empty to use the current WAN address"))
22 ipaddr.datatype = "ip4addr"
24 defaultroute = section:taboption("advanced", Flag, "defaultroute",
25 translate("Use default gateway"),
26 translate("If unchecked, no default route is configured"))
28 defaultroute.default = defaultroute.enabled
31 metric = section:taboption("advanced", Value, "metric",
32 translate("Use gateway metric"))
34 metric.placeholder = "0"
35 metric.datatype = "uinteger"
36 metric:depends("defaultroute", defaultroute.enabled)
39 ttl = section:taboption("advanced", Value, "ttl", translate("Use TTL on tunnel interface"))
40 ttl.placeholder = "64"
41 ttl.datatype = "range(1,255)"
44 mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
45 mtu.placeholder = "1280"
46 mtu.datatype = "max(1500)"