ID:               43329
 User updated by:  ras at e-gerbil dot net
 Reported By:      ras at e-gerbil dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         SNMP related
 Operating System: FreeBSD 7.0-BETA3
 PHP Version:      5.2.5
 New Comment:

Nevermind I'm a tard, it is misaligning, array_values() squishes things
because an interface elsewhere on the router wasn't return a value for
counters but was for ifdescr... the choice of indexes here really sucks,
can't you just give me back an array with a numeric ifindex instead of
the whole darn oid. :)


Previous Comments:
------------------------------------------------------------------------

[2007-11-19 05:09:11] ras at e-gerbil dot net

Description:
------------
snmp2_walk() is occasionally (but consistently) returning the wrong
value for certain OIDs on certain devices. snmp2_real_walk(), snmp2_get,
and other external utilities all report the correct value.

Reproduce code:
---------------
        $test1 = snmp2_get($dev, $comm, "ifHCInOctets.163");
        $test2 = snmp2_real_walk($dev, $comm, "ifHCInOctets");
        $test3 = snmp2_walk($dev, $comm, "ifHCInOctets");
        $proof = snmp2_walk($dev, $comm, "ifIndex");

        print "SNMP2_GET test: $test1\n";
        print "SNMP2_REAL_WALK test:
{$test2['.1.3.6.1.2.1.31.1.1.1.6.163']}\n";
        print "SNMP2_WALK test: {$test3[83]}\n";
        print "Proof that I'm looking at the right ifindex:
{$proof[83]}\n";



Expected result:
----------------
I expect snmp2_walk() to return correct results. :)

Actual result:
--------------
SNMP2_GET test: 1280817516439889
SNMP2_REAL_WALK test: 1280817516439889
SNMP2_WALK test: 3545696399506456
Proof that I'm looking at the right ifindex: 163



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


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

Reply via email to