Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Jul 21, 2017 5:55 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: IEEE Vendor shows mac address with leading quote
PostPosted: Tue Sep 01, 2015 5:37 am 
Offline

Joined: Wed Aug 26, 2015 3:46 am
Posts: 9
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:
         /* 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));
         }


Top
 Profile  
 
 Post subject: Re: IEEE Vendor shows mac address with leading quote
PostPosted: Mon Sep 14, 2015 1:54 pm 
Offline

Joined: Wed Aug 26, 2015 3:08 am
Posts: 7
Hi,

Do you run Cacti 088f ?

There are several plugins experiencing issues with quotes :cry:

RKR


Top
 Profile  
 
 Post subject: Re: IEEE Vendor shows mac address with leading quote
PostPosted: Wed Sep 16, 2015 3:29 am 
Offline

Joined: Wed Aug 26, 2015 3:46 am
Posts: 9
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group