An oddity picked up today: snmpwalking a Netgear ReadyNAS from net-snmp 5.5 gives significantly different results when compared to the output of snmpwalk from net-snmp 5.4.2.1:
From an Ubuntu 10.04 machine
$ snmpwalk --version
NET-SNMP version: 5.4.2.1
$ snmpwalk -v1 -cpublic 10.1.1.207 enterprises.4526.18.7.1
SNMPv2-SMI::enterprises.4526.18.7.1.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.4526.18.7.1.2.1 = STRING: "Volume C"
SNMPv2-SMI::enterprises.4526.18.7.1.3.1 = STRING: "RAID Level X"
SNMPv2-SMI::enterprises.4526.18.7.1.4.1 = STRING: "ok"
SNMPv2-SMI::enterprises.4526.18.7.1.5.1 = INTEGER: 4262912
SNMPv2-SMI::enterprises.4526.18.7.1.6.1 = INTEGER: 3403776
From a FreeBSD 8.1 machine
[root@vm-fbsd81 ~]# snmpwalk --version
NET-SNMP version: 5.5
[root@vm-fbsd81 ~]# snmpwalk -v1 -cpublic 10.1.1.207 enterprises.4526.18.7.1
SNMPv2-SMI::enterprises.4526.18.7.1.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.4526.18.7.1.2.1 = STRING: "Volume C"
SNMPv2-SMI::enterprises.4526.18.7.1.3.1 = STRING: "RAID Level X"
SNMPv2-SMI::enterprises.4526.18.7.1.4.1 = STRING: "ok"
SNMPv2-SMI::enterprises.4526.18.7.1.5.1 = INTEGER: 4262912
SNMPv2-SMI::enterprises.4526.18.7.1.6.1 = INTEGER: 3403776
NET-SNMP-AGENT-MIB::nsModuleName."".1.0.0 = STRING:
NET-SNMP-AGENT-MIB::nsModuleName."".1.1.0 = STRING:
NET-SNMP-AGENT-MIB::nsModuleName."".1.2.0 = STRING:
NET-SNMP-AGENT-MIB::nsModuleName."".7.1.3.6.1.2.1.4.127 = STRING: ip
NET-SNMP-AGENT-MIB::nsModuleName."".7.1.3.6.1.2.1.5.127 = STRING: icmp
NET-SNMP-AGENT-MIB::nsModuleName."".7.1.3.6.1.2.1.6.127 = STRING: tcp
[snip another 1300 lines]
And I even tried net-snmp 5.5 for Windows, which had the same results as the FreeBSD example.
Something has changed - perhaps there's a bug in the ReadyNAS MIB that was undetected by net-snmp 5.4.x, but net-snmp 5.5 is being strict about it? Perhaps there's a bug in net-snmp 5.5? I don't know enough to say for sure.
rstory offered this patch for me to try:
ReplyDeletediff --git a/net-snmp/apps/snmpwalk.c b/net-snmp/apps/snmpwalk.c
index d222218..09bca07 100644
--- a/net-snmp/apps/snmpwalk.c
+++ b/net-snmp/apps/snmpwalk.c
@@ -263,7 +263,6 @@ main(int argc, char *argv[])
} else {
memmove(end_oid, root, rootlen*sizeof(oid));
end_len = rootlen;
- end_oid[end_len-1]++;
}
SOCK_STARTUP;
Which I will try when I can. More to follow