From 362a3fb93d8454fb5ef1b4397c56526bc9529268 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sun, 20 Nov 2022 16:32:04 +0100 Subject: [PATCH] network: let the common tap-plug helper add fdb entries Avoids trying to append some on OVS ports or the like, which won't work with the bridge util, so let the common tap-plug helper add fdb entries, if needed _and_ supported. Signed-off-by: Thomas Lamprecht --- debian/control | 2 +- src/PVE/LXC.pm | 3 +-- src/lxcnetaddbr | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/debian/control b/debian/control index 354d3de..49782a8 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ Depends: binutils, file, libpve-access-control(>= 7.2-5), libpve-cluster-perl, - libpve-common-perl (>= 7.2-4), + libpve-common-perl (>= 7.2-8), libpve-guest-common-perl (>= 4.1-1), libpve-storage-perl (>= 7.2-10), lxc-pve, diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index f2e2b66..c110166 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -962,8 +962,7 @@ sub update_net { PVE::Network::SDN::Zones::add_bridge_fdb($veth, $mac, $bridge, $firewall); } else { PVE::Network::tap_plug( - $veth, $bridge, $newnet->{tag}, $firewall, $newnet->{trunks}, $rate); - PVE::Network::add_bridge_fdb($veth, $mac, $firewall); # early returns if brport has learning on + $veth, $bridge, $newnet->{tag}, $firewall, $newnet->{trunks}, $rate, { mac => $mac }); } # This includes the rate: diff --git a/src/lxcnetaddbr b/src/lxcnetaddbr index e496b23..83052e1 100755 --- a/src/lxcnetaddbr +++ b/src/lxcnetaddbr @@ -65,8 +65,7 @@ if (-d "/sys/class/net/$iface") { PVE::Network::SDN::Zones::tap_plug($iface, $bridge, $tag, $firewall, $trunks, $rate); PVE::Network::SDN::Zones::add_bridge_fdb($iface, $net->{hwaddr}, $bridge, $firewall); } else { - PVE::Network::tap_plug($iface, $bridge, $tag, $firewall, $trunks, $rate); - PVE::Network::add_bridge_fdb($iface, $net->{hwaddr}, $net->{firewall}); # early returns if brport has learning on + PVE::Network::tap_plug($iface, $bridge, $tag, $firewall, $trunks, $rate, { mac => $net->{hwaddr}}); } } -- 2.39.2