Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254896
b: refs/heads/master
c: 3445951
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 7, 2011
1 parent 2654326 commit 7a92b77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1186980dafcd14d0e257a4dd6990cefdc6f3e362
refs/heads/master: 34459512ffa7236c849466e3bd604801389734e1
16 changes: 13 additions & 3 deletions trunk/net/mac80211/wpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
int queue = rx->queue;

/* otherwise, TKIP is vulnerable to TID 0 vs. non-QoS replays */
if (rx->queue == NUM_RX_DATA_QUEUES - 1)
queue = 0;

/*
* it makes no sense to check for MIC errors on anything other
Expand Down Expand Up @@ -148,8 +153,8 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)

update_iv:
/* update IV in key information to be able to detect replays */
rx->key->u.tkip.rx[rx->queue].iv32 = rx->tkip_iv32;
rx->key->u.tkip.rx[rx->queue].iv16 = rx->tkip_iv16;
rx->key->u.tkip.rx[queue].iv32 = rx->tkip_iv32;
rx->key->u.tkip.rx[queue].iv16 = rx->tkip_iv16;

return RX_CONTINUE;

Expand Down Expand Up @@ -241,6 +246,11 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx)
struct ieee80211_key *key = rx->key;
struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
int queue = rx->queue;

/* otherwise, TKIP is vulnerable to TID 0 vs. non-QoS replays */
if (rx->queue == NUM_RX_DATA_QUEUES - 1)
queue = 0;

hdrlen = ieee80211_hdrlen(hdr->frame_control);

Expand All @@ -261,7 +271,7 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx)
res = ieee80211_tkip_decrypt_data(rx->local->wep_rx_tfm,
key, skb->data + hdrlen,
skb->len - hdrlen, rx->sta->sta.addr,
hdr->addr1, hwaccel, rx->queue,
hdr->addr1, hwaccel, queue,
&rx->tkip_iv32,
&rx->tkip_iv16);
if (res != TKIP_DECRYPT_OK)
Expand Down

0 comments on commit 7a92b77

Please sign in to comment.