Bug #12903 Updated: snmpwalkoid don't work with SNMPv1
| From: | nicolas dot payen at landis-gyr dot com | Date: | Thu, 23 Aug 2001 09:11:52 +0000 |
| Subject: | Bug #12903 Updated: snmpwalkoid don't work with SNMPv1 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-64140@lists.php.net to get a copy of this message | ||
ID: 12903
User updated by: nicolas.payen@landis-gyr.com
Reported By: nicolas.payen@landis-gyr.com
Status: Open
Bug Type: SNMP related
Operating System: Win NT
PHP Version: 4.0.6
New Comment:
when you're watching the snmp.c code, the PB is easy to see :
Warning::st=3->snmpwalkoid.
326 if (st >= 2 && st != 11) {
327 if (vars->type != SNMP_ENDOFMIBVIEW &&
328 vars->type != SNMP_NOSUCHOBJECT && vars->type != SNMP_NOSUCHINSTANCE) {
329 memmove((char *)name, (char *)vars->name,vars->name_length * sizeof(oid));
330 name_length = vars->name_length;
331 keepwalking = 1;
332 }
333 }
334 }
335 } else {
336 if (st != 2 || response->errstat != SNMP_ERR_NOSUCHNAME) {
337 php_error(E_WARNING,"Error in packet.\nReason: %s\n",
snmp_errstring(response->errstat));
338 if (response->errstat == SNMP_ERR_NOSUCHNAME) {
the end MIB condition is only right for SNMPv2c and SNMPv3,
but it doesn't work with a SNMPv1 agent which return noSuchName at the end of the MIB
I could change the code, but I want to work on a NT station.
How can I change .dll?
Previous Comments:
------------------------------------------------------------------------
[2001-08-22 11:46:47] nicolas.payen@landis-gyr.com
snmpwalkoid doesn't see the end of the MIB.
If GET NEXT on the last element, the SNMPv1 Agent return noSuchName error (cf RFC1157), and
snmpwalkoid stop with an error.
snmpwalk run properly on a SNMPv1 Agent, so it is strange.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12903&edit=1