Use full name for vendor_oui (#15234)

* Use full name for vendor_oui

* trimmed

* typo

* more spaces to remove

* don't set $short_vendor

* keep line return

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
PipoCanaja
2023-08-21 23:13:28 +02:00
committed by GitHub
parent 3b7185d825
commit 99cfbf1d63

View File

@@ -104,7 +104,7 @@ class MaintenanceFetchOuis extends LnmsCommand
continue;
}
[$oui, $vendor] = str_getcsv($csv_line, "\t");
[$oui, , $vendor] = str_getcsv($csv_line, "\t"); // index 1 = short vendor
$oui = strtolower(str_replace(':', '', $oui)); // normalize oui
$prefix_index = strpos($oui, '/');
@@ -119,6 +119,8 @@ class MaintenanceFetchOuis extends LnmsCommand
$oui = substr($oui, 0, $substring_length);
}
$vendor = trim($vendor);
$oui = trim($oui);
// Add to the list of vendor ids
$ouis[] = [