From 708b2f40ce7829c4c7bc21a0e62a9d1e4591088f Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Fri, 27 Oct 2023 13:53:28 +0200 Subject: [PATCH] Fix #4917: evpn: forbid vlan-aware bridge Do it on vnet update instead throwing a warning at config generation. Signed-off-by: Alexandre Derumier --- 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.5