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.
The sequence number of inject frames was being overwritten. This prevents
certain older attacks against WEP fragmentation older TKIP attacks. Fix
this by tracking if a frames was injected in monitor mode, and if so, do
not overwrite its sequence number.
The patch also adds a module parameter to revert this behaviour if needed.
By setting rtw_monitor_overwrite_seqnum to 1, sequence numbers will again
be set by the driver/device. This may by useful if user-space relied on
the driver/device to set sequence numbers.
This patch was tested using an Alfa AWUS036ACH.
When CONFIG_NET_NS is enabled one would assume the device can be
moved into another namespace. Currently it will fail with:
command failed: Operation not supported (-95)
There's a check if the kernel is between 2.6.38 and 3.0.0
before it adds the netns flag to wiphy->flags.
With this commit it will always add the netns flag when
CONFIG_NET_NS is enabled.
Signed-off-by: Daan van Gorkum <djvg@djvg.net>
Fixes: https://github.com/aircrack-ng/rtl8812au/issues/518
This commit is cherry-pick + refactoring of:
ff04a94b00
and
313311c14b
I'm not sure how this got lost in the latest version on GitHub (I guess merging issues).
But all credits go to @gordboy, @kimocoder and all the other authors.