IEEE Vendor shows mac address with leading quote

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
jab50
Posts: 13
Joined: Wed Aug 26, 2015 3:46 am

IEEE Vendor shows mac address with leading quote

Post by jab50 »

When you list the Vendor Macs in cacti a small number of them start with a leading quote instead of being the normal 3 hex values.
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));
			}
rkr321
Posts: 7
Joined: Wed Aug 26, 2015 3:08 am

Re: IEEE Vendor shows mac address with leading quote

Post by rkr321 »

Hi,

Do you run Cacti 088f ?

There are several plugins experiencing issues with quotes :cry:

RKR
jab50
Posts: 13
Joined: Wed Aug 26, 2015 3:46 am

Re: IEEE Vendor shows mac address with leading quote

Post by jab50 »

Yes I am now running 88f having just upgraded from 88b on Ubuntu 14.04.1 LTS , hence having spent a bit of time tweaking it again.
Also mactrack 2.9; thold 0.5; and weathermap 0.97b these all seem to be running fine.

I wouldn't think this particular issue with quotes would affect any other plugins as it relates to importing an external suppliers file for mactrack. What plugins are you having issues with?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest