summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-03 16:37:09 -0400
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-03 16:37:09 -0400
commit201c530f642ba9b90059ebc7425f3af67cabeaa4 (patch)
tree4f5ab9cd8aed6127c5de4fb394af1f4d8e269c79 /scripts
parent278f12068a53d5d6bddd588c796bb32576a6d29e (diff)
downloadvyatta-cfg-quagga-201c530f642ba9b90059ebc7425f3af67cabeaa4.tar.gz
vyatta-cfg-quagga-201c530f642ba9b90059ebc7425f3af67cabeaa4.zip
Fix to show ifAlias of loopback
Need to handle get next of base OID
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/snmp/if-mib-alias7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/snmp/if-mib-alias b/scripts/snmp/if-mib-alias
index c713bfe8..82431356 100755
--- a/scripts/snmp/if-mib-alias
+++ b/scripts/snmp/if-mib-alias
@@ -54,10 +54,17 @@ sub get_oid {
print "$oid\nstring\n$ifalias\n" if $ifalias;
}
+my $BASE = '.1.3.6.1.2.1.31.1.1.1.18';
+
sub get_next {
my $oid = shift;
+
+ return get_next("$BASE.0")
+ if ($oid eq $BASE);
+
die "Not a valid Object ID: $oid"
unless ($oid =~ /^([0-9.]*)\.(\d)$/);
+
my $base = $1;
my $ifindex = $2;
my @interfaces = get_alias();