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ljaWFsIHNuYXBzaG90IHJlbGVhc2Ug
MC44LXNuYXBzaG90DQoyLiBUcmllZCBib3RoIGtlcm5lbCAyLjYuMzgtcmMzIGFuZCAyLjYuMzgt
cmM0LiANCjMuIGF0aDlrIG9wZXJhdGVzIG92ZXIgQVI5MzgwIGNoaXBzZXQNCjQuIHdwYV9zdXBw
bGljYW50LTAuNy4zIGlzIHVzZWQgZm9yIGNsaWVudCB0ZXN0Lg0KDQo=


2011-02-10 22:07:06

by Chaoxing Lin

[permalink] [raw]
Subject: RE: FW: hostapd problem on reconfig (SIGHUP)


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:[email protected]]
Sent: Thursday, February 10, 2011 3:40 PM
To: Chaoxing Lin
Cc: [email protected]
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


Attachments:
ar9380-pair (41.28 kB)
ar9380-pair
ar9380-sta (173.00 B)
ar9380-sta
Download all attachments

2011-02-10 18:37:20

by Sedat Dilek

[permalink] [raw]
Subject: Re: FW: hostapd problem on reconfig (SIGHUP)

Please, see the wiki at <wireless.kernel.org>, especially [1] and [2].

- Sedat -

[1] http://wireless.kernel.org/en/users/Support
[2] http://wireless.kernel.org/en/developers/MailingLists

On Thu, Feb 10, 2011 at 3:55 PM, Chaoxing Lin <[email protected]> wrote:
> Sorry if this message is duplicate.
>
> I am confused which email address to send.
> [email protected] or [email protected]
>
>
>
> -----Original Message-----
> From: Chaoxing Lin
> Sent: Wednesday, February 09, 2011 5:23 PM
> To: '[email protected]'
> Subject: hostapd problem on reconfig (SIGHUP)
>
>
> Hello Experts,
>
> I see a problem while testing the latest hostapd/kernel/wpa_supplicant. I believe the problem in on hostapd side.
> It is easy to recreate the problem. So it can be an easy fix for hostapd maintainer.
>
> Thanks
>
>
> Problem: hostapd not working after SIGHUP signal
>
> Symptoms
>
> 1. If there's a client associated, a SIGHUP signal to hostapd can cause problem that no clients can associate (almost 100% reproducible)
>
> 2. "segmentation fault" happens a few times(not all the time)  to hostapd by repeating SIGHUP and SIGUSR1 to hostapd.
>
> 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.
>
>
> Some facts:
>     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.
>
>     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?).
>
>     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"
>
>     d. Tried to use new client to associate. No success.
>        Both old and clients stuck
>
> Workaround:
>
>          Do NOT use SIGHUP. User has to kill hostapd and restart hostapd.
>
> Software version info:
> 1. hostapd-0.7.3 and the latest unofficial snapshot release 0.8-snapshot
> 2. Tried both kernel 2.6.38-rc3 and 2.6.38-rc4.
> 3. ath9k operates over AR9380 chipset
> 4. wpa_supplicant-0.7.3 is used for client test.
>
>

2011-02-10 20:40:14

by Jouni Malinen

[permalink] [raw]
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

2011-02-10 20:25:16

by Joerg

[permalink] [raw]
Subject: Re: FW: hostapd problem on reconfig (SIGHUP)

Chaoxing Lin <CLin@...> writes:
> I am confused which email address to send.
> linux-wireless <at> vger.kernel.org or [email protected]
>

For hostaps it is neither. Use [email protected].

Regards
Joerg