Hilmar Preusse wrote:
I did the same experiment using 5.2.2 (vanilla sources,
--with-defaults):

[EMAIL PROTECTED]:~/net-snmp/net-snmp-5.2.2 $ apps/snmpget -On -v2c -c foobar 
localhost:8161 .1.3.6.1.2.1.1.2.0
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.0.0.0.0.0.0.0
[EMAIL PROTECTED]:~/net-snmp/net-snmp-5.2.2 $

So it seems to be a bug in 5.2.2, which has been fixed in 5.3.0.
Consider to upgrade the Debian package.

I've just fixed this bug in the 5.2.x CVS branch, too. Patch attached.


+Thomas

--
Thomas Anders (thomas.anders at blue-cable.de)
Index: agent/mibgroup/mibII/system_mib.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/mibII/system_mib.c,v
retrieving revision 5.11
retrieving revision 5.12
diff -u -r5.11 -r5.12
--- agent/mibgroup/mibII/system_mib.c	1 May 2005 17:47:26 -0000	5.11
+++ agent/mibgroup/mibII/system_mib.c	11 Aug 2005 17:39:36 -0000	5.12
@@ -283,7 +283,7 @@
                  "sysobjectid token not a parsable OID:\n\t%s",
                  cptr);
         config_perror(tmpbuf);
-        memcpy(sysObjectID, version_sysoid, version_sysoid_len);
+        memcpy(sysObjectID, version_sysoid, version_sysoid_len * sizeof(oid));
         sysObjectIDLength = version_sysoid_len;
     }
 }
@@ -417,7 +417,7 @@
 #endif
 
     /* default sysObjectID */
-    memcpy(sysObjectID, version_sysoid, version_sysoid_len);
+    memcpy(sysObjectID, version_sysoid, version_sysoid_len * sizeof(oid));
     sysObjectIDLength = version_sysoid_len;
 
     /*

Reply via email to