Commit be08fdbf authored by Leigh B Stoller's avatar Leigh B Stoller

Fixes to path computation, for ptopgen_new which now fills in the

actual switch details.
parent b4bcdfa0
......@@ -8220,6 +8220,7 @@ sub getportlist(@)
# The beginning and end of the list are ignored for the path
# since we care only about the Trunk links.
@info = splice(@info, 4, $#info);
while (@info) {
#
# Traverse two at a time. We can deduce the switch pair
......@@ -8236,6 +8237,15 @@ sub getportlist(@)
$field1 =~ s/^link\-//;
push(@result, $field1);
}
elsif ($field1 =~ /^link\-([-\w]*):([-\w]*)/) {
my $sw1 = $1;
my $sw2 = $2;
if ($field2 eq "($sw1/$sw2,$sw2/$sw1)" ||
$field2 eq "($sw2/$sw1,$sw1/$sw2)") {
push(@result, "$sw1:$sw2");
}
}
}
return join(" ", @result);
}
......
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