From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 pve-container 3/4] config: Use LXC Config instead of QemuServer for parsing net
Date: Mon, 20 Nov 2023 20:19:53 +0100 [thread overview]
Message-ID: <20231120191954.592035-4-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20231120191954.592035-1-s.hanreich@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
src/PVE/LXC.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index c239715..847b8c8 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -2771,9 +2771,9 @@ 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);
+ 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
next prev parent reply other threads:[~2023-11-20 19:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 19:19 [pve-devel] [PATCH v2 container 0/4] Bugfixes for DHCP Stefan Hanreich
2023-11-20 19:19 ` [pve-devel] [PATCH v2 pve-container 1/4] hotplug network: Only change IPAM when MAC or bridge changes Stefan Hanreich
2023-11-20 19:19 ` [pve-devel] [PATCH v2 pve-container 2/4] network: Do not always reserve new IP in IPAM Stefan Hanreich
2023-11-20 19:19 ` Stefan Hanreich [this message]
2023-11-20 19:19 ` [pve-devel] [PATCH v2 pve-container 4/4] create: Do not call create_ifaces_ipams_ips Stefan Hanreich
2023-11-22 13:42 ` [pve-devel] applied: [PATCH v2 container 0/4] Bugfixes for DHCP Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231120191954.592035-4-s.hanreich@proxmox.com \
--to=s.hanreich@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox