]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix proto in ieee80211_data_to_8023 for frames without LLC header
authorFelix Fietkau <nbd@nbd.name>
Wed, 29 Jun 2016 08:36:39 +0000 (10:36 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Wed, 29 Jun 2016 09:50:33 +0000 (11:50 +0200)
commitb7f83f5430a583ab0e367d136850d2cea45240e5
treed367cd575f57763a399a748affc3b2f305dea47f
parenteb95e869ca3a7b39ed82e6acc0beb9155c974451
cfg80211: fix proto in ieee80211_data_to_8023 for frames without LLC header

The PDU length of incoming LLC frames is set to the total skb payload size
in __ieee80211_data_to_8023() of net/wireless/util.c which incorrectly
includes the length of the IEEE 802.11 header.

The resulting LLC frame header has a too large PDU length, causing the
llc_fixup_skb() function of net/llc/llc_input.c to reject the incoming
skb, effectively breaking STP.

Solve the problem by properly substracting the IEEE 802.11 frame header size
from the PDU length, allowing the LLC processor to pick up the incoming
control messages.

Special thanks to Gerry Rozema for tracking down the regression and proposing
a suitable patch.

Fixes: 9ce648171cb5 ("cfg80211: add function for 802.3 conversion with separate output buffer")
Cc: stable@vger.kernel.org
Reported-by: Gerry Rozema <gerryr@rozeware.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
net/wireless/util.c