Running wpa_supplicant and hostapd on the same machine

Panagiotis Georgopoulos panos
Thu Apr 7 09:38:27 PDT 2011

So, following this up, I tried to run hostapd using the wired driver and interface=lo so
that it listens on local host and I get the following error : 


root at mr1:/#hostapd -dd /etc/hostapd.wired.conf.local

Configuration file: /etc/hostapd.wired.conf.local

Opening raw packet socket for ifindex 1

Invalid HW-addr family 0x0304

wired driver initialization failed.

ELOOP: remaining socket: sock=3 eloop_data=0x86c3e60 user_data=(nil) handler=0x8074930 


Does anyone know where can I find more information about the "Invalid HW-addr family
0x0304" error and how can I solve that? Jouni any ideas?


I also tried to use interface=eth0 and then bridge the local host (lo) interface with eth0
using bridge-utils but that failed as well. I could not add "lo" to a bridge


Any ideas would be much appreciated,

Thanks a lot,




From: hostap-bounces at [mailto:hostap-bounces at] On Behalf Of
Panagiotis Georgopoulos
Sent: 07 April 2011 14:40
To: 'thirumalai Ath'
Cc: hostap at
Subject: RE: Running wpa_supplicant and hostapd on the same machine


You are very right; that's one of the things I thought might be problematic. Do you have
any recommendations on this?


I was thinking of using wired driver and also ap_scan=0,  scan_ssid=0 and  eapol_flags=0
on wpa_supplicant to do that, and instead of doing interface=eth0 to do interface=lo. 


I guess there is only one way to see if that works. to try it out!







From: thirumalai Ath [mailto:thirumalai.wlan at] 
Sent: 06 April 2011 12:54
To: Panagiotis Georgopoulos
Cc: hostap at
Subject: Re: Running wpa_supplicant and hostapd on the same machine


I think your wifi driver need to support for this.

On Wed, Apr 6, 2011 at 4:34 AM, Panagiotis Georgopoulos <panos at> wrote:

Hello all,


               Here is a bit of a crazy idea; has anyone run wpa_supplicant and hostapd on
the same machine?


               What I want to do, is be able to authenticate a machine with a backend AAA
server and send its accounting information there, over for example an Ethernet connection
or 3G on that same box (and not an Access point one hop away). So I was thinking of
configuring and running both wpa_supplicant and hostapd to use the lo (local host
interface) to communicate with each other for the pass over of credentials and the
encapsulation of EAP packets to AAA IP packets, and configure hostapd (with the wired.conf
configuration) to talk to a backend AAA server. 


               Would that be possible and how? 


I realize that this is a very simplistic way to put this and overkill for wpa_supplicant
and hostapd, but does anyone have a better alternative?


               Thanks a lot in advance,


HostAP mailing list
HostAP at


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Hostap mailing list