How to run hostpad daemon WAS: Is hostapd really necessary?

Manjunathan PY pymanju at
Mon May 12 06:10:22 EDT 2003

Hi Doug,
   It would be complete if you can add bridge setup too !
Please find the bridge setup below !

-----------------------cut here--------------------------
#Assuming that the wired interface is "eth0" and wireless interface is
#Hostap daemon running on the Linux box with IP address
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 wlan0
ifconfig eth0
ifconfig wlan0
echo "Starting to bridge br0 Assigning IP address!"
ifconfig br0 up
echo "Adding default gateway to the route table for bridge br0 "
route add default gw
-------------------------cut here--------------------------

Note: brctl application comes with bridge-utils package, can be downloaded

Manjunathan PY

-----Original Message-----
From: hostap-admin at [mailto:hostap-admin at]On Behalf Of
Douglas Held
Sent: Sunday, May 11, 2003 5:15 AM
To: Jouni Malinen
Cc: hostap at
Subject: How to run hostpad daemon WAS: Is hostapd really necessary?

To recap, then:

HOWTO: Running the hostapd userspace daemon :

1.  obtain the hostap file tree
2.  choose hardware support type and configure ./Makefile according to
3.  edit ./driver/modules/hostap_config.h : remove /*comments*/ around the
        #define PRISM2_HOSTAPD
4,  type 'make clean'
5.  type 'make plx' || 'make pccard' || 'make pci'
6.  type 'make install'
7.  cd ./hostapd
8.  type 'make'
9.  edit ./hostapd/hostapd.conf
10. copy ./hostapd/hostapd to suitable bin directory like /usr/local/bin/
11. copy ./hostapd/hostapd.conf to /etc/hostapd.conf
12. create a file such as the following in /etc/init.d :

                # filename: /etc/init.d/hostap
                case "$1" in
                        insmod hostap_crypt
                        insmod hostap_crypt_wep
                        insmod hostap
                        insmod hostap_plx
                        /usr/local/bin/hostapd -B /etc/hostapd.conf
                        echo "hostapd apparently running as pid `pidof
                        pidof hostapd > /var/run/
                        echo "Bringing down AP..."
                        kill -9 `cat /var/run/`
                        ifconfig wlan0ap down
                        rmmod hostap_plx
                        rmmod hostap
                        rmmod hostap_crypt_wep
                        rmmod hostap_crypt
                        echo "no command given"

13. Enter runlevel 3 and ensure that no scripts are bringing up the wireless
interface already.
    (This can be done by rebooting, logging in as root and typing
14. The commands '/etc/init.d/hostap start' and '/etc/init.d/hostap stop'
can now be used at will to take up and put down the AP.
15. Optionally, soft link the script created in step 12 to rc?.d
directories.  Example:
        cd /etc/rc3.d
        ln -s /etc/init.d/hostap S90hostap
        chmod +x S90hostap
        cd /etc/rc2.d
        ln -s /etc/init.d/hostap K10hostap
        chmod +x K10hostap
16. The AP should now be configured to come up and down when the router

Thanks to everyone who helped.  I hope this message will be easy for newbies
like me to find when searching the archives for help.


At 07:35 PM 5/9/2003, you wrote:
>On Fri, May 09, 2003 at 09:26:05AM -0700, doug held wrote:
>> and now I get symbol errors.  malloc?  These look like very average
symbols, and /usr/src/linux does indeed soft link to linux-2.4.20-8.
>Well, they are average _user space_ symbols..
>> /sbin/depmod -ae
>> depmod: *** Unresolved symbols in /lib/modules/2.4.20-8/net/hostapd.o
>> depmod:         malloc
>> depmod:         hostapd_flush
>How did that hostapd.o end up being copied into kernel module directory?
>It is an object file for the user space hostapd daemon and it most
>certainly should not be in that directory. hostapd.o is created when you
>run 'make' in hostapd directory. However, I don't think 'make install'
>in any directory should copy it anywhere..
>Jouni Malinen                                            PGP id EFC895FA
>HostAP mailing list
>HostAP at

HostAP mailing list
HostAP at

More information about the HostAP mailing list