php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76356 snmprealwalk does not return all results
Submitted: 2018-05-18 23:16 UTC Modified: -
From: zerocarbthirty at gmail dot com Assigned:
Status: Open Package: SNMP related
PHP Version: 7.2.5 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-05-18 23:16 UTC] zerocarbthirty at gmail dot com
Description:
------------
snmprealwalk in PHP 7.2.5 returns different results than snmpwalk as well as the underlying system library (net-snmp)

Test script:
---------------
<?php
$vlannum = 732;
$switch = "192.168.1.2";
$physifary = snmprealwalk($switch, "public@$vlannum", ".1.3.6.1.2.1.17.4.3.1.2");    
$physifaryz = snmpwalk($switch, "public@$vlannum", ".1.3.6.1.2.1.17.4.3.1.2");    
var_dump($physifary);
var_dump($physifaryz);

Expected result:
----------------
Both arrays should contain the same information with different formatting.

This is what the Linux snmpwalk returns:

[meh@nessie html]# snmpwalk -v1 -c public@732 192.168.1.2 .1.3.6.1.2.1.17.4.3.1.2 BRIDGE-MIB::dot1dTpFdbPort.'......' = INTEGER: 800 BRIDGE-MIB::dot1dTpFdbPort.'......' = INTEGER: 1793


Actual result:
--------------
array(1) { ["BRIDGE-MIB::dot1dTpFdbPort.'......'"]=> string(13) "INTEGER: 1793" }

array(2) { [0]=> string(12) "INTEGER: 800" [1]=> string(13) "INTEGER: 1793" }

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 19 16:01:24 2020 UTC