]> git.proxmox.com Git - pve-network.git/commitdiff
don't allow subnets on vlanware vnet
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 5 Oct 2020 15:09:02 +0000 (17:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Oct 2020 16:17:19 +0000 (18:17 +0200)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Network/SDN/SubnetPlugin.pm

index 341e9e0b71d046507938df8ed47200aa7ede893b..8a216b64f7e95f5550444ad496aa0ce5dad7334a 100644 (file)
@@ -132,6 +132,7 @@ sub on_update_hook {
     if($vnetid) {
        my $vnet = PVE::Network::SDN::Vnets::get_vnet($vnetid);
        raise_param_exc({ vnet => "$vnetid don't exist"}) if !$vnet;
+       raise_param_exc({ vnet => "you can't add a subnet on a vlanaware vnet"}) if $vnet->{vlanaware};
     }
 
     my ($ip, $mask) = split(/\//, $cidr);