Search Linux Wireless

RE: FW: hostapd problem on reconfig (SIGHUP)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Jouni,

I tested the source in jit (git clone git://w1.fi/srv/git/hostp.git)
Here is the feedback.

1. FIXED: hostapd "segmentation fault" goes away for now.
2. FIXED: If hostap conf (ar9380-pair) is NOT changed, SIGHUP works well now. I see client is deauthenticated and reconnect well.

3. ISSUE: if conf is changed (I toggle channel between 40 and 48), then hostapd, after SIGHUP, can not associate with clients any more. This is still an issue. The difference than previous test is that "killall -SIGUSR1 hostapd" followed by "cat /tmp/hostapd.dump" does show that old client is gone.
Even for a new client added, the connection won't create. Restarting hostapd make both clients connect well. So the problem is not on client side.

I paste the screenshot of clients in the end. Both clients complain about the same thing.


Regarding my configuration file,

1. Both AP (ar9380-pair) and client (ar9380-sta) are attached. They are pretty simple. You may diff it with the default template to see the difference.

2. In real deployment, the hostapd conf won't change frequently. The concern for me is that I have multiple (up to 4) radios to control (hostapd -B radio1.conf radio2.conf). When I configure one radio, it's really a headache that the services of the other 3 radios are disrupted. It's very desirable to "not reconfigure if conf is not changed". I think the easiest way can be as follows.
a. hostapd keeps info of "file modification time" of each file.
b. on receiving SIGHUP, only interfaces with newer "file modification time" are reconfigured.


-----------------------wpa_supplicant debug message on screee---------
New scan results available
Selecting BSS from priority group 0
0: 00:0b:6b:4f:05:2e ssid='test-intel' wpa_ie_len=0 rsn_ie_len=20 caps=0x431 level=-44
   skip - SSID mismatch
1: 1c:bd:b9:ff:f6:01 ssid='DLINK-n' wpa_ie_len=0 rsn_ie_len=20 caps=0x511 level=-48
   skip - SSID mismatch
2: 00:0e:8e:30:bc:6d ssid='ath9380' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-48
   selected based on RSN IE
   selected BSS 00:0e:8e:30:bc:6d ssid='ath9380'
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
Cancelling scan request
Trying to authenticate with 00:0e:8e:30:bc:6d (SSID='ath9380' freq=5200 MHz)
No keys have been configured - skip key clearing
State: AUTHENTICATING -> AUTHENTICATING
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
nl80211: Authenticate (ifindex=6)
  * bssid=00:0e:8e:30:bc:6d
  * freq=5200
  * SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
  * IEs - hexdump(len=0): [NULL]
  * Auth Type 0
nl80211: Authentication request send successfully
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
Event 5 received on interface wlan1
nl80211: Event message available
nl80211: MLME event 37; timeout with 00:0e:8e:30:bc:6d
Event 13 received on interface wlan1
SME: Authentication timed out
Setting scan request: 5 sec 0 usec
Scan SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
Starting AP scan for wildcard SSID
nl80211: Scan SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Scan trigger
nl80211: Event message available
nl80211: New scan results available
Event 3 received on interface wlan1
Received scan results (22 BSSes)
BSS: Start scan result update 28
New scan results available
Selecting BSS from priority group 0
0: 00:0b:6b:4f:05:2e ssid='test-intel' wpa_ie_len=0 rsn_ie_len=20 caps=0x431 level=-40
   skip - SSID mismatch
1: 00:0b:6b:35:fe:12 ssid='SCOTT_FIPS_AP' wpa_ie_len=0 rsn_ie_len=20 caps=0x431 level=-49
   skip - SSID mismatch
2: 1c:bd:b9:ff:f6:01 ssid='DLINK-n' wpa_ie_len=0 rsn_ie_len=20 caps=0x411 level=-49
   skip - SSID mismatch
3: 00:0e:8e:30:bc:6d ssid='ath9380' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-49
   selected based on RSN IE
   selected BSS 00:0e:8e:30:bc:6d ssid='ath9380'
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
Cancelling scan request
Trying to authenticate with 00:0e:8e:30:bc:6d (SSID='ath9380' freq=5200 MHz)
No keys have been configured - skip key clearing
State: AUTHENTICATING -> AUTHENTICATING
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
nl80211: Authenticate (ifindex=6)
  * bssid=00:0e:8e:30:bc:6d
  * freq=5200
  * SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
  * IEs - hexdump(len=0): [NULL]
  * Auth Type 0
nl80211: Authentication request send successfully
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
Event 5 received on interface wlan1
nl80211: Event message available
nl80211: MLME event 37; timeout with 00:0e:8e:30:bc:6d
Event 13 received on interface wlan1
SME: Authentication timed out
Setting scan request: 5 sec 0 usec
Scan SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
Starting AP scan for wildcard SSID
nl80211: Scan SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Scan trigger
nl80211: Event message available
nl80211: New scan results available
Event 3 received on interface wlan1
Received scan results (17 BSSes)
BSS: Start scan result update 29
BSS: Add new id 62 BSSID 00:0b:6b:0a:ef:af SSID '3eTIguest'
BSS: Expire BSS 57 due to no match in scan
BSS: Remove id 57 BSSID 00:0b:6b:56:0d:7a SSID ''
New scan results available
Selecting BSS from priority group 0
0: 00:0b:6b:4f:05:2e ssid='test-intel' wpa_ie_len=0 rsn_ie_len=20 caps=0x431 level=-41
   skip - SSID mismatch
1: 1c:bd:b9:ff:f6:01 ssid='DLINK-n' wpa_ie_len=0 rsn_ie_len=20 caps=0x411 level=-47
   skip - SSID mismatch
2: 00:0e:8e:30:bc:6d ssid='ath9380' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-49
   selected based on RSN IE
   selected BSS 00:0e:8e:30:bc:6d ssid='ath9380'
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
Cancelling scan request
Trying to authenticate with 00:0e:8e:30:bc:6d (SSID='ath9380' freq=5200 MHz)
No keys have been configured - skip key clearing
State: AUTHENTICATING -> AUTHENTICATING
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
nl80211: Authenticate (ifindex=6)
  * bssid=00:0e:8e:30:bc:6d
  * freq=5200
  * SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
  * IEs - hexdump(len=0): [NULL]
  * Auth Type 0
nl80211: Authentication request send successfully
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
Event 5 received on interface wlan1
nl80211: Event message available
nl80211: MLME event 37; timeout with 00:0e:8e:30:bc:6d
Event 13 received on interface wlan1
SME: Authentication timed out
Setting scan request: 5 sec 0 usec
Scan SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
Starting AP scan for wildcard SSID
nl80211: Scan SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Scan trigger
nl80211: Event message available
nl80211: New scan results available
Event 3 received on interface wlan1
Received scan results (19 BSSes)
BSS: Start scan result update 30
BSS: Expire BSS 58 due to no match in scan
BSS: Remove id 58 BSSID 00:0d:97:14:91:06 SSID ''
BSS: Expire BSS 59 due to no match in scan
BSS: Remove id 59 BSSID 00:0d:97:24:91:06 SSID ''
BSS: Expire BSS 33 due to no match in scan
BSS: Remove id 33 BSSID 08:1f:f3:23:b2:c2 SSID ''
BSS: Expire BSS 50 due to no match in scan
BSS: Remove id 50 BSSID 08:1f:f3:22:c8:a2 SSID ''
BSS: Expire BSS 61 due to no match in scan
BSS: Remove id 61 BSSID 00:0d:97:04:91:06 SSID 'SpotOn'
New scan results available
Selecting BSS from priority group 0
0: 00:0b:6b:57:76:b3 ssid='' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=-35
   skip - SSID mismatch
1: 00:0b:6b:4f:05:2e ssid='test-intel' wpa_ie_len=0 rsn_ie_len=20 caps=0x431 level=-41
   skip - SSID mismatch
2: 1c:bd:b9:ff:f6:01 ssid='DLINK-n' wpa_ie_len=0 rsn_ie_len=20 caps=0x411 level=-48
   skip - SSID mismatch
3: 00:0e:8e:30:bc:6d ssid='ath9380' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-48
   selected based on RSN IE
   selected BSS 00:0e:8e:30:bc:6d ssid='ath9380'
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
Cancelling scan request
Trying to authenticate with 00:0e:8e:30:bc:6d (SSID='ath9380' freq=5200 MHz)
No keys have been configured - skip key clearing
State: AUTHENTICATING -> AUTHENTICATING
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
nl80211: Authenticate (ifindex=6)
  * bssid=00:0e:8e:30:bc:6d
  * freq=5200
  * SSID - hexdump_ascii(len=7):
     61 74 68 39 33 38 30                              ath9380         
  * IEs - hexdump(len=0): [NULL]
  * Auth Type 0
nl80211: Authentication request send successfully
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
Event 5 received on interface wlan1
nl80211: Event message available
nl80211: MLME event 37; timeout with 00:0e:8e:30:bc:6d
Event 13 received on interface wlan1
SME: Authentication timed out
Setting scan request: 5 sec 0 usec
^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan1
No keys have been configured - skip key clearing
State: AUTHENTICATING -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
No keys have been configured - skip key clearing
BSS: Remove id 19 BSSID 00:0b:6b:57:76:b3 SSID ''
BSS: Remove id 20 BSSID 00:0b:6b:4f:05:2e SSID 'test-intel'
BSS: Remove id 0 BSSID 1c:bd:b9:ff:f6:01 SSID 'DLINK-n'
BSS: Remove id 3 BSSID 00:0e:8e:30:bc:6d SSID 'ath9380'
BSS: Remove id 1 BSSID 00:0b:6b:35:fe:12 SSID 'SCOTT_FIPS_AP'
BSS: Remove id 2 BSSID 00:0b:6b:35:37:3e SSID '3FJ0hns0n'
BSS: Remove id 4 BSSID 00:0b:6b:0a:e7:d9 SSID 'VI-525V-3'
BSS: Remove id 6 BSSID 00:0b:6b:35:49:f7 SSID 'Audit'
BSS: Remove id 5 BSSID 00:0b:6b:31:3a:80 SSID 'VI-525A-3'
BSS: Remove id 7 BSSID 00:0b:6b:31:3a:9d SSID '3FJ0hns0n'
BSS: Remove id 38 BSSID 00:0b:6b:09:31:a4 SSID ''
BSS: Remove id 46 BSSID 00:0b:6b:0a:54:0c SSID '525A3AP'
BSS: Remove id 48 BSSID 08:1f:f3:23:b2:c1 SSID ''
BSS: Remove id 62 BSSID 00:0b:6b:0a:ef:af SSID '3eTIguest'
BSS: Remove id 60 BSSID 08:1f:f3:22:c8:a1 SSID ''
BSS: Remove id 11 BSSID 00:0b:6b:0a:e1:8f SSID ''
BSS: Remove id 12 BSSID 08:1f:f3:23:b2:cc SSID ''
BSS: Remove id 13 BSSID 02:2b:1b:cc:a3:cb SSID 'PJ-WIRELESS5'
BSS: Remove id 14 BSSID 2e:24:81:b6:d5:a3 SSID 'hpsetup'
Cancelling scan request
Cancelling authentication timeout
netlink: Operstate: linkmode=0, operstate=6




-----Original Message-----
From: Jouni Malinen [mailto:j@xxxxx] 
Sent: Thursday, February 10, 2011 3:40 PM
To: Chaoxing Lin
Cc: linux-wireless@xxxxxxxxxxxxxxx
Subject: Re: FW: hostapd problem on reconfig (SIGHUP)

On Thu, Feb 10, 2011 at 02:55:14PM +0000, Chaoxing Lin wrote:
> I see a problem while testing the latest hostapd/kernel/wpa_supplicant. I believe the problem in on hostapd side.

Could you please re-test with the current hostap.git snapshot?

> 1. If there's a client associated, a SIGHUP signal to hostapd can cause problem that no clients can associate (almost 100% reproducible)

I would assume the clients could still re-associate if you were to
manually request them to do so. They may not do this automatically until
the STA entry in hostapd times out (though, with the change I just added
to hostap.git, this happens immediately in case of SIGHUP).

> 2. "segmentation fault" happens a few times(not all the time) Âto hostapd by repeating SIGHUP and SIGUSR1 to hostapd.

Fixed.

> 3. Another minor thing. Actually a suggestion, hostapd does not need to re-config if configuration file is not changed. This is preferred because when hostapd controls multiple radios (e.g hostapd radio1.conf radio2.conf), itâs desirable that service on other radio is not disrupted when one of the conf is changed. 

How frequently are you changing the configuration? Is this really a big
enough issue to justify extra complexity in figuring out whether the
configuration has changed? Anyway, an easier approach would be to add a
new control interface command RECONFIGURE (which is already available in
wpa_supplicant) which would allow the reconfiguration to be done
separately for a single radio.

> ÂÂÂ a. The already associated client still thinks itself associated. This is verified by "iw wlan0 link" on client side. 
> ããIt timed out later on and can no longer associate.

The client was probably in sleep state when the AP sent out the
broadcast Deauthentication frames or for some other reason missed it at
the time. It should be able to reassociate after the timeout, though.. I
did not see issues with this in my tests.

> ÂÂÂ b. driver (ath9k in kernel 2.6.38-rc4, operate over ar9380) says it has already deauthenticated the clients per 
> ÂÂÂÂÂÂÂÂÂÂ hostapd flush instruction. This is verified by "iw wlan0 station dump" on ap side.
> ÂÂÂ ÂÂÂ I sniffed the air. Deauthentication packets (as broadcast) were sent out by driver. The associated client does not 
> ããdeauthenticate and re-associate (bug in wpa_supplicant?).

Please let me know if you can still reproduce this after having updated
hostapd to the current hostap.git snapshot.

> ÂÂÂ c. hostapd still thinks the associated client is associated, which is wrong. This is verified by "killall -SIGUSR1 hostapd"
> ÂÂÂ ÂÂ followed by "cat /tmp/hostapd.dump"

Fixed.

> ÂÂÂ d. Tried to use new client to associate. No success.
> ÂÂÂÂÂÂ Both old and clients stuck 

Strange.. I have been unable to reproduce this. What kind of hostapd
configuration are you using?

-- 
Jouni Malinen                                            PGP id EFC895FA

Attachment: ar9380-pair
Description: ar9380-pair

Attachment: ar9380-sta
Description: ar9380-sta


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux