[pve-devel] [PATCH pve-network] Fix #4917: evpn: forbid vlan-aware bridge
Alexandre Derumier
aderumier at odiso.com
Fri Oct 27 13:53:28 CEST 2023
Do it on vnet update instead throwing a warning at config generation.
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 5e9f8ec..655a9f0 100644
--- a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -117,7 +117,6 @@ sub generate_sdn_config {
die "missing vxlan tag" if !$tag;
die "missing controller" if !$controller;
- warn "vlan-aware vnet can't be enabled with evpn plugin" if $vnet->{vlanaware};
my @peers = PVE::Tools::split_list($controller->{'peers'});
@@ -309,6 +308,7 @@ sub vnet_update_hook {
raise_param_exc({ tag => "missing vxlan tag"}) if !defined($tag);
raise_param_exc({ tag => "vxlan tag max value is 16777216"}) if $tag > 16777216;
+ raise_param_exc({ 'vlan-aware' => "vlan-aware option can't be enabled with evpn"}) if $vnet->{vlanaware};
# verify that tag is not already defined globally (vxlan-id are unique)
foreach my $id (keys %{$vnet_cfg->{ids}}) {
--
2.39.2
More information about the pve-devel
mailing list