php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12903 snmpwalkoid don't work with SNMPv1
Submitted: 2001-08-22 11:46 UTC Modified: 2002-02-02 06:43 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: nicolas dot payen at landis-gyr dot com Assigned:
Status: No Feedback Package: SNMP related
PHP Version: 4.0.6 OS: Win NT
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2001-08-22 11:46 UTC] nicolas dot payen at landis-gyr dot 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.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-23 05:11 UTC] nicolas dot payen at landis-gyr dot com
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?

 [2002-01-11 17:00 UTC] lobbin@php.net
Can this be reproduced with 4.1.1?
 [2002-02-02 06:43 UTC] sander@php.net
No feedback was provided for this bug, so it is being suspended.
If you are able to provide the information that was requested,
please do so and change the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Dec 01 13:01:47 2020 UTC