[pve-devel] [PATCH pve-network 2/2] subnets: fix add|del subnets withtout ipam
Alexandre Derumier
aderumier at odiso.com
Sat May 8 07:51:36 CEST 2021
---
PVE/Network/SDN/Subnets.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PVE/Network/SDN/Subnets.pm b/PVE/Network/SDN/Subnets.pm
index 0cdadf7..46d9830 100644
--- a/PVE/Network/SDN/Subnets.pm
+++ b/PVE/Network/SDN/Subnets.pm
@@ -165,6 +165,7 @@ sub add_subnet {
my ($zone, $subnetid, $subnet) = @_;
my $ipam = $zone->{ipam};
+ return if !$ipam;
my $ipam_cfg = PVE::Network::SDN::Ipams::config();
my $plugin_config = $ipam_cfg->{ids}->{$ipam};
my $plugin = PVE::Network::SDN::Ipams::Plugin->lookup($plugin_config->{type});
@@ -175,6 +176,7 @@ sub del_subnet {
my ($zone, $subnetid, $subnet) = @_;
my $ipam = $zone->{ipam};
+ return if !$ipam;
my $ipam_cfg = PVE::Network::SDN::Ipams::config();
my $plugin_config = $ipam_cfg->{ids}->{$ipam};
my $plugin = PVE::Network::SDN::Ipams::Plugin->lookup($plugin_config->{type});
--
2.20.1
More information about the pve-devel
mailing list