mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-08 20:35:07 +00:00
rtl8812a: add module parameter to retransmit injected frames
The reliability of some attacks is increased by letting the device retransmit injected frames. Since it may not always be desired to retransmit injected frames, add a module parameter to enable it manually. This was tested with an Alfa AWUS036ACH. Even when using a spoofed sender MAC address, the retransmission behaviour is as expected. That is, when an ACK frame towards the spoofed MAC address is received, the retransmission will stop.
This commit is contained in:
parent
1b86121806
commit
849bbf0698
@ -4485,7 +4485,11 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
|
||||
pattrib->stbc = 0;
|
||||
|
||||
}
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
|
||||
if (pregpriv->monitor_retransmit)
|
||||
pattrib->retry_ctrl = _TRUE;
|
||||
else
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->pktlen = len;
|
||||
pmlmeext->mgnt_seq = GetSequence(pwlanhdr);
|
||||
pattrib->seqnum = pmlmeext->mgnt_seq;
|
||||
|
@ -459,6 +459,7 @@ struct registry_priv {
|
||||
#endif/*CONFIG_TDMADIG*/
|
||||
|
||||
u8 monitor_overwrite_seqnum;
|
||||
u8 monitor_retransmit;
|
||||
u8 monitor_disable_1m;
|
||||
};
|
||||
|
||||
|
@ -76,6 +76,10 @@ int rtw_monitor_overwrite_seqnum = 0;
|
||||
module_param(rtw_monitor_overwrite_seqnum, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_monitor_overwrite_seqnum, "Overwrite the sequence number of injected frames");
|
||||
|
||||
int rtw_monitor_retransmit = 0;
|
||||
module_param(rtw_monitor_retransmit, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_monitor_retransmit, "Retransmit injected frames");
|
||||
|
||||
int rtw_monitor_disable_1m = 0;
|
||||
module_param(rtw_monitor_disable_1m, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_monitor_disable_1m, "Disable default 1Mbps rate for monitor injected frames");
|
||||
@ -1228,6 +1232,7 @@ uint loadparam(_adapter *padapter)
|
||||
#endif
|
||||
|
||||
registry_par->monitor_overwrite_seqnum = (u8)rtw_monitor_overwrite_seqnum;
|
||||
registry_par->monitor_retransmit = (u8)rtw_monitor_retransmit;
|
||||
registry_par->monitor_disable_1m = (u8)rtw_monitor_disable_1m;
|
||||
|
||||
return status;
|
||||
|
Loading…
Reference in New Issue
Block a user