[pve-devel] [PATCH pve-container 3/3] config: Use LXC Config instead of QemuServer for parsing net

Stefan Hanreich s.hanreich at proxmox.com
Mon Nov 20 19:41:28 CET 2023


Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 src/PVE/LXC.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index c239715..071faca 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -2771,7 +2771,7 @@ sub create_ifaces_ipams_ips {
 
     for my $opt (keys %$conf) {
 	next if $opt !~ m/^net(\d+)$/;
-	my $net = PVE::QemuServer::parse_net($conf->{$opt});
+	my $net = PVE::LXC::Config::parse_lxc_network($conf->{$opt});
 	next if $net->{type} ne 'veth';
         PVE::Network::SDN::Vnets::add_next_free_cidr($net->{bridge}, $conf->{hostname}, $net->{hwaddr}, $vmid, undef, 1);
     }
@@ -2784,7 +2784,7 @@ sub delete_ifaces_ipams_ips {
 
     for my $opt (keys %$conf) {
 	next if $opt !~ m/^net(\d+)$/;
-	my $net = PVE::QemuServer::parse_net($conf->{$opt});
+	my $net = PVE::LXC::Config::parse_lxc_network($conf->{$opt});
 	eval { PVE::Network::SDN::Vnets::del_ips_from_mac($net->{bridge}, $net->{hwaddr}, $conf->{hostname}) };
 	warn $@ if $@;
     }
-- 
2.39.2





More information about the pve-devel mailing list