hostapd + madwifi + bridge not working

Sebastián González s.gonzalez
Mon May 8 03:52:27 PDT 2006


I can't get my hostapd + madwifi-ng + bridge configuration to work.

When I attempt to connect wirelessly to my Gentoo PC using a Mac OS X  
10.4 machine, I get the following in the logs:

May  5 02:38:53 [hostapd] ath0: STA 00:30:65:1c:4a:c2 IEEE 802.11:  
associated
May  5 02:38:56 [hostapd] ath0: STA 00:30:65:1c:4a:c2 IEEE 802.11:  
deauthenticated due to local deauth request
May  5 02:38:56 [hostapd] ath0: STA 00:30:65:1c:4a:c2 IEEE 802.11:  
disassociated

Even if hostapd.conf contains the line "bridge=br0", the WPA key  
exchange packets seem to be eaten by the bridge. (There is a delay  
between the time the first line is logged and the time the other two  
lines appear in the log. This symptom seems to be exactly what the  
following document describes:

http://madwifi.org/wiki/UserDocs/HostAP

But again, "bridge=br0" in hostapd.conf is not fixing the issue.

Is the combination hostapd + madwifi-ng + bridge supposed to work?
If I don't use hostapd (i.e. an open, unencrypted network) everything  
works fine (bridge, DNAT & Firewall (shorewall), DHCP, etc.).

I use gentoo. Package versions are:

hostapd-0.5.3
madwifi-ng-0.1531.20060427
kernel 2.6.16-gentoo-r4

My hostapd.conf is:

interface=ath0
bridge=br0
driver=madwifi
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
debug=3
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=guajira
macaddr_acl=1
accept_mac_file=/etc/hostapd/hostapd.accept
deny_mac_file=/etc/hostapd/hostapd.deny
auth_algs=1
wpa=1
wpa_psk_file=/etc/hostapd/hostapd.wpa_psk
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP

The ath0 interface is created this way:

       /sbin/wlanconfig ath0 destroy 2>/dev/null
       /sbin/wlanconfig ath0 create wlandev wifi0 wlanmode ap > /dev/ 
null
       iwconfig ath0 rate 54M auto
       iwpriv ath0 mode 0        # 0=auto, 1=11a, 2=11b, 3=11g
       iwpriv ath0 bgscan 0      # disable client background scanning

The bridge is configured in /etc/conf.d/net this way:

config_eth0=( "null" )
config_eth1=( "null" )
config_ath0=( "null" )
config_br0=( "192.168.0.1/24" )

bridge_br0=( "eth0" "eth1" "ath0" )

hostapd produces this output when started:

Configuration file: /etc/hostapd/hostapd.conf
Configure bridge br0 for EAPOL traffic.
madwifi_set_iface_flags: dev_up=0
Using interface ath0 with hwaddr 00:15:e9:83:47:bb and ssid 'guajira'
madwifi_set_ieee8021x: enabled=1
madwifi_configure_wpa: group key cipher=1
madwifi_configure_wpa: pairwise key ciphers=0xa
madwifi_configure_wpa: key management algorithms=0x2
madwifi_configure_wpa: rsn capabilities=0x0
madwifi_configure_wpa: enable WPA= 0x1
madwifi_set_iface_flags: dev_up=1
madwifi_set_key: alg=TKIP addr=00:00:00:00:00:00 key_idx=1
madwifi_set_privacy: enabled=1
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3

I (unsuccessfully) tried changing a few parameters with iwpriv and in  
hostapd.conf.
Any help will be greatly appreciated!






More information about the Hostap mailing list