Commit 8bedc880 authored by Robert Ricci's avatar Robert Ricci
Browse files

Fix minor bug in resetVlanIfOnTrunk() - we convert the port number to

channel number before calling this function.
parent 735c7a2c
...@@ -1713,15 +1713,17 @@ sub resetVlanIfOnTrunk($$$) { ...@@ -1713,15 +1713,17 @@ sub resetVlanIfOnTrunk($$$) {
# TODO: Perhaps this should be general - ie. $self{IFINDEX} should have # TODO: Perhaps this should be general - ie. $self{IFINDEX} should have
# the channel ifIndex the the port is in a channel. Not sure that # the channel ifIndex the the port is in a channel. Not sure that
# this is _always_ beneficial, though # this is _always_ beneficial, though
# # NOTE: This 'conversion' is no longer needed, since we call
my $channel = snmpitGetFatal($self->{SESS},["pagpGroupIfIndex",$ifIndex]); # getChannelIfIndex on the port before passing it into this function
if (!($channel =~ /^\d+$/) || ($channel == 0)) { #
print "WARNING: resetVlanIfOnTrunk got bad channel ($channel) for $self->{NAME}.$modport\n"; #my $channel = snmpitGetFatal($self->{SESS},["pagpGroupIfIndex",$ifIndex]);
return 0; #if (!($channel =~ /^\d+$/) || ($channel == 0)) {
} # print "WARNING: resetVlanIfOnTrunk got bad channel ($channel) for $self->{NAME}.$modport\n";
if (($channel =~ /^\d+$/) && ($channel != 0)) { # return 0;
$ifIndex = $channel; #}
} #if (($channel =~ /^\d+$/) && ($channel != 0)) {
# $ifIndex = $channel;
#}
# #
# Get the existing bitfield for allowed VLANs on the trunk # Get the existing bitfield for allowed VLANs on the trunk
......
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