Subject: kern/7997: no emulation for linux SIOCGIFHWADDR
To: None <gnats-bugs@gnats.netbsd.org>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: netbsd-bugs
Date: 07/14/1999 17:50:45
>Number:         7997
>Category:       kern
>Synopsis:       no emulation for linux SIOCGIFHWADDR
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 14 17:50:00 1999
>Last-Modified:
>Originator:     John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release:        NetBSD-current, 1999-07-12
>Environment:
	
System: NetBSD kolvir.arlington.ma.us 1.4F NetBSD 1.4F (KOLVIR) #0: Mon Jul 12 19:09:08 EDT 1999 jtk@kolvir.arlington.ma.us:/usr/u4/sandbox/src/sys/arch/i386/compile/KOLVIR i386


>Description:
no emulation for SIOCGIFHWADDR


>How-To-Repeat:
Use a linux program that calls ioctl() for SIOCGIFHWADDR.  Get EINVAL:

 12868 program CALL  ioctl(0x3,_IO('<89>',0x27,0),0xefbfca90)
 12868 program RET   ioctl -1 errno -22 Invalid argument

>Fix:
The call takes a struct ifreq with ifr_name set to the interface name.
The emulation should probably convert from "eth0" to the first ethernet
interface, from "eth1" to the second, etc.
>Audit-Trail:
>Unformatted: