]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mac80211: don't process work item with wrong frame
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 11 May 2010 10:42:04 +0000 (12:42 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 May 2010 20:28:52 +0000 (16:28 -0400)
commitb8d92c9c141ee3dc9b3537b1f0ffb4a54ea8d9b2
tree9dee2ac8738e17242e2c891e8941dd43ca9c9189
parent562db532760827f6ce30801a08e6b568848bc9f2
mac80211: don't process work item with wrong frame

When we process a frame, we currently just match it
to the work struct by the MAC addresses, and not by
the work type. This means that we can end up doing
the work for an association request item when (for
whatever reason) we receive another frame type, for
example a probe response. Processing the wrong type
of frame will lead to completely invalid data being
processed, and will lead to various problems like
thinking the association was successful even if the
AP never sent an assocation response.

Fix this by making each processing function check
that it is invoked for the right work struct type
only and continue processing otherwise (and drop
frames that we didn't expect).

This bug was uncovered during the debugging for
https://bugzilla.kernel.org/show_bug.cgi?id=15862
but doesn't seem to be the cause for any of the
various problems reported there.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/work.c