Commit 0dd64528 authored by Robert Ricci's avatar Robert Ricci
Browse files

Work around something that appears to be a bug in CatOS - for VLANs

with no learned MACs, it seems to return some only partially-complete
information about MACs it has leared in VLAN 1.
parent f3161ee1
......@@ -327,8 +327,14 @@ SWITCH:
DEBUG "printing for index $index\n";
next unless ($status{$index} && ($status{$index} eq "learned" ||
$status{$index} == 3));
next if ($realports{$index} =~ /ifIndex/);
$status{$index} eq "3"));
# As far as I can tell, this is a bug with (at least some versions
# of) CatOS - we sometimes get back MACs that are not even in
# this vlan, and those end up with an empty $realport
next if ((!$realports{$index}) ||
($realports{$index} =~ /ifIndex/));
print "$MACs{$index},$realports{$index},$vlan_number,".
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