]> git.proxmox.com Git - pve-container.git/commitdiff
network: let the common tap-plug helper add fdb entries
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 20 Nov 2022 15:32:04 +0000 (16:32 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 20 Nov 2022 15:32:06 +0000 (16:32 +0100)
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 <t.lamprecht@proxmox.com>
debian/control
src/PVE/LXC.pm
src/lxcnetaddbr

index 354d3de99b287dc30bc796e82d45b2a74ae803c1..49782a8cd78704052379d3ac27db5d5d9a0ff228 100644 (file)
@@ -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,
index f2e2b665e0e480f256fb9865271c000b4f881a35..c1101661a2fc37b3a96147e722124bce2bbf8452 100644 (file)
@@ -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:
index e496b23d89ddca833898a7433243236f259fbc7e..83052e19f0be4d6116470f85e5c647d195cc7d7f 100755 (executable)
@@ -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}});
     }
 }