Fix a typo in IPv6 configuration page
[project/luci.git] / modules / admin-full / luasrc / model / cbi / admin_network / ipv6.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2013 Steven Barth <steven@midlink.org>
5
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
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 ]]--
13
14 local m, s, o
15
16 m = Map("6relayd", translate("IPv6 RA and DHCPv6"),
17         translate("6relayd is a daemon for serving and relaying IPv6 management protocols to "..
18         "configure clients and downstream routers. "..
19         "It provides server services for RA, stateless and stateful DHCPv6, "..
20         "prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed "..
21         "(non-bridged) interfaces in case no delegated prefixes are available."))
22
23 s = m:section(TypedSection, "server", translate("Server Settings"))
24 s.addremove = false
25 s.anonymous = true
26
27
28 o = s:option(DynamicList, "network", translate("Service Interfaces"),
29         translate("Interfaces to provide services on or to relay services to."))
30 o.widget = "checkbox"
31 o.template = "cbi/network_netlist"
32 o.nocreate = true
33 o.nobridges = true
34 o.novirtual = true
35 o.optional = false
36
37 o = s:option(ListValue, "rd", translate("Router Advertisement-Service"))
38 o:value("", translate("disabled"))
39 o:value("server", translate("server mode"))
40 o:value("relay", translate("relay mode"))
41
42 o = s:option(ListValue, "dhcpv6", translate("DHCPv6-Service"))
43 o:value("", translate("disabled"))
44 o:value("server", translate("server mode"))
45 o:value("relay", translate("relay mode"))
46
47 o = s:option(ListValue, "management_level", translate("DHCPv6-Mode"))
48 o:value("", translate("stateless"))
49 o:value("1", translate("stateless + stateful"))
50 o:value("2", translate("stateful-only"))
51 o:depends("dhcpv6", "server")
52
53 o = s:option(ListValue, "ndp", translate("NDP-Proxy"))
54 o:value("", translate("disabled"))
55 o:value("relay", translate("relay mode"))
56
57 o = s:option(Flag, "fallback_relay", translate("Fallback to relay"),
58         translate("Relay services from master to server interfaces when there is no public prefix available."))
59 o.enabled = "rd dhcpv6 ndp"
60 o.disabled = ""
61
62 o = s:option(Value, "master", translate("Master Interface"),
63         translate("Specifies the master interface for services that are relayed."))
64 o.template = "cbi/network_netlist"
65 o.nocreate = true
66 o:depends("rd", "relay")
67 o:depends("dhcpv6", "relay")
68 o:depends("ndp", "relay")
69 o:depends("fallback_relay", "rd dhcpv6 ndp")
70
71 o = s:option(Flag, "always_rewrite_dns", translate("Always announce local DNS"),
72         translate("Announce the local router as DNS server even in relay mode."))
73 o:depends("rd", "relay")
74 o:depends("dhcpv6", "relay")
75 o:depends("fallback_relay", "rd dhcpv6 ndp")
76
77 o = s:option(Value, "rewrite_dns_addr", translate("Override announced DNS-server"),
78         translate("Announce a custom DNS-server instead of the local one."))
79
80 o = s:option(Flag, "always_assume_default", translate("Always announce default router"),
81         translate("Announce as default router even if no public prefix is available."))
82 o:depends("rd", "server")
83
84 o = s:option(Flag, "compat_ula", translate("ULA-preference compatibility"),
85         translate("Work around IPv6 address-selection issues of some devices."))
86
87 m:section(SimpleSection).template = "admin_network/lease_status"
88
89 s = m:section(TypedSection, "lease", translate("Static Leases"),
90         translate("Static leases are used to assign fixed IPv6 Interface-IDs to clients. Interface-IDs are appended to available prefixes to form IPv6-addresses. " ..
91             " (e.g. a prefix of 2001:db80::/64 combined with Interface-ID 123456 will form the address 2001:db80::12:3456)") .. "<br />" ..
92         translate("Use the <em>Add</em> Button to add a new lease entry. The <em>DUID</em> " ..
93             "indentifies the host, the <em>Interface-ID</em> specifies the ID to use in addresses."))
94
95 s.addremove = true
96 s.anonymous = true
97 s.template = "cbi/tblsection"
98
99 s:option(Value, "duid", translate("DUID")).optional = false
100 s:option(Value, "id", translate("Interface-ID")).optional = false
101
102 return m