mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* update to check for valid ports * fix: Ignore ports where we only have two entries in the array, this signals bad data #1366 * Update functions.php
This commit is contained in:
@ -955,7 +955,10 @@ function is_port_valid($port, $device)
|
||||
|
||||
global $config;
|
||||
|
||||
if (strstr($port['ifDescr'], "irtual") && strpos($port['ifDescr'], "Virtual Services Platform") === false) {
|
||||
if (empty($port['ifDescr']) && empty($port['ifAlias']) && empty($port['ifName'])) {
|
||||
// If these are all empty, we are just going to show blank names in the ui
|
||||
$valid = 0;
|
||||
} elseif (strstr($port['ifDescr'], "irtual") && strpos($port['ifDescr'], "Virtual Services Platform") === false) {
|
||||
$valid = 0;
|
||||
} else {
|
||||
$valid = 1;
|
||||
|
Reference in New Issue
Block a user