luci-proto-ipv6: fix typo in aiccu mtu range
[project/luci.git] / protocols / luci-proto-ipv6 / luasrc / model / cbi / admin_network / proto_aiccu.lua
1 -- Copyright 2015 Paul Oranje <por@xs4all.nl>
2 -- Licensed to the public under the Apache License 2.0.
3
4 local map, section, net = ...
5
6 -- config read by /lib/netifd/proto/aiccu.sh
7 local username, password, protocol, server, tunnelid, ip6prefix, requiretls, nat, heartbeat,
8         verbose, ntpsynctimeout, ip6addr, sourcerouting, defaultroute
9
10 -- generic parameters
11 local metric, ttl, mtu
12
13
14 username = section:taboption("general", Value, "username",
15         translate("Server username"),
16         translate("SIXXS-handle[/Tunnel-ID]"))
17 username.datatype = "string"
18
19 password = section:taboption("general", Value, "password",
20         translate("Server password"),
21         translate("Server password, enter the specific password of the tunnel when the username contains the tunnel ID"))
22 password.datatype = "string"
23 password.password = true
24
25
26 --[[ SIXXS supports only TIC as tunnel broker protocol, no use setting it.
27 protocol = section:taboption("general", ListValue, "protocol",
28         translate("Tunnel broker protocol"),
29         translate("SIXXS supports TIC only, for static tunnels using IP protocol 41 (RFC4213) use 6in4 instead"))
30
31 protocol:value("tic", "TIC")
32 protocol:value("tsp", "TSP")
33 protocol:value("l2tp", "L2TP")
34 protocol.default = "tic"
35 protocol.optional = true
36 --]]
37
38
39 server = section:taboption("general", Value, "server",
40         translate("Tunnel setup server"),
41         translate("Optional, specify to override default server (tic.sixxs.net)"))
42 server.datatype = "host"
43 server.optional = true
44
45
46 tunnelid = section:taboption("general", Value, "tunnelid",
47         translate("Tunnel ID"),
48         translate("Optional, use when the SIXXS account has more than one tunnel"))
49 tunnelid.datatype = "string"
50 tunnelid.optional = true
51
52
53 local ip6prefix = section:taboption("general", Value, "ip6prefix",
54         translate("IPv6 prefix"),
55         translate("Routed IPv6 prefix for downstream interfaces"))
56 ip6prefix.datatype = "ip6prefix"
57 ip6prefix.optional = true
58
59
60 requiretls = section:taboption("general", Flag, "requiretls",
61         translate("Require TLS"),
62         translate("Connection to server fails when TLS cannot be used"))
63 requiretls.optional = true
64 requiretls.default = requiretls.enabled
65
66
67 heartbeat = section:taboption("general", Flag, "heartbeat",
68         translate("Make heartbeats"),
69         translate("Use when IPv4 address of local WAN may change dynamically, does not apply to static tunnels"))
70 heartbeat.optional = true
71 heartbeat.default = heartbeat.enabled
72
73
74 nat = section:taboption("general", Flag, "nat",
75         translate("Behind NAT"),
76         translate("The tunnel end-point is behind NAT, defaults to disabled and only applies to AYIYA"))
77 nat.optional = true
78 nat.default = disabled
79
80
81 verbose = section:taboption("advanced", Flag, "verbose",
82         translate("Verbose"),
83         translate("Verbose logging by aiccu daemon"))
84 verbose.optional = true
85 verbose.default = disabled
86
87
88 ntpsynctimeout = section:taboption("advanced", Value, "ntpsynctimeout",
89         translate("NTP sync time-out"),
90         translate("Wait for NTP sync that many seconds, seting to 0 disables waiting (optional)"))
91 ntpsynctimeout.datatype = "uinteger"
92 ntpsynctimeout.placeholder = "90"
93 ntpsynctimeout.optional = true
94
95
96 ip6addr = section:taboption("advanced", Value, "ip6addr",
97         translate("Local IPv6 address"),
98         translate("IPv6 address delegated to the local tunnel endpoint (optional)"))
99 ip6addr.datatype = "ip6addr"
100 ip6addr.optional = true
101
102
103 defaultroute = section:taboption("advanced", Flag, "defaultroute",
104         translate("Default route"),
105         translate("Whether to create an IPv6 default route over the tunnel"))
106 defaultroute.default = defaultroute.enabled
107 defaultroute.optional = true
108
109
110 sourcerouting = section:taboption("advanced", Flag, "sourcerouting",
111         translate("Source routing"),
112         translate("Whether to route only packets from delegated prefixes"))
113 sourcerouting.default = sourcerouting.enabled
114 sourcerouting.optional = true
115
116
117 metric = section:taboption("advanced", Value, "metric",
118         translate("Use gateway metric"))
119 metric.datatype = "uinteger"
120 metric.placeholder = "0"
121 metric:depends("defaultroute", defaultroute.enabled)
122
123
124 ttl = section:taboption("advanced", Value, "ttl",
125         translate("Use TTL on tunnel interface"))
126 ttl.datatype = "range(1,255)"
127 ttl.placeholder = "64"
128
129
130 mtu = section:taboption("advanced", Value, "mtu",
131         translate("Use MTU on tunnel interface"))
132         translate("minimum 1280, maximum 1480"))
133 mtu.datatype = "range(1280,1480)"
134 mtu.placeholder = "1280"
135