mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
VRP FDB table correctly parsed on some CE switches (#11766)
* vrp FDB table corrected on CE switches * sleep 5 in snmpsim to run tests. * 6 seconds wait when snmpsim.fork is called from bootstrap * rollback in Snmpsim Class * Update bootstrap.php
This commit is contained in:
@@ -22,7 +22,10 @@ if (!empty($fdbPort_table)) {
|
||||
// Collect data and populate $insert
|
||||
foreach ($fdbPort_table as $mac => $data) {
|
||||
foreach ($data[$data_oid] as $vlan => $basePort) {
|
||||
$ifIndex=$basePort[0];
|
||||
$ifIndex=reset($basePort); // $baseport can be ['' => '119'] or ['0' => '119']
|
||||
if (! $ifIndex) {
|
||||
continue;
|
||||
}
|
||||
$port = get_port_by_index_cache($device['device_id'], $ifIndex);
|
||||
$port_id = $port['port_id'];
|
||||
$mac_address = implode(array_map('zeropad', explode(':', $mac)));
|
||||
|
@@ -44,7 +44,7 @@ ini_set('display_errors', 1);
|
||||
|
||||
$snmpsim = new Snmpsim('127.1.6.2', 1162, null);
|
||||
if (getenv('SNMPSIM')) {
|
||||
$snmpsim->fork();
|
||||
$snmpsim->fork(6);
|
||||
|
||||
// make PHP hold on a reference to $snmpsim so it doesn't get destructed
|
||||
register_shutdown_function(function (Snmpsim $ss) {
|
||||
|
Reference in New Issue
Block a user