* [PATCH qemu-server] fix #6490: network: add bridge fdb entries when hotplugging a nic
@ 2026-10-13 9:58 Rémi PAETA
0 siblings, 0 replies; only message in thread
From: Rémi PAETA @ 2026-10-13 9:58 UTC (permalink / raw)
To: pve-devel
On bridges with MAC learning disabled, the forwarding database entries
of the guest NICs are added on VM start and on resume after a
migration, but not when a NIC gets hotplugged or re-plugged because its
bridge, VLAN tag or firewall setting changed. Re-plugging even drops
the existing entries.
The guest then loses connectivity on that NIC until its next start,
for example after enabling or disabling the firewall of the NIC, and
the migration of the VM fails at the end, as deleting the missing
entries fails.
Add the forwarding database entries of the NIC after plugging it. On
bridges with MAC learning enabled, this is a no-op.
Link: https://bugzilla.proxmox.com/show_bug.cgi?id=6490
Signed-off-by: Rémi PAETA <remi.paeta@comaite.com>
---
I am contributing on behalf of my employer, Comaite. Its entity CLA
was signed and sent to office@proxmox.com on 2026-10-09. Comaite would
be happy to make its first contribution to the Proxmox code with this
patch.
Tested on a Linux bridge with bridge-disable-mac-learning: toggling
the firewall of a NIC, hotplugging a NIC and live migrating the VM
afterwards. Without the patch, the NIC loses connectivity and the
migration fails on 'bridge fdb del'; with it, the entries are there
and the migration succeeds.
src/PVE/QemuServer.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 74772fdd..4c2bd334 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -5126,6 +5126,8 @@ sub vmconfig_update_net {
$newnet->{trunks},
$newnet->{rate},
);
+ # unplugging the interface dropped its forwarding database entries
+ PVE::QemuServer::Network::add_nets_bridge_fdb({ $opt => $value }, $vmid);
} elsif (safe_num_ne($oldnet->{rate}, $newnet->{rate})) {
# Rate can be applied on its own but any change above needs to
@@ -5155,6 +5157,7 @@ sub vmconfig_update_net {
$newnet->{bridge}, $newnet->{macaddr}, $vmid, $conf->{name},
);
vm_deviceplug($storecfg, $conf, $vmid, $opt, $newnet, $arch, $machine_type);
+ PVE::QemuServer::Network::add_nets_bridge_fdb({ $opt => $value }, $vmid);
} else {
die "skip\n";
}
--
2.47.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-13 10:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 9:58 [PATCH qemu-server] fix #6490: network: add bridge fdb entries when hotplugging a nic Rémi PAETA
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox