From a2fb6c87cb44bfa74f18af8457da7c0ed3e2e2f9 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Thu, 21 Mar 2019 18:20:32 +0100 Subject: [PATCH] change allowed v6 prefix-length to 128 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 --- Toolkit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Toolkit.js b/Toolkit.js index bd237df..cb37972 100644 --- a/Toolkit.js +++ b/Toolkit.js @@ -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' + "
" + gettext('Valid CIDR Range') + ': 8-120', + IP6CIDRAddressText: gettext('Example') + ': 2001:DB8::42/64' + "
" + gettext('Valid CIDR Range') + ': 8-128', IP6CIDRAddressMask: /[A-Fa-f0-9:\/]/, IP6PrefixLength: function(v) {