aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 902b03ee8f60..b01e467b76c6 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1788,9 +1788,11 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1788 1788
1789 fwd_skb = skb_copy(skb, GFP_ATOMIC); 1789 fwd_skb = skb_copy(skb, GFP_ATOMIC);
1790 1790
1791 if (!fwd_skb && net_ratelimit()) 1791 if (!fwd_skb && net_ratelimit()) {
1792 printk(KERN_DEBUG "%s: failed to clone mesh frame\n", 1792 printk(KERN_DEBUG "%s: failed to clone mesh frame\n",
1793 sdata->name); 1793 sdata->name);
1794 goto out;
1795 }
1794 1796
1795 fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data; 1797 fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data;
1796 memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN); 1798 memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
@@ -1828,6 +1830,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1828 } 1830 }
1829 } 1831 }
1830 1832
1833 out:
1831 if (is_multicast_ether_addr(hdr->addr1) || 1834 if (is_multicast_ether_addr(hdr->addr1) ||
1832 sdata->dev->flags & IFF_PROMISC) 1835 sdata->dev->flags & IFF_PROMISC)
1833 return RX_CONTINUE; 1836 return RX_CONTINUE;
@@ -2247,6 +2250,10 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
2247 break; 2250 break;
2248 case cpu_to_le16(IEEE80211_STYPE_DEAUTH): 2251 case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
2249 case cpu_to_le16(IEEE80211_STYPE_DISASSOC): 2252 case cpu_to_le16(IEEE80211_STYPE_DISASSOC):
2253 if (is_multicast_ether_addr(mgmt->da) &&
2254 !is_broadcast_ether_addr(mgmt->da))
2255 return RX_DROP_MONITOR;
2256
2250 /* process only for station */ 2257 /* process only for station */
2251 if (sdata->vif.type != NL80211_IFTYPE_STATION) 2258 if (sdata->vif.type != NL80211_IFTYPE_STATION)
2252 return RX_DROP_MONITOR; 2259 return RX_DROP_MONITOR;
@@ -2741,6 +2748,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2741 2748
2742 if (ieee80211_prepare_and_rx_handle(&rx, skb, true)) 2749 if (ieee80211_prepare_and_rx_handle(&rx, skb, true))
2743 return; 2750 return;
2751 goto out;
2744 } 2752 }
2745 } 2753 }
2746 2754
@@ -2780,6 +2788,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2780 return; 2788 return;
2781 } 2789 }
2782 2790
2791 out:
2783 dev_kfree_skb(skb); 2792 dev_kfree_skb(skb);
2784} 2793}
2785 2794