[3317739] Fix for Baystack without POE on stack member 1 (David Baldwin)

This commit is contained in:
Oliver Gorwits
2012-04-12 10:27:55 +01:00
parent eb5a492eb9
commit 2da37f06ea
2 changed files with 23 additions and 1 deletions

View File

@@ -452,6 +452,23 @@ sub e_vendor {
return $stack->SUPER::e_vendor($partial) || $stack->ns_e_vendor($partial);
}
# fix for stack of switches without POE on module 1
# https://sourceforge.net/tracker/?func=detail&aid=3317739&group_id=70362&atid=527529
sub peth_port_ifindex {
my $stack = shift;
my $partial = shift;
my %peth_port_ifindex = ();
my $poe_port_st = $stack->peth_port_status($partial);
my $if_index = $stack->interfaces($partial);
foreach my $i (keys %$if_index) {
next unless defined $poe_port_st->{$if_index->{$i}};
$peth_port_ifindex{$if_index->{$i}} = $i;
}
return \%peth_port_ifindex;
}
1;
__END__