]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit98e4804d78e61dde8c54e239afcdd72fc486c813
treef7927b33e00185fa9310a0a48348e8e60ca9a983
parent99dd5f32879ca88a9f35a86fd3691981406f768c
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: 9ce648171cb5 ("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