Bug 64427 - ether_line is broken
ether_line is broken
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-04 14:06 EDT by Matthew Kirkwood
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 15:10:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Matthew Kirkwood 2002-05-04 14:06:19 EDT
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 14:07:14 EDT
Created attachment 56345 [details]
ether_aton example -- works fine
Comment 2 Matthew Kirkwood 2002-05-04 14:07:38 EDT
Created attachment 56346 [details]
ether_line example -- busted!
Comment 3 Jakub Jelinek 2002-05-23 13:06:24 EDT
Fixed by http://sources.redhat.com/ml/libc-hacker/2002-05/msg00036.html
Comment 4 Alan Cox 2002-12-15 15:10:19 EST
Confirmed ok in 8.0

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