Commit 16e340f1 authored by Robert Ricci's avatar Robert Ricci
Browse files

Sort the LANs and nodes before we put them into the topo file, so

that two identical topologies always produce identical topofiles.
parent 195aea10
......@@ -155,7 +155,7 @@ while (my ($vname,$member,$mask,$cost) = $query_result->fetchrow_array) {
print $OUT "# nodes: vname,links\n";
foreach my $node (keys(%nodes)) {
foreach my $node (sort keys(%nodes)) {
print $OUT "$node,";
print $OUT join(" ", values(%{ $nodes{$node} }));
print $OUT "\n";
......@@ -166,7 +166,7 @@ foreach my $node (keys(%nodes)) {
print $OUT "# lans: vname,mask,cost\n";
foreach my $lan (keys(%lans)) {
foreach my $lan (sort keys(%lans)) {
my $cost = $lans{$lan}->{"cost"};
my $mask = $lans{$lan}->{"mask"};
print $OUT "$lan,$mask,$cost\n";
Supports Markdown
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