summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2018-12-15 10:03:07 +0100
committerJohannes Berg <johannes.berg@intel.com>2018-12-18 13:19:03 +0100
commit344f8e00933da8c275fa293caadfc62680d46d21 (patch)
treeea5afdaca163b15abf5bfb4b6ec74b7d817258a3 /net/mac80211/tx.c
parentmac80211: document RCU requirements for ieee80211_tx_dequeue() (diff)
downloadlinux-344f8e00933da8c275fa293caadfc62680d46d21.tar.xz
linux-344f8e00933da8c275fa293caadfc62680d46d21.zip
mac80211: don't build AMSDU from GSO packets
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>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4919881c6a86..4f348b116549 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -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;