diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/network.lua | 7 | ||||
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/ipv6.lua | 66 |
2 files changed, 73 insertions, 0 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/network.lua b/modules/admin-full/luasrc/controller/admin/network.lua index f401ecd18..54afa1b38 100644 --- a/modules/admin-full/luasrc/controller/admin/network.lua +++ b/modules/admin-full/luasrc/controller/admin/network.lua @@ -138,6 +138,13 @@ function index() page.order = 40 end + if nixio.fs.access("/etc/config/6relayd") then + page = node("admin", "network", "ipv6") + page.target = cbi("admin_network/ipv6") + page.title = _("IPv6 RA and DHCPv6") + page.order = 45 + end + page = node("admin", "network", "routes") page.target = cbi("admin_network/routes") page.title = _("Static Routes") diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ipv6.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ipv6.lua new file mode 100644 index 000000000..951b607c4 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_network/ipv6.lua @@ -0,0 +1,66 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2013 Steven Barth <steven@midlink.org> + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- + +local m = Map("6relayd", translate("IPv6 RA and DHCPv6"), + translate("6relayd is a lightweight router advertisement daemon and provides " .. + "stateless DHCPv6 service where size matters. It can also be used as a relay " .. + "for the aforementioned services.")) + +local s = m:section(TypedSection, "server", translate("Server Settings")) +s.addremove = true + + + +local o = s:option(DynamicList, "network", translate("Service Interfaces"), + translate("Interfaces to provide services on or to relay services to.")) +o.widget = "checkbox" +o.template = "cbi/network_netlist" +o.nocreate = true +o.nobridges = true +o.novirtual = true +o.optional = false + +o = s:option(ListValue, "rd", translate("Router Advertisement-Service")) +o:value("", translate("disabled")) +o:value("server", translate("server mode")) +o:value("relay", translate("relay mode")) + +o = s:option(ListValue, "dhcpv6", translate("DHCPv6-Service")) +o:value("", translate("disabled")) +o:value("server", translate("server mode")) +o:value("relay", translate("relay mode")) + +o = s:option(ListValue, "ndp", translate("NDP-Proxy")) +o:value("", translate("disabled")) +o:value("relay", translate("relay mode")) + +o = s:option(MultiValue, "fallback_relay", translate("Fallback to relay"), + translate("Relay services from master to server interfaces when there is no public prefix available.")) +o:value("rd", translate("Router Advertisement")) +o:value("dhcpv6", translate("DHCPV6")) +o:value("ndp", translate("NDP-Proxy")) + +o = s:option(Value, "master", translate("Master Interface"), + translate("Specifies the master interface for services that are relayed.")) +o.template = "cbi/network_netlist" +o.nocreate = true + +o = s:option(Flag, "always_rewrite_dns", translate("Always announce local DNS"), + translate("Announce the local router as DNS server even in relay mode.")) + +o = s:option(Flag, "always_assume_default", translate("Always announce default router"), + translate("Announce as default router even if no public prefix is available.")) +o:depends("rd", "server") + +return m |