OSDN Git Service

mac80211: parse radiotap header when selecting Tx queue
authorMathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
Thu, 23 Jul 2020 10:01:53 +0000 (14:01 +0400)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 31 Jul 2020 07:27:01 +0000 (09:27 +0200)
commitcb17ed29a7a5fea8c9bf70e8a05757d71650e025
treeeb7201c4056fb1ebe7f32bf33e60ef398e41076f
parent08aca29aa8b18dec2e84bc97d27dabe133b75822
mac80211: parse radiotap header when selecting Tx queue

Already parse the radiotap header in ieee80211_monitor_select_queue.
In a subsequent commit this will allow us to add a radiotap flag that
influences the queue on which injected packets will be sent.

This also fixes the incomplete validation of the injected frame in
ieee80211_monitor_select_queue: currently an out of bounds memory
access may occur in in the called function ieee80211_select_queue_80211
if the 802.11 header is too small.

Note that in ieee80211_monitor_start_xmit the radiotap header is parsed
again, which is necessairy because ieee80211_monitor_select_queue is not
always called beforehand.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
Link: https://lore.kernel.org/r/20200723100153.31631-6-Mathy.Vanhoef@kuleuven.be
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/iface.c
net/mac80211/tx.c