diff options
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index c24ca0d0f469..3b7a750ebc70 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -599,10 +599,10 @@ static int ieee80211_is_unicast_robust_mgmt_frame(struct sk_buff *skb) | |||
599 | { | 599 | { |
600 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 600 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; |
601 | 601 | ||
602 | if (skb->len < 24 || is_multicast_ether_addr(hdr->addr1)) | 602 | if (is_multicast_ether_addr(hdr->addr1)) |
603 | return 0; | 603 | return 0; |
604 | 604 | ||
605 | return ieee80211_is_robust_mgmt_frame(hdr); | 605 | return ieee80211_is_robust_mgmt_frame(skb); |
606 | } | 606 | } |
607 | 607 | ||
608 | 608 | ||
@@ -610,10 +610,10 @@ static int ieee80211_is_multicast_robust_mgmt_frame(struct sk_buff *skb) | |||
610 | { | 610 | { |
611 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 611 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; |
612 | 612 | ||
613 | if (skb->len < 24 || !is_multicast_ether_addr(hdr->addr1)) | 613 | if (!is_multicast_ether_addr(hdr->addr1)) |
614 | return 0; | 614 | return 0; |
615 | 615 | ||
616 | return ieee80211_is_robust_mgmt_frame(hdr); | 616 | return ieee80211_is_robust_mgmt_frame(skb); |
617 | } | 617 | } |
618 | 618 | ||
619 | 619 | ||
@@ -626,7 +626,7 @@ static int ieee80211_get_mmie_keyidx(struct sk_buff *skb) | |||
626 | if (skb->len < 24 + sizeof(*mmie) || !is_multicast_ether_addr(hdr->da)) | 626 | if (skb->len < 24 + sizeof(*mmie) || !is_multicast_ether_addr(hdr->da)) |
627 | return -1; | 627 | return -1; |
628 | 628 | ||
629 | if (!ieee80211_is_robust_mgmt_frame((struct ieee80211_hdr *) hdr)) | 629 | if (!ieee80211_is_robust_mgmt_frame(skb)) |
630 | return -1; /* not a robust management frame */ | 630 | return -1; /* not a robust management frame */ |
631 | 631 | ||
632 | mmie = (struct ieee80211_mmie *) | 632 | mmie = (struct ieee80211_mmie *) |
@@ -1845,8 +1845,7 @@ static int ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx) | |||
1845 | * having configured keys. | 1845 | * having configured keys. |
1846 | */ | 1846 | */ |
1847 | if (unlikely(ieee80211_is_action(fc) && !rx->key && | 1847 | if (unlikely(ieee80211_is_action(fc) && !rx->key && |
1848 | ieee80211_is_robust_mgmt_frame( | 1848 | ieee80211_is_robust_mgmt_frame(rx->skb))) |
1849 | (struct ieee80211_hdr *) rx->skb->data))) | ||
1850 | return -EACCES; | 1849 | return -EACCES; |
1851 | } | 1850 | } |
1852 | 1851 | ||