mirror of
https://git.proxmox.com/git/pve-network
synced 2025-07-27 08:53:12 +00:00
zones: add add_bridge_fdb
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
56a9e2b3f3
commit
fef63d88ab
@ -324,5 +324,19 @@ sub tap_plug {
|
|||||||
$plugin->tap_plug($plugin_config, $vnet, $tag, $iface, $bridge, $firewall, $trunks, $rate);
|
$plugin->tap_plug($plugin_config, $vnet, $tag, $iface, $bridge, $firewall, $trunks, $rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub add_bridge_fdb {
|
||||||
|
my ($iface, $macaddr, $bridge, $firewall) = @_;
|
||||||
|
|
||||||
|
my $vnet = PVE::Network::SDN::Vnets::get_vnet($bridge, 1);
|
||||||
|
if (!$vnet) { # fallback for classic bridge
|
||||||
|
PVE::Network::add_bridge_fdb($iface, $macaddr, $firewall);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $plugin_config = get_plugin_config($vnet);
|
||||||
|
my $plugin = PVE::Network::SDN::Zones::Plugin->lookup($plugin_config->{type});
|
||||||
|
PVE::Network::add_bridge_fdb($iface, $macaddr, $firewall) if $plugin_config->{'bridge-disable-mac-learning'};
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user