|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51336 snmprealwalk (snmp v1) does not handle end of OID tree correctly
Submitted: 2010-03-20 11:52 UTC Modified: 2011-01-31 12:37 UTC
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: lytboris at gmail dot com Assigned: lytboris (profile)
Status: Closed Package: SNMP related
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 - 33 = ?
Subscribe to this entry?

 [2010-03-20 11:52 UTC] lytboris at gmail dot com
When snmprealwalk is asked for complete OID tree (thus it may not be . OID but every OID prefix covers system-wide last OID) it does not handle nosuchname error (that is used in snmpv1 as NOSUCHINSTANCE) reported by agent correctly showing nonsense warnings.

This is because error handling case does not `know' about SNMP_CMD_REALWALK query type, only about SNMP_CMD_WALK.

Test script:
$machine_ip = "";
$community = "public";
$oid= ".";
#$oid= ".";

$walk_result = snmprealwalk($machine_ip, $community, $oid);

if (empty($walk_result)) {
        print "It's busted\n";
} else {
        print "Number of entries: " . count($walk_result) . "\n";

Expected result:
Number of entries: <about 4k>

Actual result:
PHP Warning:  snmprealwalk(): Error in packet: (noSuchName) There is no such variable name in this MIB. in /home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8
PHP Warning:  snmprealwalk(): This name does not exist: iso. in /home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8
It's busted


snmpv1-realwalk-end-of-OID-bug (last revision 2010-03-20 10:59 UTC by lytboris at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-01 20:56 UTC] lytboris at gmail dot com
Any progress on this bug?
 [2011-01-31 12:34 UTC]
Automatic comment from SVN on behalf of lytboris
Log: Fixed bug #51336
 [2011-01-31 12:37 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: lytboris
 [2011-01-31 12:37 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Feb 22 14:01:27 2020 UTC