Commit f0b2c659 authored by Robert Ricci's avatar Robert Ricci
Browse files

Exra check. Make sure we don't remove a VLAN unless we suceeded in

removing all of the ports in it.
parent 9ef755b5
......@@ -385,9 +385,14 @@ sub removeVlan($@) {
# For efficiency, we remove all VLANs from the leader in one function
# call. This can save a _lot_ of locking and unlocking.
#
my $ok = $self->{LEADER}->removeVlan(@vlan_ids);
if (!$errors) {
my $ok = $self->{LEADER}->removeVlan(@vlan_ids);
if (!$ok) {
$errors++;
}
}
return ($ok && ($errors == 0));
return ($errors == 0);
}
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment