]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: don't build AMSDU from GSO packets
authorSara Sharon <sara.sharon@intel.com>
Sat, 15 Dec 2018 09:03:07 +0000 (11:03 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 18 Dec 2018 12:19:03 +0000 (13:19 +0100)
If we build AMSDU from GSO packets, it can lead to
bad results if anyone tries to call skb_gso_segment
on the packets.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c

index 4919881c6a862c673f41569eefb193c8a5772a88..4f348b11654941984dd0688fc7db964a9b5c7863 100644 (file)
@@ -3218,6 +3218,9 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
        if (!ieee80211_hw_check(&local->hw, TX_AMSDU))
                return false;
 
+       if (skb_is_gso(skb))
+               return false;
+
        if (!txq)
                return false;
 
@@ -3242,7 +3245,7 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata,
        tin = &txqi->tin;
        flow = fq_flow_classify(fq, tin, skb, fq_flow_get_default_func);
        head = skb_peek_tail(&flow->queue);
-       if (!head)
+       if (!head || skb_is_gso(head))
                goto out;
 
        orig_len = head->len;