[pve-devel] [PATCH pve-network] zones: evpn/simple: add missing mask to gateway address
Alexandre Derumier
aderumier at odiso.com
Thu Nov 26 15:29:35 CET 2020
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Network/SDN/Zones/EvpnPlugin.pm | 3 ++-
PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm b/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 14bbf56..d833641 100644
--- a/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -93,10 +93,11 @@ sub generate_sdn_config {
foreach my $subnetid (sort keys %{$subnets}) {
my $subnet = $subnets->{$subnetid};
my $cidr = $subnet->{cidr};
+ my $mask = $subnet->{mask};
my $gateway = $subnet->{gateway};
if ($gateway) {
- push @iface_config, "address $gateway" if !defined($address->{$gateway});
+ push @iface_config, "address $gateway/$mask" if !defined($address->{$gateway});
$address->{$gateway} = 1;
}
if ($subnet->{snat}) {
diff --git a/PVE/Network/SDN/Zones/SimplePlugin.pm b/PVE/Network/SDN/Zones/SimplePlugin.pm
index ed41e62..94452a0 100644
--- a/PVE/Network/SDN/Zones/SimplePlugin.pm
+++ b/PVE/Network/SDN/Zones/SimplePlugin.pm
@@ -65,7 +65,7 @@ sub generate_sdn_config {
my $gateway = $subnet->{gateway};
if ($gateway) {
- push @iface_config, "address $gateway" if !defined($address->{$gateway});
+ push @iface_config, "address $gateway/$mask" if !defined($address->{$gateway});
$address->{$gateway} = 1;
}
#add route for /32 pointtopoint
--
2.20.1
More information about the pve-devel
mailing list