Edit report at https://bugs.php.net/bug.php?id=79569&edit=1
ID: 79569
Updated by: php-bugs@lists.php.net
Reported by: grzegorz129 at gmail dot com
Summary: State leak between SNMP::walk(oid, false) calls
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: SNMP related
Operating System: N/A
PHP Version: 7.4.5
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2020-05-08 11:28:20] cmb@php.net
Please compare with the behavior of snmpwalk(); would that give
the desired results?
------------------------------------------------------------------------
[2020-05-05 22:25:02] grzegorz129 at gmail dot com
Description:
------------
When SNMP::walk() is called with a numeric OID it provides generic results any number of times.
However, as soon as it's called with the textual OID corresponding to the numeric one any
subsequent calls with that numerical OID will suddenly start returning results in a different format
(exactly like with the textual one).
It's pretty hard to describe, however looking at the "Actual result" section clearly
shows the problem.
Test script:
---------------
/*
No simple script available due to external server being required.
- \SNMP was configured with v3 protocol including auth & priv
- oid_output_format = \SNMP_OID_OUTPUT_SUFFIX
- exceptions_enabled = \SNMP::ERRNO_ANY
- quick_print = true
#1 ââ->walk('.1.3.6.1.4.1.6574.2.1.1', false);
#2 ->walk('.1.3.6.1.4.1.6574.2.1.1', false); => result exactly like in #1
#3 ->walk('SYNOLOGY-DISK-MIB::diskTable', false); => result with names
#4 ->walk('.1.3.6.1.4.1.6574.2.1.1', false); => result like in #3 instead of #1-#2
*/
Actual result:
--------------
ââ$snmp->walk('.1.3.6.1.4.1.6574.2.1.1', false);
âarray (
'synology.2.1.1.2.0' => '"Drive 1"',
'synology.2.1.1.2.1' => '"Drive 2"',
'synology.2.1.1.2.2' => '"Drive 3"',
'synology.2.1.1.2.3' => '"Drive 4"',
'synology.2.1.1.2.4' => '"Drive 5"',
'synology.2.1.1.3.0' => '"WD40EFRX-68WT0N0 "',
'synology.2.1.1.3.1' => '"WD40EFRX-68N32N0 "',
'synology.2.1.1.3.2' => '"ST6000VN0033-2EE110 "',
'synology.2.1.1.3.3' => '"WD60EFRX-68L0BN1 "',
'synology.2.1.1.3.4' => '"ST1000LM010-9YH146 "',
'synology.2.1.1.4.0' => '"SATA"',
'synology.2.1.1.4.1' => '"SATA"',
'synology.2.1.1.4.2' => '"SATA"',
'synology.2.1.1.4.3' => '"SATA"',
'synology.2.1.1.4.4' => '"SATA"',
'synology.2.1.1.5.0' => '1',
'synology.2.1.1.5.1' => '1',
'synology.2.1.1.5.2' => '1',
'synology.2.1.1.5.3' => '1',
'synology.2.1.1.5.4' => '1',
'synology.2.1.1.6.0' => '37',
'synology.2.1.1.6.1' => '34',
'synology.2.1.1.6.2' => '39',
'synology.2.1.1.6.3' => '37',
'synology.2.1.1.6.4' => '31',
)
ââ$snmp->walk('SYNOLOGY-DISK-MIB::diskTable', false);
âarray (
'diskID.0' => '"Drive 1"',
'diskID.1' => '"Drive 2"',
'diskID.2' => '"Drive 3"',
'diskID.3' => '"Drive 4"',
'diskID.4' => '"Drive 5"',
'diskModel.0' => '"WD40EFRX-68WT0N0 "',
'diskModel.1' => '"WD40EFRX-68N32N0 "',
'diskModel.2' => '"ST6000VN0033-2EE110 "',
'diskModel.3' => '"WD60EFRX-68L0BN1 "',
'diskModel.4' => '"ST1000LM010-9YH146 "',
'diskType.0' => '"SATA"',
'diskType.1' => '"SATA"',
'diskType.2' => '"SATA"',
'diskType.3' => '"SATA"',
'diskType.4' => '"SATA"',
'diskStatus.0' => '1',
'diskStatus.1' => '1',
'diskStatus.2' => '1',
'diskStatus.3' => '1',
'diskStatus.4' => '1',
'diskTemperature.0' => '37',
'diskTemperature.1' => '34',
'diskTemperature.2' => '39',
'diskTemperature.3' => '37',
'diskTemperature.4' => '31',
)
ââ$snmp->walk('.1.3.6.1.4.1.6574.2.1.1', false);
âarray (
'diskID.0' => '"Drive 1"',
'diskID.1' => '"Drive 2"',
'diskID.2' => '"Drive 3"',
'diskID.3' => '"Drive 4"',
'diskID.4' => '"Drive 5"',
'diskModel.0' => '"WD40EFRX-68WT0N0 "',
'diskModel.1' => '"WD40EFRX-68N32N0 "',
'diskModel.2' => '"ST6000VN0033-2EE110 "',
'diskModel.3' => '"WD60EFRX-68L0BN1 "',
'diskModel.4' => '"ST1000LM010-9YH146 "',
'diskType.0' => '"SATA"',
'diskType.1' => '"SATA"',
'diskType.2' => '"SATA"',
'diskType.3' => '"SATA"',
'diskType.4' => '"SATA"',
'diskStatus.0' => '1',
'diskStatus.1' => '1',
'diskStatus.2' => '1',
'diskStatus.3' => '1',
'diskStatus.4' => '1',
'diskTemperature.0' => '37',
'diskTemperature.1' => '34',
'diskTemperature.2' => '39',
'diskTemperature.3' => '37',
'diskTemperature.4' => '31',
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79569&edit=1