]> git.proxmox.com Git - pve-common.git/commitdiff
Consider /31 and /32 valid subnet masks.
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 3 Jun 2016 09:09:21 +0000 (11:09 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 3 Jun 2016 09:21:42 +0000 (11:21 +0200)
Since we already allow this for container IP addresses it is
reasonable to assume the host might be using such a setup as
well. (You can use an additional route to reach the gateway
and then simply have no "LAN".) Some people seem to want
this...

src/PVE/JSONSchema.pm
src/PVE/Network.pm

index a2394f74ede21d9f49105f876f42e3b32bf05d0d..5b5fe1568a234a3c89832d2dba825c38be243952 100644 (file)
@@ -229,7 +229,9 @@ my $ipv4_mask_hash = {
     '255.255.255.224' => 27,
     '255.255.255.240' => 28,
     '255.255.255.248' => 29,
-    '255.255.255.252' => 30
+    '255.255.255.252' => 30,
+    '255.255.255.254' => 31,
+    '255.255.255.255' => 32,
 };
 
 register_format('ipv4mask', \&pve_verify_ipv4mask);
index 71af2b889bbbd6da5ce6651581c6197bf531935d..ab073505710150a5a24bea052e52070117fe99a6 100644 (file)
@@ -71,6 +71,8 @@ our $ipv4_mask_hash_localnet = {
     '255.255.255.240' => 28,
     '255.255.255.248' => 29,
     '255.255.255.252' => 30,
+    '255.255.255.254' => 31,
+    '255.255.255.255' => 32,
 };
 
 sub setup_tc_rate_limit {