Commit ee964c75 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor bug fix; do not call SpanningTree() if just one switch.

parent 7715570b
......@@ -1278,6 +1278,12 @@ sub mapPortsToSwitches(@)
my %trunks = getTrunks();
my %map = mapPortsToDevices(@ports);
my %devices = ();
# Watch for one device, no trunks to worry about.
return (keys(%map))
if (scalar(keys(%map)) == 1);
foreach my $device (keys %map) {
$devices{$device} = 1;
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