Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/inex/IXP-Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Feb 17, 2014
2 parents aaf6579 + 7235ebb commit e883633
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tools/runtime/l2database/update-l2database.pl
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,16 @@ ($$)

$debug && print STDERR "DEBUG: $host: started query process\n";

my $ifindex = snmpwalk2hash($host, $snmpcommunity, $oids->{ifDescr}) || die "$host: cannot read ifDescr";
my $interfaces = snmpwalk2hash($host, $snmpcommunity, $oids->{dot1dBasePortIfIndex}) || die "$host: cannot read dot1dBasePortIfIndex";
my $ifindex = snmpwalk2hash($host, $snmpcommunity, $oids->{ifDescr});
if (!$ifindex) {
print STDERR "WARNING: $host: cannot read ifDescr. Not processing $host further.\n";
return;
}
my $interfaces = snmpwalk2hash($host, $snmpcommunity, $oids->{dot1dBasePortIfIndex});
if (!$interfaces) {
print STDERR "WARNING: $host: cannot read dot1dBasePortIfIndex. Not processing $host further.\n";
return;
}

$debug && print STDERR "DEBUG: $host: pre-emptively trying Juniper jnxExVlanTag to see if we're on a J-EX box (".$oids->{jnxExVlanTag}.")\n";
$vlanmapping = snmpwalk2hash($host, $snmpcommunity, $oids->{jnxExVlanTag});
Expand Down Expand Up @@ -260,7 +268,8 @@ ($$)
# if this isn't supported, then panic. We could probably try
# community@vlan syntax, but this should be good enough.
if (!$qbridgehash && !$dbridgehash) {
die "$host: cannot read BRIDGE-MIB or Q-BRIDGE-MIB\n";
print STDERR "WARNING: $host: cannot read BRIDGE-MIB or Q-BRIDGE-MIB. Not processing $host further.\n";
return;
}

my ($bridgehash, $maptable, $bridgehash2mac);
Expand Down

0 comments on commit e883633

Please sign in to comment.