[FS#1234] LuCI interface configuration does not accept valid values for the IPv6 suffix
LEDE Bugs
lede-bugs at lists.infradead.org
Wed Dec 20 17:09:17 PST 2017
A new Flyspray task has been opened. Details are below.
User who did this - silentcreek (silentcreek)
Attached to Project - LEDE Project
Summary - LuCI interface configuration does not accept valid values for the IPv6 suffix
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - All
Due in Version - Undecided
Due Date - Undecided
Details - LuCI has an option to set the "IPv6 suffix" of an interface to be used to form an address from a prefix, e.g. on the LAN interface. This translates to the UCI option "ip6hostid".
The help texts reads as follows:
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.
However, trying to enter 'eui64' or 'random' and saving throws the error message:
"One or more fields contain invalid values!"
Looking at the source code reveals that LuCI expects the field to be of the datatype ip6hostid which is matched against the regex '^[a-fA-F0-9:]+$' (see [1] and [2]). Obviously eui64 and random won't match here. But they can be set from a shell with UCI and work.
I observed this on LEDE 17.01.4 but the code is still in master, so this should apply to any version.
[1] https://git.lede-project.org/?p=project/luci.git;a=blob;f=modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua;hb=a2a1c357869a06bb216497e4fdd4e66c85e9995b#l66
[2] https://git.lede-project.org/?p=project/luci.git;a=blob;f=modules/luci-base/luasrc/cbi/datatypes.lua;hb=a2a1c357869a06bb216497e4fdd4e66c85e9995b#l171
More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=1234
More information about the lede-bugs
mailing list