From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id D9A4D1FF0B3 for ; Wed, 14 Oct 2026 11:40:55 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id B5CC9214DD; Wed, 14 Oct 2026 11:40:53 +0200 (CEST) Date: Wed, 14 Oct 2026 11:40:48 +0200 From: Gabriel Goller To: =?utf-8?B?UsOpbWk=?= PAETA Subject: Re: [PATCH qemu-server] fix #6490: network: add bridge fdb entries when hotplugging a nic Message-ID: References: <20261013095852.2586609-1-remi.paeta@comaite.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20261013095852.2586609-1-remi.paeta@comaite.com> User-Agent: NeoMutt/20260504 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791970849382 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.303 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: A2H2RZS3TIPH6I7LZF2B7ANRHZ733KPE X-Message-ID-Hash: A2H2RZS3TIPH6I7LZF2B7ANRHZ733KPE X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 13.10.2026 11:58, Rémi PAETA wrote: > [snip] > 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"; > } Not a qemu-server expert, but one thing I noticed: I think we need an eval around the two calls, otherwise when the `bridge fdb add` fails, the tap interface is created but the hotplug fails (which means we have a diverging config). I think we also should relax a bit the del_nets_bridge_fdb() function so that a missing entry doesn't die (again add an eval around the `bridge fdb del`). @Fiona what do you think? :)