IPv6 updates
[project/luci.git] / protocols / luci-proto-ipv6 / luasrc / model / cbi / admin_network / proto_464xlat.lua
1 -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
2 -- Copyright 2013 Steven Barth <steven@midlink.org>
3 -- Licensed to the public under the Apache License 2.0.
4
5 local map, section, net = ...
6 local tunlink, defaultroute, metric, mtu
7
8 section:taboption("general", Value, "ip6prefix",
9         translate("NAT64 Prefix"), translate("Leave empty to autodetect"))
10
11 tunlink = section:taboption("advanced", DynamicList, "tunlink", translate("Tunnel Link"))
12 tunlink.template = "cbi/network_netlist"
13 tunlink.nocreate = true
14
15
16 defaultroute = section:taboption("advanced", Flag, "defaultroute",
17         translate("Default gateway"),
18         translate("If unchecked, no default route is configured"))
19
20 defaultroute.default = defaultroute.enabled
21
22
23 metric = section:taboption("advanced", Value, "metric",
24         translate("Use gateway metric"))
25
26 metric.placeholder = "0"
27 metric.datatype    = "uinteger"
28 metric:depends("defaultroute", defaultroute.enabled)
29
30
31 mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
32 mtu.placeholder = "1280"
33 mtu.datatype    = "max(9200)"