I am not sure if this is related to the recent IEEE web site update I previously posted about.
It looks as if within the oui.txt file a mac vendor can become un-listed when the entry is enclosed in quotes, maybe an incorrect or changed entry.
Anyhow the import_oui_database function does not detect this so enters the mac address as "0:00:00 into the sql table.
I modified the import_oui_database function to detect a leading " on the mac address detected line and ignore it.
Code: Select all
/* I think IEEE use a quoted line to denote an obselete MAC address*/
/* this just replaces previous code here */
if (substr_count($row, "(hex)")) {
$begin_vendor = TRUE;
$pos = -1; //set to a default
if (substr_count($row, "\"")) {
$pos = strpos($row, "\"");
}
if ($pos == -1) {
//No quotes in row so normal decode
$vendor_mac = str_replace("-", ":", substr($row, 0, 8));
}else{
if ($pos == 0) {
//Override and set to not a vendor
$begin_vendor = FALSE;
}
}
$hex_end = strpos($row, "(hex)") + 5;
$vendor_name= trim(substr($row,$hex_end));
}