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: 101011
Status: patched
Priority: 0/
Queue: Net-MAC-Vendor

People
Owner: Nobody in particular
Requestors: mschmidt [...] ocedo.com
Cc:
AdminCc:

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

Attachments


Subject: DOS line-breaks not handled properly
Date: Fri, 19 Dec 2014 15:23:27 +0100
To: bug-Net-MAC-Vendor [...] rt.cpan.org
From: Mario Schmidt <mschmidt [...] ocedo.com>
Download (untitled) / with headers
text/plain 298b
Hello maintainer, I think there's an issue with Net::MAC::Vendor v1.23 regarding line-breaks. IEEE seems to have changed the file format of oui.txt to contain DOS line-breaks (\r\n) which the module does not handle and results in $Cached being empty. Thanks for your hard work! Mario Schmidt
Download (untitled) / with headers
text/plain 232b
I checked the oui.txt file and only see unix line endings. Can you show me what you were doing? Did you download the file yourself? Can you look at http://www.ieee.org/netstorage/standards/oui.txt directly and tell me what you see?
Subject: Re: [rt.cpan.org #101011] DOS line-breaks not handled properly
Date: Thu, 08 Jan 2015 09:18:05 +0100
To: bug-Net-MAC-Vendor [...] rt.cpan.org
From: Mario Schmidt <mschmidt [...] ocedo.com>
Download (untitled) / with headers
text/plain 1.7k
Hi, sorry for the delay, back to work now! $ wget http://www.ieee.org/netstorage/standards/oui.txt --2015-01-08 08:52:54-- http://www.ieee.org/netstorage/standards/oui.txt Resolving www.ieee.org (www.ieee.org)... 23.209.167.233 Connecting to www.ieee.org (www.ieee.org)|23.209.167.233|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 3534183 (3,4M) [text/plain] Saving to: ‘oui.txt’ 100%[==================================================================================================>] 3.534.183 2,74MB/s in 1,2s 2015-01-08 08:52:56 (2,74 MB/s) - ‘oui.txt’ saved [3534183/3534183] $ file oui.txt oui.txt: UTF-8 Unicode text, with CRLF line terminators So the oui.txt from the URL contains carriage return, line feed line-breaks. Net::MAC::Vendor does not handle these: perl -e "use Data::Dumper; use File::Spec; use Net::MAC::Vendor; Net::MAC::Vendor::load_cache('file://'.File::Spec->rel2abs('oui.txt')); print scalar keys \$Net::MAC::Vendor::Cached;" 0 Converting the oui.txt to Unix line-breaks makes it work: $ dos2unix oui.txt dos2unix: converting file oui.txt to Unix format ... $ perl -e "use Data::Dumper; use File::Spec; use Net::MAC::Vendor; Net::MAC::Vendor::load_cache('file://'.File::Spec->rel2abs('oui.txt')); print scalar keys \$Net::MAC::Vendor::Cached;" 20202 I've attached a trivial patch. Thanks for any feedback! On 27.12.2014 01:57, brian d foy via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101011 > > > I checked the oui.txt file and only see unix line endings. Can you show me what you were doing? Did you download the file yourself? > > Can you look at http://www.ieee.org/netstorage/standards/oui.txt directly and tell me what you see? >

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #101011] DOS line-breaks not handled properly
Date: Thu, 08 Jan 2015 09:27:44 +0100
To: bug-Net-MAC-Vendor [...] rt.cpan.org
From: Mario Schmidt <mschmidt [...] ocedo.com>
Download (untitled) / with headers
text/plain 225b
A, before I forget it, letting the module handle the download also fails: $ perl -e "use Data::Dumper; use File::Spec; use Net::MAC::Vendor; Net::MAC::Vendor::load_cache(); print scalar keys \$Net::MAC::Vendor::Cached;" 0


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.