hostapd for open network - ioctl error
Dimitris Kogias
dimitris
Fri Jan 27 23:23:05 PST 2006
Hi,
I'm trying to use hostapd to run an open AP on a madwifi-ng virtual
interface. Indidentally, I know that I don't *need* hostapd for an open
AP; I'm just using the simplest case where I can reproduce the same
symptom here to keep things cleaner.
This is all on Linux 2.6.15.1, with both hostapd 0.4.7 and 0.5.0 (same
behavior), built with the same compiler that built the kernel and
madwifi and with the exact same version of madwifi that's running in the
kernel.
I'm attaching the config file used for the open network.
When I start hostapd with this file I get:
d at greebo:~$ sudo hostapd /etc/hostapd/hostapd-ath1.conf
Configuration file: /etc/hostapd/hostapd-ath1.conf
Using interface ath1 with hwaddr 06:0f:cb:b1:b0:9c and ssid 'music'
Flushing old station entries
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
ioctl[unknown???]: Invalid argument
Could not connect to kernel driver.
Deauthenticate all stations
rmdir[ctrl_interface]: No such file or directory
madwifi_set_privacy: enabled=0
Using strace, it seems that the cause of the failure is an invalid ioctl
argument on a raw socket (grep for EINVAL below):
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, SIOCGIFINDEX, {ifr_name="ath1", ifr_index=8}) = 0
socket(PF_PACKET, SOCK_RAW, 36488) = 4
ioctl(4, SIOCGIFINDEX, {ifr_name="ath1", ifr_index=8}) = 0
bind(4, {sa_family=AF_PACKET, proto=0x888e, if8, pkttype=PACKET_HOST,
addr(0)={0, }, 20) = 0
ioctl(4, SIOCGIFHWADDR, {ifr_name="ath1", ifr_hwaddr=06:0f:cb:b1:b0:9c}) = 0
ioctl(3, SIOCSIWMODE, 0xbfad9bec) = 0
ioctl(3, SIOCGIFFLAGS, {ifr_name="ath1",
ifr_flags=IFF_BROADCAST|IFF_MULTICAST}) = 0
ioctl(3, SIOCSIFFLAGS, 0xbfad9b9c) = 0
ioctl(3, SIOCGIWESSID, 0xbfad9c10) = 0
write(1, "Using interface ath1 with hwaddr"..., 68Using interface ath1
with hwaddr 06:0f:cb:b1:b0:9c and ssid 'music'
) = 68
gettimeofday({1138432321, 343085}, NULL) = 0
time(NULL) = 1138432321
ioctl(3, SIOCGIWRANGE, 0xbfad9c00) = 0
socket(PF_NETLINK, SOCK_RAW, 0) = 5
bind(5, {sa_family=AF_NETLINK, pid=0, groups=00000001}, 12) = 0
write(1, "Flushing old station entries\n", 29Flushing old station entries
) = 29
write(1, "madwifi_sta_deauth: addr=ff:ff:f"..., 57madwifi_sta_deauth:
addr=ff:ff:ff:ff:ff:ff reason_code=3
) = 57
ioctl(3, 0x8bf0, 0xbfad9b8c) = -1 EINVAL (Invalid argument)
dup(2) = 6
fcntl64(6, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat64(6, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fc5000
_llseek(6, 0, 0xbfad95f8, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(6, "ioctl[unknown???]: Invalid argum"..., 36ioctl[unknown???]:
Invalid argument
) = 36
close(6) = 0
munmap(0xb7fc5000, 4096) = 0
write(1, "Could not connect to kernel driv"..., 36Could not connect to
kernel driver.
) = 36
However, when running hostapd on the config file for my WPA-PSK network
I have no problems.
Am I missing something obvious in the config file? Is hostapd supposed
to be able to run open APs?
Cheers
D.
--
Make history or be it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hostapd-ath1.conf
Url: http://lists.shmoo.com/pipermail/hostap/attachments/20060127/bff31314/attachment.txt
More information about the Hostap
mailing list