-
Notifications
You must be signed in to change notification settings - Fork 0
[PW_SID:992601] [v2,1/4] netdev: check connected in channel switch event #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: workflow
Are you sure you want to change the base?
Conversation
This is taken care of by the individual cache items and if none exist, tar fails.
In an ideal world userspace should never be getting a channel switch event unless connected to an AP, but alas this has been seen at least with ath10k hardware. This causes IWD to crash since the logic assumes netdev->handshake is set.
After CSA IE parsing was added to the kernel this opened up the possibility that associations could be rejected locally based on the contents of this CSA IE in the AP's beacons. Overall, it was always possible for a local rejection but this case was never considered by IWD. The CSA-based rejection is something that can and does happen out in the wild. When this association rejection happens it desync's IWD and the kernel's state: 1. IWD begins an FT roam. Authenticates successfully, then proceeds to calling netdev_ft_reassociate(). 2. Immediately IWD transitions to a ft-roaming state and waits for an association response. 3. CMD_ASSOCIATE is rejected by the kernel in the ACK which IWD handles by sending a deauthenticate command to the kernel (since we have a valid authentication to the new BSS). 4. Due to a bug IWD uses the target BSSID to deauthenticate which the kernel rejects since it has no knowledge of this auth. This error is not handled or logged. 5. IWD proceeds, assuming its deauthenticated, and transitions to a disconnected state. The kernel remains "connected" which of course prevents any future connections. A simple fix for this is to address the bug (4) in IWD that deauths using the current BSS roam target. This is actually legacy behavior from back when IWD used CMD_AUTHENTICATE. Today the kernel is unaware that IWD authenticated so a deauth is not going to be effective. Instead we can issue a CMD_DISCONNECT. This is somewhat of a large hammer, but since the handshake and internal state has already been modified to use the new target BSS we cannot go back and maintain the existing connect (though it is _possible_, see the TODO in the patch).
In kernel 6.8 a new CMD_ASSOCIATE failure path was added which checks if the AP has a channel switch in progress. Eariler patches update IWD into handling this case better, and this new test exercises that.
|
Fetch PR Prep - Setup ELL Make Distcheck Build - Configure Make Check Make Check w/Valgrind Incremental Build with patches |
e4aa359 to
0e452d2
Compare
0e452d2 to
d035ebb
Compare
d035ebb to
25a40e4
Compare
In an ideal world userspace should never be getting a channel switch
event unless connected to an AP, but alas this has been seen at least
with ath10k hardware. This causes IWD to crash since the logic
assumes netdev->handshake is set.
src/netdev.c | 3 +++
1 file changed, 3 insertions(+)