Fix port association for adsl, etherlike and poe port information.

In 2c9df26bbf I broke the association of
  ports in the DB and ports just polled via SNMP for the adsl, etherlike
  and poe submodules and no one noticed. This fixes this issue. Sorry.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
This commit is contained in:
Maximilian Wilhelm
2016-02-03 21:05:42 +01:00
parent 79eab54fd9
commit 5521002b37
4 changed files with 20 additions and 13 deletions

View File

@@ -1,10 +1,10 @@
<?php
if ($port_stats[$port_id] &&
if ($port_stats[$ifIndex] &&
$port['ifType'] == 'ethernetCsmacd' &&
isset($port_stats[$port_id]['dot3StatsIndex'])) {
isset($port_stats[$ifIndex]['dot3StatsIndex'])) {
// Check to make sure Port data is cached.
$this_port = &$port_stats[$port_id];
$this_port = &$port_stats[$ifIndex];
// TODO: remove legacy check?
$old_rrdfile = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('etherlike-'.$port['ifIndex'].'.rrd');