luci-mod-network: allow interface names to max of 15 chars
authorPaul Donald <redacted>
Thu, 5 Mar 2026 17:50:00 +0000 (18:50 +0100)
committerPaul Donald <redacted>
Thu, 5 Mar 2026 17:50:31 +0000 (18:50 +0100)
The Kernel receives the name suffix, so evaluate length on
the user provided name and disconnect the formatted name
code length check.

Closes #8390

Signed-off-by: Paul Donald <redacted>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 62dda23a10fff54f3ffab9a4a88661c28c9a41a2..9fc453c38a1b96c0cf3e295d35d6ad43636b3c88 100644 (file)
@@ -1373,10 +1373,11 @@ return view.extend({
                                if (uci.get('network', value) != null)
                                        return _('The interface name is already used');
 
+                               /* // The kernel takes max 15 character names. We can skip this.
                                const pr = network.getProtocol(proto.formvalue(section_id), value);
                                const ifname = pr.isVirtual() ? '%s-%s'.format(pr.getProtocol(), value) : 'br-%s'.format(value);
-
-                               if (ifname.length > 15)
+                               */
+                               if (value.length > 15)
                                        return _('The interface name is too long');
 
                                return true;
git clone https://git.99rst.org/PROJECT