Bug#524559: The get_mac function always returns unknown

Franck Joncourt franck.mail at dthconnex.com
Sat Apr 18 01:09:52 UTC 2009


Package: libnet-arp-perl
Version: 1.0.3-1
Severity: normal

The get_mac function always returns "unknown" whatever interface is
looked for.

The device argument of the get_mac function must be defined out of the
CODE scope in ARP.xs. The current behavior creates an undefined string
which is passed to the get_mac_linux function.

I have enclosed a patch.

Before the patch:
$ LC_ALL=C perl -MNet::ARP -e '$mac = Net::ARP::get_mac("eth2"); print
"$mac\n"'
ioctl SIOCGIFHWADDR: No such device
unknown

After the patch:
$ perl -MNet::ARP -e '$mac = Net::ARP::get_mac("eth2"); print "$mac\n"'
00:08:a1:96:82:35

I also noticed that the debian package does not fail to build despite of
the test on get_mac. The Debian test does not handle multiple interfaces
neither. I have an update in my current working copy, I will check that
tomorrow.

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_mac.diff
Type: text/x-diff
Size: 834 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20090418/86958828/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20090418/86958828/attachment-0001.pgp>


More information about the pkg-perl-maintainers mailing list