mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Generalise mapping ifDescr to ifAlias
This allows both per OS enforcing of ifDescr = ifAlias as well as populating when ifAlias = '' or NULL
This commit is contained in:
@@ -325,9 +325,9 @@ foreach ($ports as $port) {
|
||||
echo 'VLAN == '.$this_port['ifVlan'];
|
||||
|
||||
// When devices do not provide ifAlias data, populate with ifDescr data if configured
|
||||
if (($this_port['ifAlias'] == '' || $this_port['ifAlias'] == NULL) && $config['os'][$device['os']]['ifalias_null'] == 1) {
|
||||
if ($this_port['ifAlias'] == '' || $this_port['ifAlias'] == NULL) || ($config['os'][$device['os']]['descr_to_alias'] == 1) {
|
||||
$this_port['ifAlias'] = $this_port['ifDescr'];
|
||||
d_echo('Using ifDescr due to ifAlias being NULL');
|
||||
d_echo('Using ifDescr as ifAlias');
|
||||
}
|
||||
|
||||
// Update IF-MIB data
|
||||
|
Reference in New Issue
Block a user