Hi,
When execute discovery.php in ZTE ZXA10 add a not exist Vlan.
This is error in SnmpQuery in : includes/discovery/vlans/q-bridge-mib.inc.php
When get this SmpQuery add in $vlans:
$vlans = SnmpQuery::walk('Q-BRIDGE-MIB::dot1qVlanCurrentUntaggedPorts')->table(2);
$vlans = SnmpQuery::walk('Q-BRIDGE-MIB::dot1qVlanCurrentEgressPorts')->table(2, $vlans);
And next execute this:
$vlans = SnmpQuery::walk('Q-BRIDGE-MIB::dot1qVlanStaticName')->table(1, $vlans);
The result is concatenate the two SnmpQuery.
Processing vlan ID: 0
Array
(
[Q-BRIDGE-MIB::dot1qVlanCurrentUntaggedPorts] => 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[Q-BRIDGE-MIB::dot1qVlanCurrentEgressPorts] => 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00
03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
)
SQL[select * from `vlans` where (`device_id` = ? and `vlan_vlan` = ?) limit 1 [21,0] 0.68ms]
Processing vlan ID: 1
Array
(
[Q-BRIDGE-MIB::dot1qVlanStaticName] => vlan0001
)
SQL[select * from `vlans` where (`device_id` = ? and `vlan_vlan` = ?) limit 1 [21,1] 0.48ms]
In the bucle for to insert in database, the first iteration is wrong and creating a false VLAN.
I think the solution is in foreach , if in the $vlan array no is Q-BRIDGE-MIB::dot1qVlanStaticName continue the foreach iteration.
Thank you