Strange disconnect problem madwifi+wpa_supplicant+bridging

Matt Reedy mreedy
Thu Sep 21 09:22:57 PDT 2006


I have a very unusual problem that may or may not be related to
wpa_supplicant, but I hope the hostap list can assist.  Perhaps I'm just
missing something simple.  My configuration is as follows:

Enterprise  -------> D-Link     -----> (ath0) Atheros AR5212
Network            DWL-AG700AP             Custom embedded system
Switch             (basic WPA)            Marvell Ethernet 
                                          switch (eth0) ---> digital camera

The embedded system is running a Busybox-uClibc-based Linux 2.4.25 kernel
with MADWifi 0.9.2, wpa_supplicant 5.5 and bridging utilities.  The MADWifi
diagnostics are:

ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413,
REGOPS_FUNC)
wlan: 0.8.4.2 (0.9.2)
ath_rate_sample: 1.2 (0.9.2)
ath_pci: 0.9.4.5 (0.9.2)
wifi0: mac 5.9 phy 4.3 radio 3.6

wpa_supplicant config file is:

network={
     ssid="Armida"
      key_mgmt=WPA-PSK
      pairwise=CCMP TKIP
      group=CCMP TKIP
      scan_ssid=1
      proto=WPA
      psk=b4b066d4cc.
}

The enterprise network is a class C network, and I have the embedded system
configured with bridging between ath0 and eth0 as follows:

ath0      Link encap:Ethernet  HWaddr 00:02:6F:42:1C:C3  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:396033 errors:0 dropped:0 overruns:0 frame:0
          TX packets:963 errors:5 dropped:5 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:29235023 (27.8 MiB)  TX bytes:102455 (100.0 KiB)

br0       Link encap:Ethernet  HWaddr 00:02:6F:42:1C:C3  
          inet addr:XX.XX.XX.125  Bcast:10.255.255.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:396055 errors:0 dropped:0 overruns:0 frame:0
          TX packets:183 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:23688603 (22.5 MiB)  TX bytes:17906 (17.4 KiB)

eth0      Link encap:Ethernet  HWaddr 00:50:C2:28:60:F0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:474 errors:4294967289 dropped:0 overruns:0 frame:0
          TX packets:395229 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:33900 (33.1 KiB)  TX bytes:32701513 (31.1 MiB)
          Interrupt:43 

Ath0 is configured as follows (when associated with the DWL-AG700AP):

ath0      IEEE 802.11g  ESSID:"Armida"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:11:95:D1:FF:A3

          Bit Rate:6 Mb/s   Tx-Power:19 dBm   Sensitivity=0/3  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:A011-FF93-65B1-9B62-FA47-A468-0F2F-0E6C   Security
mode:restricted
          Power Management:off
          Link Quality=36/94  Signal level=-59 dBm  Noise level=-95 dBm
          Rx invalid nwid:8441503  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

>From the enterprise network, I can successfully ping and interact with
(telnet, SCP, etc.) XX.XX.XX.125 (the embedded system).  

>From the embedded system, I can successfully ping nodes on both the
enterprise network and the digital camera attached to the eth0 interface (IP
address XX.XX.XX.126).  

But when I try to ping the digital camera (XX.XX.XX.126) from the enterprise
network, the WiFi interface begins behaving very strangely.  It only happens
when I ping the specific IP address of the device connected to the eth0
interface on the embedded system.  

The behavior is: 

the Encryption key cycles rapidly through a number of different keys 
'iwconfig' reports "Encryption key: off" for a few seconds 
Then the encryption key continues cycling 
 
During this whole time, the Link Quality and Signal levels remain exactly
the same as shown above.

All this occurs while the ping from the enterprise network is active.  As
soon as I stop the ping, the Encryption key stabilizes on a single value,
and the link resumes normal operation.

This problem does not occur if I configure the embedded system as an AP and
connect to it from my laptop as a client (but I haven't tried it with wpa in
this scenario).

Here is the debug output from wpa_supplicant.  Can you please help me see
what I'm overlooking?  Thank you.

Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver
'madwifi' ctrl_interface 'N/A' bridge 'br0'

Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Line: 1 - start of a new network block
ssid - hexdump_ascii(len=6):
     41 72 6d 69 64 61                                 Armida          
key_mgmt: 0x2
pairwise: 0x10
proto: 0x1
scan_ssid=1 (0x1)
PSK - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='Armida'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: too old (short) data - assuming WPA is not supported
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:02:6f:42:1c:c3
Receiving packets from bridge interface 'br0'
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_set_countermeasures: enabled=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Added interface ath0
RTM_NEWLINK: operstate=0 ifi_flags=0x1102 ()
Wireless event: cmd=0x8b06 len=8
Ignore event for foreign ifindex 3
RTM_NEWLINK: operstate=0 ifi_flags=0x1103 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1103 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
RTM_NEWLINK: operstate=0 ifi_flags=0x1143 ([UP][RUNNING])
Wireless event: cmd=0x8b1a len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x1143 ([UP][RUNNING])
Wireless event: cmd=0x8b19 len=12
Received 4095 bytes of scan results (17 BSSes)
Scan results: 17
Selecting BSS from priority group 0
0: 00:11:95:d1:ff:a3 ssid='' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   skip - SSID mismatch
1: 00:11:95:d1:ff:a3 ssid='Armida' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   selected based on WPA IE
Trying to associate with 00:11:95:d1:ff:a3 (SSID='Armida' freq=2462 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 1
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01
00 00 50 f2 04 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50
f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_madwifi_associate
wpa_driver_madwifi_associate: SETMLME[ASSOC] failed
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RTM_NEWLINK: operstate=0 ifi_flags=0x1143 ([UP][RUNNING])
Wireless event: cmd=0x8b1a len=19
RTM_NEWLINK: operstate=0 ifi_flags=0x1143 ([UP][RUNNING])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:11:95:d1:ff:a3
State: ASSOCIATING -> ASSOCIATED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=00:11:95:d1:ff:a3
No keys have been configured - skip key clearing
Associated with 00:11:95:d1:ff:a3
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
Cancelling scan request
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
RTM_NEWLINK: operstate=0 ifi_flags=0x1143 ([UP][RUNNING])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
BSSID 00:11:95:d1:ff:a3 blacklist count incremented to 2
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
.

It seems like the relevant items are:

RTM_NEWLINK: operstate=0 ifi_flags=0x1143 ([UP][RUNNING])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00

I don't understand why simply pinging the device at the other end of the
link would case a NEWLINK operation to occur.

Thanks for any advice you can provide.

Matt







More information about the Hostap mailing list