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

 ID:                 51336
 Comment by:         lytboris at gmail dot com
 Reported by:        lytboris at gmail dot com
 Summary:            snmprealwalk (snmp v1) does not handle end of OID
                     tree correctly
 Status:             Open
 Type:               Bug
 Package:            SNMP related
 Operating System:   *
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Any progress on this bug?


Previous Comments:
------------------------------------------------------------------------
[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