From e43faad9ff27f4d252d5604439c7aab1ff1c6251 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 3 Jun 2016 11:09:21 +0200 Subject: [PATCH] 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... --- src/PVE/JSONSchema.pm | 4 +++- src/PVE/Network.pm | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 { -- 2.39.2