wifi: cfg80211: fix ieee80211_data_to_8023_exthdr handling of small packets
authorFelix Fietkau <nbd@nbd.name>
Fri, 7 Oct 2022 12:56:11 +0000 (14:56 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 7 Oct 2022 12:57:20 +0000 (14:57 +0200)
commitd9e249704084982ac7581a560ffa284e11621d43
treef7927b33e00185fa9310a0a48348e8e60ca9a983
parentc95014e1d05b5acfd9e6fbe5d1f048b07c6902ff
wifi: cfg80211: fix ieee80211_data_to_8023_exthdr handling of small packets

STP topology change notification packets only have a payload of 7 bytes,
so they get dropped due to the skb->len < hdrlen + 8 check.
Fix this by removing the extra 8 from the skb->len check and checking the
return code on the skb_copy_bits calls.

Fixes: 2d1c304cb2d5 ("cfg80211: add function for 802.3 conversion with separate output buffer")
Reported-by: Chad Monroe <chad.monroe@smartrg.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/util.c