Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx()

This seems to be a leftover from the old days, when we didn't support
any frames that didn't contain the full ieee802.11 header. This is
not the case anymore. It does not cause problems now, because they
are only dropped during scan. But when scheduled scans get merged,
this would become a problem because we would drop all small frames
while scheduled scan is running.

To fix this, return RX_CONTINUE instead of RX_DROP_MONITOR.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Luciano Coelho and committed by
John W. Linville
306fe938 729da390

+1 -1
+1 -1
net/mac80211/scan.c
··· 170 170 return RX_CONTINUE; 171 171 172 172 if (skb->len < 24) 173 - return RX_DROP_MONITOR; 173 + return RX_CONTINUE; 174 174 175 175 presp = ieee80211_is_probe_resp(fc); 176 176 if (presp) {