Merge pull request #1188 from dibdot/master
[project/luci.git] / modules / luci-base / luasrc / model / cbi / admin_network / proto_static.lua
index 338c0b7..3f8b091 100644 (file)
@@ -1,14 +1,5 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2011 Jo-Philipp Wich <xm@subsignal.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
-]]--
+-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
+-- Licensed to the public under the Apache License 2.0.
 
 local map, section, net = ...
 local ifc = net:get_interface()
@@ -72,6 +63,15 @@ if luci.model.network:has_ipv6() then
        ip6prefix.datatype = "ip6addr"
        ip6prefix:depends("ip6assign", "")
 
+       local ip6ifaceid = s:taboption("general", Value, "ip6ifaceid", translate("IPv6 suffix"),
+               translate("Optional. Allowed values: 'eui64', 'random', fixed value like '::1' " ..
+                       "or '::1:2'. When IPv6 prefix (like 'a:b:c:d::') is received from a " ..
+                       "delegating server, use the suffix (like '::1') to form the IPv6 address " ..
+                       "('a:b:c:d::1') for the interface."))
+       ip6ifaceid.datatype = "ip6hostid"
+       ip6ifaceid.placeholder = "::1"
+       ip6ifaceid.rmempty = true
+
 end