Running wpa_supplicant and hostapd on the same machine
panos at comp.lancs.ac.uk
Mon Apr 11 08:02:53 EDT 2011
Thanks a lot for your reply, that is indeed very helpful.
> -----Original Message-----
> From: Jouni Malinen
> On Wed, Apr 06, 2011 at 12:04:36AM +0100, Panagiotis Georgopoulos wrote:
> > Here is a bit of a crazy idea; has anyone run
> > and hostapd on the same machine?
> Yes, all the time for testing..
Well, how do you do it exactly? Do you use the driver_test.c approach that
you mention bellow or another approach?
I am guessing here, that any another approach would involve getting the
hostapd to listen to the local host or Ethernet interface (?) with the wired
driver (?) and the wpa_supplicant to send to that interface with the
wireless drivers and many of its functions off (e.g. ap_scan=0, scan_ssid=0
and eapol_flags=0). Am I right?
> > What I want to do, is be able to authenticate a machine
> > 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
> > the wired.conf configuration) to talk to a backend AAA server.
> I'm not sure what exactly you are trying to do, but for the
> authentication part, you can use eapol_test that has both EAPOL
> authenticator and supplicant linked in together with a RADIUS client
> (i.e., authentication component of hostapd and wpa_supplicant in a
> single program).
Well, using eapol_test is interesting, however it is missing the accounting
functionality (and NAS parts) of hostapd. E.g. to send start-stop Accounting
requests to the AAA server etc.
> If you want to run hostapd and wpa_supplicant separately, you can use
> them with the driver_test.c driver wrapper instead of trying to use real
> wireless drivers over the lo interface. driver_test.c uses a UNIX domain
> socket for exchanging the packets and events between the processes. I'm
> not sure what kind of accounting information you are planning on
> sending, so that may require additional changes.
Well it seems that hostapd cannot listen to the lo interface so that's not
an option. I'll check driver_test.c because it might provide exactly what I
need. I would prefer keeping wpa_supplicant and hostapd separated, so that
might be the way to go, since hostapd will do the usual Accounting stuff
that it does when it is acting as an AP.
Incidentally, am I wrong in thinking that hostapd informs in a set interval
(or when the client disconnects) the AAA server of the client network usage
(e.g. Kbytes sent/received) so that the AAA server would keep correct
accounting information for that client?
> Jouni Malinen PGP id EFC895FA
Thanks a lot,
More information about the HostAP