ios-fdb-table-fix -- Fixed misnamed dictionary keys for dot1dTpFdbPort data (#13559)

This commit is contained in:
banachtarski-91
2021-11-23 16:50:55 -06:00
committed by GitHub
parent cdd1ae0d1e
commit 68fa373b77

View File

@@ -24,11 +24,11 @@ foreach ($vtpdomains as $vtpdomain_id => $vtpdomain) {
$portid_dict = [];
$dot1dBasePortIfIndex = SnmpQuery::context($vlan_raw, "vlan-$vlan_raw")->walk('BRIDGE-MIB::dot1dBasePortIfIndex')->table(1);
foreach ($dot1dBasePortIfIndex as $portLocal => $data) {
$port = get_port_by_index_cache($device['device_id'], $data['dot1dBasePortIfIndex']);
$port = get_port_by_index_cache($device['device_id'], $data['BRIDGE-MIB::dot1dBasePortIfIndex']);
$portid_dict[$portLocal] = $port['port_id'];
}
foreach ((array) $fdbPort_table['dot1dTpFdbPort'] as $mac => $dot1dBasePort) {
foreach ((array) $fdbPort_table['BRIDGE-MIB::dot1dTpFdbPort'] as $mac => $dot1dBasePort) {
$mac_address = implode(array_map('zeropad', explode(':', $mac)));
if (strlen($mac_address) != 12) {
d_echo("MAC address padding failed for $mac\n");