Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-MAC-Vendor CPAN distribution.

Report information
The Basics
Id: 48771
Status: rejected
Priority: 0/
Queue: Net-MAC-Vendor

People
Owner: Nobody in particular
Requestors: lee [...] ee.ucl.ac.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in "fetch_oui_from_cache"; Possible fix included
Date: Mon, 17 Aug 2009 15:38:45 +0100
To: bug-Net-MAC-Vendor [...] rt.cpan.org
From: Lee Heagney <lee [...] ee.ucl.ac.uk>
Brian, I'm using the VERY useful Net::MAC::Vendor module (thanks for making this available), but I have just ran into a problem which causes it to hang. I've tested this using: Dist: Net-MAC-Vendor-1.18 OS: CentOS Linux (5.3) 2.6.18-128.2.1.el5 #1 SMP x86_64 GNU/Linux Perl: 5.8.8 (Custom built, not the CentOS distributed perl) MAC: 05:25:05:7b:6a:b2 After a swift bit of investigation it seems to be a problem with the "fetch_oui_from_cache" function (I am loading the oui data from a local file). When I use a valid MAC address, this works as normal, but if I use a MAC address that is not found in the oui datafile (i.e 05:25:05:7b:6a:b2), this function call hangs and never returns. There is probably a more elegant way to do this, but this is fixed if I replace line 225: exists $Cached->{ $mac } ? $Cached->{ $mac } : (); with exists $Cached->{ $mac } ? $Cached->{ $mac } : []; I've also tested the original module on Solaris 9 (Generic_122300-26 sun4u sparc SUNW,Ultra-2), using perl 5.8.7 and it doesn't seem to have this bug. The fix described above also seems to behave as expected on this solaris/perl combination. If you need any more info then please get in touch. Cheers, Lee. ********************************************** Lee Heagney System administrator Dept Electronic & Electrical Engineering University College London Torrington Place London TEL 020 7679 3960 WC1E 7JE FAX 020 7388 9325
I don't think that patch should work. You've changed the return value in the failure case from a list of no items to a list of one item (the empty array ref). Can you provide a short working example script that illustrates the problem and what you are doing? Thanks,