Commit fee57b6e authored by Kirk Webb's avatar Kirk Webb
Browse files

Disable OpenFlow when removing stale vlans in SyncVlansFromTables()

If OF is specified for a vlan, and the sync operation is going to
remove it because it is stale, try to disable OF before removal.
parent cda9ed7a
......@@ -2426,6 +2426,19 @@ sub syncVlansFromTables($$@) {
$stack->removeSomePortsFromTrunk($vlanid, @trunkports)
or goto bad;
# Disable OpenFlow, if set for vlan
my $vlan = VLan->Lookup($vlanid);
if ($vlan) {
my $ofenabled;
if (defined($ofenabled) && $ofenabled == 1) {
if (!$stack->disableOpenflow($vlanid)) {
print STDERR "Could not disable openflow ".
"on stale vlan: $vlanid\n";
goto bad;
if (!$stack->removeVlan($vlanid)) {
print STDERR "Could not remove vlan: $vlanid\n";
goto bad;
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