Edit report at http://bugs.php.net/bug.php?id=51336&edit=1

 ID:                 51336
 Updated by:         [email protected]
 Reported by:        lytboris at gmail dot com
 Summary:            snmprealwalk (snmp v1) does not handle end of OID
                     tree correctly
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            SNMP related
 Operating System:   *
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        lytboris
 Block user comment: N
 Private report:     N

 New Comment:

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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2011-01-31 12:34:14] [email protected]

Automatic comment from SVN on behalf of lytboris
Revision: http://svn.php.net/viewvc/?view=revision&revision=307876
Log: Fixed bug #51336

------------------------------------------------------------------------
[2010-12-01 20:56:30] lytboris at gmail dot com

Any progress on this bug?

------------------------------------------------------------------------
[2010-03-20 11:52:24] lytboris at gmail dot com

Description:
------------
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:
---------------
<?php

$machine_ip = "127.0.0.1";

$community = "public";

$oid= ".1.3.6.1";

#$oid= ".1.3.6.1.2.1.1";



snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC);

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



if (empty($walk_result)) {

        print "It's busted\n";

        exit(0);

} 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.3.6.1.6.3.16.1.5.2.1.6.6.115.121.115.116.101.109.1.1 in
/home/nc/tmp/perl-snmp-test-case/case-1/php-walk-case1.php on line 8

It's busted


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51336&edit=1

Reply via email to