]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
change allowed v6 prefix-length to 128
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 21 Mar 2019 17:20:32 +0000 (18:20 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 21 Mar 2019 17:35:37 +0000 (18:35 +0100)
Currently the frontend validation only allows values 8-120 as prefix-lengths for
ipv6-cidr notations.

Following commit 70ea22506939f9687e1146c0f35247cfbe9225b8 in pve-common, this
patch changes that value to 128, which, while seldomly seen in regular setups
is technically correct.

Problem was reported by a user in the forum - they needed to set a length of
125, because their provider supplies only smaller networks. [0]

[0] https://forum.proxmox.com/threads/lxc-ipv6-why-8-120.52638/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Toolkit.js

index bd237df581e1a41aa1e8e85a38ff236bf70c510b..cb37972294fe77092e1416b4858274324970b104 100644 (file)
@@ -30,9 +30,9 @@ Ext.apply(Ext.form.field.VTypes, {
        var result = Proxmox.Utils.IP6_cidr_match.exec(v);
        // limits according to JSON Schema see
        // pve-common/src/PVE/JSONSchema.pm
-       return (result !== null && result[1] >= 8 && result[1] <= 120);
+       return (result !== null && result[1] >= 8 && result[1] <= 128);
     },
-    IP6CIDRAddressText:  gettext('Example') + ': 2001:DB8::42/64' + "<br>" + gettext('Valid CIDR Range') + ': 8-120',
+    IP6CIDRAddressText:  gettext('Example') + ': 2001:DB8::42/64' + "<br>" + gettext('Valid CIDR Range') + ': 8-128',
     IP6CIDRAddressMask:  /[A-Fa-f0-9:\/]/,
 
     IP6PrefixLength:  function(v) {