2 LuCI - Lua Configuration Interface
4 Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
5 Copyright 2013 Steven Barth <steven@midlink.org>
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
14 local map, section, net = ...
16 local peeraddr, ip6addr
17 local tunlink, defaultroute, metric, ttl, mtu
22 peeraddr = section:taboption("general", Value, "peeraddr",
23 translate("DS-Lite AFTR address"))
25 peeraddr.rmempty = false
26 peeraddr.datatype = "ip6addr"
28 ip6addr = section:taboption("general", Value, "ip6addr",
29 translate("Local IPv6 address"),
30 translate("Leave empty to use the current WAN address"))
32 ip6addr.datatype = "ip6addr"
35 tunlink = section:taboption("advanced", DynamicList, "tunlink", translate("Tunnel Link"))
36 tunlink.template = "cbi/network_netlist"
37 tunlink.nocreate = true
40 defaultroute = section:taboption("advanced", Flag, "defaultroute",
41 translate("Default gateway"),
42 translate("If unchecked, no default route is configured"))
44 defaultroute.default = defaultroute.enabled
47 metric = section:taboption("advanced", Value, "metric",
48 translate("Use gateway metric"))
50 metric.placeholder = "0"
51 metric.datatype = "uinteger"
52 metric:depends("defaultroute", defaultroute.enabled)
55 ttl = section:taboption("advanced", Value, "ttl", translate("Use TTL on tunnel interface"))
56 ttl.placeholder = "64"
57 ttl.datatype = "range(1,255)"
60 mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
61 mtu.placeholder = "1280"
62 mtu.datatype = "max(9200)"