]> git.proxmox.com Git - pve-network.git/commitdiff
Fix #4917: evpn: forbid vlan-aware bridge
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 27 Oct 2023 11:53:28 +0000 (13:53 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 22 Nov 2023 18:45:52 +0000 (19:45 +0100)
Do it on vnet update instead throwing a warning at config generation.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
src/PVE/Network/SDN/Zones/EvpnPlugin.pm

index 5e9f8ec8dc386acfec4276cb843ba918488a71ca..655a9f00debaf4276aec2c4cb0f4ee8c05bdbd8b 100644 (file)
@@ -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}}) {