]> git.proxmox.com Git - qemu-server.git/commitdiff
net: Skip and warn of interfaces without bridge
authorChristian Ebner <c.ebner@proxmox.com>
Wed, 12 Apr 2023 08:45:13 +0000 (10:45 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Jun 2023 16:26:27 +0000 (18:26 +0200)
Handle and warn about network interfaces which are not attached to
any bridge because the user actively removed it from the VM config.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
PVE/QemuServer.pm

index ab33aa375b23878711f910e973c17d6fe3ca125c..f0c35ceb6624be7e4701d9e2686ba895d7ed0f5f 100644 (file)
@@ -8576,6 +8576,10 @@ sub add_nets_bridge_fdb {
        }
 
        my $bridge = $net->{bridge};
+       if (!$bridge) {
+           log_warn("Interface '$iface' not attached to any bridge.");
+           next;
+       }
        if ($have_sdn) {
            PVE::Network::SDN::Zones::add_bridge_fdb($iface, $mac, $bridge, $net->{firewall});
        } elsif (-d "/sys/class/net/$bridge/bridge") { # avoid fdb management with OVS for now