diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2017-05-21 22:02:46 +0300 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2017-05-21 22:08:38 +0300 |
commit | 5ca386469071d606609beb19a7f09325f3a8ed29 (patch) | |
tree | 4afaad182d8313386b106ec8adce241f0a6f64ff | |
parent | 7deb3abbadd672338dc8376fc8f5cc7092cdb19d (diff) |
luci-base: support ip6ifaceid option for proto_static
Add support for 'ip6ifaceid' option for proto_static in LuCI.
Information about the option:
The option is optional and defaults to '::1'.
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, the ip6ifaceid suffix (like '::1') is used to form
the IPv6 address ('a:b:c:d::1') for the interface.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
-rw-r--r-- | modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua b/modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua index f49fed4a56..3f8b091cf3 100644 --- a/modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua +++ b/modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua @@ -63,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 |