diff mbox series

[RFC,4.4] mac80211: fix handling A-MSDUs that start with an RFC 1042 header

Message ID 20210716071126.672549-1-zhengyejian1@huawei.com
State New
Headers show
Series [RFC,4.4] mac80211: fix handling A-MSDUs that start with an RFC 1042 header | expand

Commit Message

Zheng Yejian July 16, 2021, 7:11 a.m. UTC
In v4.4, commit e76511a6fbb5 ("mac80211: properly handle A-MSDUs that
start with an RFC 1042 header") looks like an incomplete backport.

There is no functional changes in the commit, since
__ieee80211_data_to_8023() which defined in net/wireless/util.c is
only called by ieee80211_data_to_8023() and parameter 'is_amsdu' is
always input as false.

By comparing with its upstream, I found that following snippet has not
been backported:
  > --- a/net/mac80211/rx.c
  > +++ b/net/mac80211/rx.c
  > @@ -2682,7 +2682,7 @@ __ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx, u8 data_offset)
  >  	if (ieee80211_data_to_8023_exthdr(skb, &ethhdr,
  >  					  rx->sdata->vif.addr,
  >  					  rx->sdata->vif.type,
  > -					  data_offset))
  > +					  data_offset, true))
  >  		return RX_DROP_UNUSABLE;

I think that's where really causing changes and also needs to be
backported, so I try to do it.

Fixes: e76511a6fbb5 ("mac80211: properly handle A-MSDUs that start with an RFC 1042 header")
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
---
 net/wireless/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/wireless/util.c b/net/wireless/util.c
index 84c0a96b3cb6d..a2b35e6619697 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -664,7 +664,7 @@  void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
 	u8 dst[ETH_ALEN], src[ETH_ALEN];
 
 	if (has_80211_header) {
-		err = ieee80211_data_to_8023(skb, addr, iftype);
+		err = __ieee80211_data_to_8023(skb, addr, iftype, true);
 		if (err)
 			goto out;