mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Use ifName if ifDescr is blank
* Add if statement for ROS os when querying remote port id for LLDP map * Apply ifDescr fix in ports polling instead.
This commit is contained in:
committed by
Neil Lathwood
parent
9a84a53a3f
commit
f66d73de89
@@ -525,7 +525,13 @@ foreach ($ports as $port) {
|
||||
// FIXME use $q_bridge_mib[$this_port['ifIndex']] to see if it is a trunk (>1 array count)
|
||||
echo 'VLAN == '.$this_port['ifVlan'];
|
||||
|
||||
// When devices do not provide ifAlias data, populate with ifDescr data if configured
|
||||
// When devices do not provide ifDescr data, populate with ifName data if available
|
||||
if ($this_port['ifDescr'] == '' || $this_port['ifDescr'] == null) {
|
||||
$this_port['ifDescr'] = $this_port['ifName'];
|
||||
d_echo('Using ifName as ifDescr');
|
||||
}
|
||||
|
||||
// When devices do not provide ifAlias data, populate with ifDescr data if configured
|
||||
if ($this_port['ifAlias'] == '' || $this_port['ifAlias'] == null) {
|
||||
$this_port['ifAlias'] = $this_port['ifDescr'];
|
||||
d_echo('Using ifDescr as ifAlias');
|
||||
|
Reference in New Issue
Block a user