mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
bug - ADSL ifIndex to port error not handled (#15617)
* fix * add an error message
This commit is contained in:
@@ -150,6 +150,12 @@ class Xdsl implements Module
|
|||||||
|
|
||||||
$portAdsl->port_id = $os->ifIndexToId($ifIndex);
|
$portAdsl->port_id = $os->ifIndexToId($ifIndex);
|
||||||
|
|
||||||
|
if ($portAdsl->port_id == 0) {
|
||||||
|
// failure of ifIndexToId(), port_id is invalid, and syncModels will crash
|
||||||
|
echo ' ADSL( Failed to discover this port, ifIndex invalid : ' . $portAdsl->adslLineCoding . '/' . Number::formatSi($portAdsl->adslAtucChanCurrTxRate, 2, 3, 'bps') . '/' . Number::formatSi($portAdsl->adslAturChanCurrTxRate, 2, 3, 'bps') . ') ';
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($datastore) {
|
if ($datastore) {
|
||||||
$this->storeAdsl($portAdsl, $data, (int) $ifIndex, $os, $datastore);
|
$this->storeAdsl($portAdsl, $data, (int) $ifIndex, $os, $datastore);
|
||||||
echo ' ADSL(' . $portAdsl->adslLineCoding . '/' . Number::formatSi($portAdsl->adslAtucChanCurrTxRate, 2, 3, 'bps') . '/' . Number::formatSi($portAdsl->adslAturChanCurrTxRate, 2, 3, 'bps') . ') ';
|
echo ' ADSL(' . $portAdsl->adslLineCoding . '/' . Number::formatSi($portAdsl->adslAtucChanCurrTxRate, 2, 3, 'bps') . '/' . Number::formatSi($portAdsl->adslAturChanCurrTxRate, 2, 3, 'bps') . ') ';
|
||||||
|
Reference in New Issue
Block a user