Bug 64427

Summary: ether_line is broken
Product: [Retired] Red Hat Linux Reporter: Matthew Kirkwood <matthew>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-15 20:10:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ether_aton example -- works fine
none
ether_line example -- busted! none

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