[pve-devel] [PATCH pve-common] allow /32 ipv4 cidrs

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Oct 16 09:28:07 CEST 2015


---
 src/PVE/JSONSchema.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
index 817ff4c..de2a0bd 100644
--- a/src/PVE/JSONSchema.pm
+++ b/src/PVE/JSONSchema.pm
@@ -248,7 +248,7 @@ register_format('CIDRv4', \&pve_verify_cidrv4);
 sub pve_verify_cidrv4 {
     my ($cidr, $noerr) = @_;
 
-    if ($cidr =~ m!^(?:$IPV4RE)(?:/(\d+))$! && ($1 > 7) &&  ($1 < 32)) {
+    if ($cidr =~ m!^(?:$IPV4RE)(?:/(\d+))$! && ($1 > 7) &&  ($1 <= 32)) {
 	return $cidr;
     }
 
-- 
2.1.4




More information about the pve-devel mailing list