luci-proto-vxlan: correctness fixes
authorPaul Donald <redacted>
Tue, 26 May 2026 09:49:54 +0000 (12:49 +0300)
committerPaul Donald <redacted>
Wed, 27 May 2026 12:49:47 +0000 (15:49 +0300)
Signed-off-by: Paul Donald <redacted>
protocols/luci-proto-vxlan/htdocs/luci-static/resources/protocol/vxlan.js
protocols/luci-proto-vxlan/htdocs/luci-static/resources/protocol/vxlan6.js

index 16e5498ce875338f3fe5398508d1ecf314122867..64aa478d5d1e8b350d38ea554582efd0d4f19e0f 100644 (file)
@@ -127,7 +127,7 @@ return network.registerProtocol('vxlan', {
                o = s.taboption('general', form.Value, 'vid', _('VXLAN network identifier'),
                        _('VNI') + ': ' + _('ID used to identify the VXLAN uniquely'));
                o.optional = true;
-               o.datatype = 'range(1, 16777216)';
+               o.datatype = 'range(1, 16777215)';
 
                o = s.taboption('general', widgets.NetworkSelect, 'tunlink', _('Bind interface'), _('Bind the tunnel to this interface (optional).'));
                o.exclude = s.section;
@@ -198,7 +198,7 @@ return network.registerProtocol('vxlan', {
                o.datatype = 'string';
                o.optional = true;
 
-               o = ss.option(form.Value, 'lladr', _('Layer 2 Address'),
+               o = ss.option(form.Value, 'lladdr', _('Layer 2 Address'),
                        _('L2 (MAC) address of peer. Uses source-address learning when %s is specified')
                        .format('<code>00:00:00:00:00:00</code>'));
                o.editable = true;
@@ -245,12 +245,12 @@ return network.registerProtocol('vxlan', {
 
                o = ss.option(form.Value, 'vni', _('VNI'), _('the VXLAN Network Identifier (or VXLAN Segment ID) to use to connect to the remote VXLAN tunnel endpoint'));
                o.editable = true;
-               o.datatype = 'range(1, 16777216)';
+               o.datatype = 'range(1, 16777215)';
                o.optional = true;
 
                o = ss.option(form.Value, 'src_vni', _('Source VNI'), _('the source VNI Network Identifier (or VXLAN Segment ID) this entry belongs to. Used only when the VXLAN device is in external or collect metadata mode '));
                o.editable = true;
-               o.datatype = 'range(1, 16777216)';
+               o.datatype = 'range(1, 16777215)';
                o.optional = true;
 
        }
index b83381a6c62a98415ea39b80e9c28f30934903ae..e93a815af5e401cce8a95e04e1d3523f49f2d0a7 100644 (file)
@@ -94,8 +94,8 @@ return network.registerProtocol('vxlan6', {
                o.datatype = 'min(1)';
 
                o = s.taboption('general', form.Flag, 'learning', _('Learning'),
-                       _('Automatic mac learning using multicast; inserts unknown source link layer addresses and IP addresses into the VXLAN device %s'
-                               .format('<abbr title="%s">%s</abbr>'.format(_('Forwarding DataBase'), _('FDB')))));
+                       _('Automatic mac learning using multicast; inserts unknown source link layer addresses and IP addresses into the VXLAN device %s')
+                               .format('<abbr title="%s">%s</abbr>'.format(_('Forwarding DataBase'), _('FDB'))));
                o.optional = true;
                o.default = '1';
                o.rmempty = false;
@@ -127,7 +127,7 @@ return network.registerProtocol('vxlan6', {
                o = s.taboption('general', form.Value, 'vid', _('VXLAN network identifier'),
                        _('VNI') + ': ' + _('ID used to identify the VXLAN uniquely'));
                o.optional = true;
-               o.datatype = 'range(1, 16777216)';
+               o.datatype = 'range(1, 16777215)';
 
                o = s.taboption('general', widgets.NetworkSelect, 'tunlink', _('Bind interface'), _('Bind the tunnel to this interface (optional).'));
                o.exclude = s.section;
@@ -198,7 +198,7 @@ return network.registerProtocol('vxlan6', {
                o.datatype = 'string';
                o.optional = true;
 
-               o = ss.option(form.Value, 'lladr', _('Layer 2 Address'),
+               o = ss.option(form.Value, 'lladdr', _('Layer 2 Address'),
                        _('L2 (MAC) address of peer. Uses source-address learning when %s is specified')
                        .format('<code>00:00:00:00:00:00</code>'));
                o.editable = true;
@@ -238,19 +238,19 @@ return network.registerProtocol('vxlan6', {
                        let isMulticastIP = ipv4MulticastRegex.test(dst) || ipv6MulticastRegex.test(dst);
 
                        if (!value && isMulticastIP) {
-                               return _('Via shall be specified when %s is a multicast address'.format(_('Peer IP')));
+                               return _('Via shall be specified when %s is a multicast address').format(_('Peer IP'));
                        }
                        return true;
                };
 
                o = ss.option(form.Value, 'vni', _('VNI'), _('the VXLAN Network Identifier (or VXLAN Segment ID) to use to connect to the remote VXLAN tunnel endpoint'));
                o.editable = true;
-               o.datatype = 'range(1, 16777216)';
+               o.datatype = 'range(1, 16777215)';
                o.optional = true;
 
                o = ss.option(form.Value, 'src_vni', _('Source VNI'), _('the source VNI Network Identifier (or VXLAN Segment ID) this entry belongs to. Used only when the VXLAN device is in external or collect metadata mode '));
                o.editable = true;
-               o.datatype = 'range(1, 16777216)';
+               o.datatype = 'range(1, 16777215)';
                o.optional = true;
 
        }
git clone https://git.99rst.org/PROJECT