From: Wolfgang Bumiller Date: Fri, 3 Jun 2016 09:09:21 +0000 (+0200) Subject: Consider /31 and /32 valid subnet masks. X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=e43faad9ff27f4d252d5604439c7aab1ff1c6251 Consider /31 and /32 valid subnet masks. 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... --- diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index a2394f7..5b5fe15 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -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); diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm index 71af2b8..ab07350 100644 --- a/src/PVE/Network.pm +++ b/src/PVE/Network.pm @@ -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 {