diff options
author | rafa_99 <raroma09@gmail.com> | 2022-02-22 22:31:17 +0000 |
---|---|---|
committer | Rafael Marçalo <raroma09@gmail.com> | 2024-02-27 03:55:43 +0000 |
commit | 6d8bf726726d32090b7a7861f2384bd569e463c0 (patch) | |
tree | c37be4f16870b4f8069eb7f04882b360c9a6f3b3 | |
parent | 2db887fc819fe8b95feae161a83ff5535e276ef0 (diff) |
mac80211 patch
-rw-r--r-- | net/mac80211/tx.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 89eb87474fdf..5643de6d691c 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -795,11 +795,19 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx) /* * Packet injection may want to control the sequence - * number, if we have no matching interface then we - * neither assign one ourselves nor ask the driver to. + * number, so if an injected packet is found, skip + * renumbering it. Also make the packet NO_ACK to avoid + * excessive retries (ACKing and retrying should be + * handled by the injecting application). + * FIXME This may break hostapd and some other injectors. + * This should be done using a radiotap flag. */ - if (unlikely(info->control.vif->type == NL80211_IFTYPE_MONITOR)) + if (unlikely((info->flags & IEEE80211_TX_CTL_INJECTED) && + !(tx->sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES))) { + if (!ieee80211_has_morefrags(hdr->frame_control)) + info->flags |= IEEE80211_TX_CTL_NO_ACK; return TX_CONTINUE; + } if (unlikely(ieee80211_is_ctl(hdr->frame_control))) return TX_CONTINUE; |