all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pve-network] config: release the addresses of a NIC removed from a running container
@ 2026-11-12 10:40 Hannes Laimer
  2026-11-12 10:46 ` Hannes Laimer
  2026-11-14 21:33 ` applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Hannes Laimer @ 2026-11-12 10:40 UTC (permalink / raw)
  To: pve-devel

Without `$class->..` the passed options ended up as the first
argument, and the `undef` check on the second argument, `!$data`,
ended up returning an empty hash. So the NIC's addresses were never
released in the IPAM, and the DHCP client of a host-managed NIC was
not stopped. Destroying the container did not release them either,
since the NIC is gone from the config by then.

Fixes: 036c5e9bb339 ("implement host-managed DHCP for containers with `ipmanagehost`")
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 src/PVE/LXC/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 70525098cd0f..b2f623394b21 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -1696,7 +1696,7 @@ sub vmconfig_hotplug_pending {
                 $cgroup->change_cpu_shares(undef);
             } elsif ($opt =~ m/^net(\d)$/) {
                 my $netid = $1;
-                my $net = parse_lxc_network($conf->{$opt});
+                my $net = $class->parse_lxc_network($conf->{$opt});
                 PVE::LXC::kill_dhclients($vmid, $net->{name}) if $net->{'host-managed'};
 
                 PVE::Network::veth_delete("veth${vmid}i$netid");
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-14 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 10:40 [PATCH pve-network] config: release the addresses of a NIC removed from a running container Hannes Laimer
2026-11-12 10:46 ` Hannes Laimer
2026-11-14 21:33 ` applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal