Skip to content

Commit

Permalink
mac80211: clear TX control on filtered frames
Browse files Browse the repository at this point in the history
When an skb survived a round-trip through the driver
and needs to be re-used, its control information is
definitely not valid any more, the driver will have
overwritten it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jan 19, 2010
1 parent edc6ccb commit 697e6a0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions net/mac80211/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
*/
goto drop;

/*
* This skb 'survived' a round-trip through the driver, and
* hopefully the driver didn't mangle it too badly. However,
* we can definitely not rely on the the control information
* being correct. Clear it so we don't get junk there.
*/
memset(&info->control, 0, sizeof(info->control));

sta->tx_filtered_count++;

/*
Expand Down

0 comments on commit 697e6a0

Please sign in to comment.