Commit 6db144c6 authored by Jonathon Duerig's avatar Jonathon Duerig

Fix interface misnumbering

parent 536252ee
......@@ -110,5 +110,5 @@ system("perl newnode_research.in");
# Commit Changes
foreach my $node (@nodeList) {
# newAction("table" => "node", "id" => $node, "command" => "commit");
newAction("table" => "node", "id" => $node, "command" => "commit");
}
......@@ -180,10 +180,10 @@ foreach my $key (keys(%mac_list)) {
my $iface = $mac_list{$key}->{'iface'};
my $protocols = $mac_list{$key}->{'protocols'};
if (defined($protocols)) {
if (defined($iface)) {
$iface_sort{"$protocols:$iface"} = $key;
if (defined($iface) && $iface ne 'unknown') {
$iface_sort{"$protocols:$iface:$key"} = $key;
} else {
$card_sort{"$protocols:$card"} = $key;
$card_sort{"$protocols:$card:$key"} = $key;
}
} else {
print STDERR "Protocols not defined on new_interface_id ".
......@@ -194,17 +194,17 @@ foreach my $key (keys(%mac_list)) {
my $current_card = 0;
foreach my $iface_key (sort(keys(%iface_sort))) {
$mac_list{$iface_sort{$iface_key}}->{'card'} = $current_card;
my $id = $mac_list{$iface_sort{$iface_key}}->{'id'};
my $card = $mac_list{$iface_sort{$iface_key}}->{'iface'};
print STDERR "iface $id:$card\n";
# my $id = $mac_list{$iface_sort{$iface_key}}->{'id'};
# my $card = $mac_list{$iface_sort{$iface_key}}->{'iface'};
# print STDERR "iface $id:$card\n";
++$current_card;
}
foreach my $card_key (sort(keys(%card_sort))) {
$mac_list{$card_sort{$card_key}}->{'card'} = $current_card;
my $id = $mac_list{$card_sort{$card_key}}->{'id'};
my $card = $mac_list{$card_sort{$card_key}}->{'card'};
print STDERR "card $id:$card\n";
# my $id = $mac_list{$card_sort{$card_key}}->{'id'};
# my $card = $mac_list{$card_sort{$card_key}}->{'card'};
# print STDERR "card $id:$card\n";
++$current_card;
}
......
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