summaryrefslogtreecommitdiffhomepage
path: root/protocols/6x4/luasrc/model/cbi
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-01-22 10:44:16 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-01-22 10:44:16 +0000
commita4f3f52d1c5932633be3b58996f9b719120d0717 (patch)
tree8c24d7f5e56f74943af7b43ad034607a58ae1766 /protocols/6x4/luasrc/model/cbi
parent07c2268d72daae5b7160d3f0ecc1eeeafc86601e (diff)
New IPv6 integration
Diffstat (limited to 'protocols/6x4/luasrc/model/cbi')
-rw-r--r--protocols/6x4/luasrc/model/cbi/admin_network/proto_6in4.lua7
-rw-r--r--protocols/6x4/luasrc/model/cbi/admin_network/proto_6to4.lua64
2 files changed, 8 insertions, 63 deletions
diff --git a/protocols/6x4/luasrc/model/cbi/admin_network/proto_6in4.lua b/protocols/6x4/luasrc/model/cbi/admin_network/proto_6in4.lua
index 5571cb07fd..0b1f31ce78 100644
--- a/protocols/6x4/luasrc/model/cbi/admin_network/proto_6in4.lua
+++ b/protocols/6x4/luasrc/model/cbi/admin_network/proto_6in4.lua
@@ -38,6 +38,13 @@ ip6addr = s:taboption("general", Value, "ip6addr",
ip6addr.datatype = "ip6addr"
+local ip6prefix = s:taboption("general", Value, "ip6prefix",
+ translate("IPv6 routed prefix"),
+ translate("This is the prefix routed to you by the tunnel broker for use by clients"))
+
+ip6prefix.datatype = "ip6addr"
+
+
local update = section:taboption("general", Flag, "_update",
translate("Dynamic tunnel"),
translate("Enable HE.net dynamic endpoint update"))
diff --git a/protocols/6x4/luasrc/model/cbi/admin_network/proto_6to4.lua b/protocols/6x4/luasrc/model/cbi/admin_network/proto_6to4.lua
index 7258cbc918..d9d7b01a94 100644
--- a/protocols/6x4/luasrc/model/cbi/admin_network/proto_6to4.lua
+++ b/protocols/6x4/luasrc/model/cbi/admin_network/proto_6to4.lua
@@ -12,8 +12,7 @@ You may obtain a copy of the License at
local map, section, net = ...
-local ipaddr, adv_interface, adv_subnet
-local adv_valid_lifetime, adv_preferred_lifetime, defaultroute, metric, ttl, mtu
+local ipaddr, defaultroute, metric, ttl, mtu
ipaddr = section:taboption("general", Value, "ipaddr",
@@ -22,67 +21,6 @@ ipaddr = section:taboption("general", Value, "ipaddr",
ipaddr.datatype = "ip4addr"
-
-adv_interface = section:taboption("general", Value, "adv_interface", translate("Advertise IPv6 on network"))
-adv_interface.widget = "checkbox"
-adv_interface.exclude = arg[1]
-adv_interface.default = "lan"
-adv_interface.template = "cbi/network_netlist"
-adv_interface.nocreate = true
-adv_interface.nobridges = true
-adv_interface.novirtual = true
-
-function adv_interface.write(self, section, value)
- if type(value) == "table" then
- Value.write(self, section, table.concat(value, " "))
- else
- Value.write(self, section, value)
- end
-end
-
-function adv_interface.remove(self, section)
- self:write(section, " ")
-end
-
-adv_subnet = section:taboption("general", Value, "adv_subnet",
- translate("Advertised network ID"),
- translate("Allowed range is 1 to 65535"))
-
-adv_subnet.placeholder = "1"
-adv_subnet.datatype = "range(1,65535)"
-
-function adv_subnet.cfgvalue(self, section)
- local v = Value.cfgvalue(self, section)
- return v and tonumber(v, 16)
-end
-
-function adv_subnet .write(self, section, value)
- value = tonumber(value) or 1
-
- if value > 65535 then value = 65535
- elseif value < 1 then value = 1 end
-
- Value.write(self, section, "%X" % value)
-end
-
-
-adv_valid_lifetime = section:taboption("advanced", Value, "adv_valid_lifetime",
- translate("Use valid lifetime"),
- translate("Specifies the advertised valid prefix lifetime in seconds"))
-
-adv_valid_lifetime.placeholder = "300"
-adv_valid_lifetime.datatype = "uinteger"
-
-
-adv_preferred_lifetime = section:taboption("advanced", Value, "adv_preferred_lifetime",
- translate("Use preferred lifetime"),
- translate("Specifies the advertised preferred prefix lifetime in seconds"))
-
-adv_preferred_lifetime.placeholder = "120"
-adv_preferred_lifetime.datatype = "uinteger"
-
-
-
defaultroute = section:taboption("advanced", Flag, "defaultroute",
translate("Use default gateway"),
translate("If unchecked, no default route is configured"))