Bug 64427 - ether_line is broken
Summary: ether_line is broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-04 18:06 UTC by Matthew Kirkwood
Modified: 2016-11-24 15:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-12-15 20:10:19 UTC
Embargoed:


Attachments (Terms of Use)
ether_aton example -- works fine (207 bytes, text/plain)
2002-05-04 18:07 UTC, Matthew Kirkwood
no flags Details
ether_line example -- busted! (315 bytes, text/plain)
2002-05-04 18:07 UTC, Matthew Kirkwood
no flags Details

Description Matthew Kirkwood 2002-05-04 18:06:19 UTC
The "ether_line" function from <netinet/ether.h> misparses lines in /etc/ethers
format -- it gets the MAC address wrong.  I will attach two programs, one uses
just "ether_aton" and works fine, one does "ether_line" and loses the high
nibble from each byte in the MAC address.

First one:
$ ./et 00:c0:f0:46:5f:97
orig=00:c0:f0:46:5f:97; new=0:c0:f0:46:5f:97

Second one:
$ echo -n 00:c0:f0:46:5f:97 fooop | ./et2
orig="00:c0:f0:46:5f:97 fooop"; new="0:0:0:6:f:7"/"fooop"

Matthew.

Comment 1 Matthew Kirkwood 2002-05-04 18:07:14 UTC
Created attachment 56345 [details]
ether_aton example -- works fine

Comment 2 Matthew Kirkwood 2002-05-04 18:07:38 UTC
Created attachment 56346 [details]
ether_line example -- busted!

Comment 3 Jakub Jelinek 2002-05-23 17:06:24 UTC
Fixed by http://sources.redhat.com/ml/libc-hacker/2002-05/msg00036.html

Comment 4 Alan Cox 2002-12-15 20:10:19 UTC
Confirmed ok in 8.0


Note You need to log in before you can comment on or make changes to this bug.