hostapd/src/drivers
Andrzej Ostruszka 98e9d553f2 nl80211: Check previous MAC address for locally-generated-deauth
When using MAC randomization wpa_supplicant can change the local MAC
address during roaming scenario:

1. We attach to AP1 (with MAC1/SSID1).
2. Roaming to AP2 (with MAC2/SSID2) is started:
  a) we send DEAUTH(for AP1, with MAC1)
  b) we change MAC to MAC2 due to randomization
  c) we start authentication for AP2
  d) we get notification about DEAUTH for AP1 (which we ignore)
  e) we complete association with AP2

In point 2d we completely ignore the notification which later causes
problems. This happens if the deauthentication event is generated by the
local driver (e.g., due to beacon loss) instead of AP2 sending an
explicit Deauthentication frame.

The intended behavior is as follows: during roaming we generate DEAUTH
(2a) and signal this event right away. To protect from handling of our
own DEAUTH for the 2nd time supplicant marks 'ignore_next_local_deauth'
variable.  In point 2d we should receive this notification and clear the
flag but this does not happen because MAC1 in the notification is not
the current MAC address (it has been changed in 2b) so this notification
is ignored as a one with a "foreign" address.

So we end up successfully at AP2 but with 'ignore_next_local_deauth'
still set which causes problems.  For example if AP2 shuts down it has
been observed on some drivers that the DEAUTH notification is generated
as a local one and since we have flag to ignore it nothing is reported
over D-Bus.

To address the problem let's store the previously used MAC address and
use it for checking for foreign address (in combination with the current
one).

Signed-off-by: Andrzej Ostruszka <amo@semihalf.com>
2022-11-27 14:18:53 +02:00
..
android_drv.h Remove obsolete license notifications 2013-12-24 22:59:52 +02:00
driver.h Fix a typo in driver ops poll() documentation 2022-11-26 20:48:21 +02:00
driver_atheros.c atheros: Do not include p2p.h 2022-02-10 17:54:43 +02:00
driver_bsd.c BSD: If route socket overflows, sync drivers to system interfaces 2021-02-06 13:27:24 +02:00
driver_common.c MLD STA: Indicate per link channel switch 2022-09-15 16:00:51 +03:00
driver_hostap.c driver: Extend send_mlme() with wait option 2020-02-29 23:03:20 +02:00
driver_hostap.h hostap: Remove unused driver enum values with "master" in them 2021-10-11 20:33:50 +03:00
driver_macsec_linux.c macsec_linux: Support cipher suite configuration 2022-02-17 01:05:08 +02:00
driver_macsec_qca.c src/drivers: Fix typos 2022-03-04 12:04:51 +02:00
driver_ndis.c Replace "dummy" with "stub" in NDIS driver interface 2021-10-11 20:56:56 +03:00
driver_ndis.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
driver_ndis_.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
driver_nl80211.c nl80211: Check previous MAC address for locally-generated-deauth 2022-11-27 14:18:53 +02:00
driver_nl80211.h nl80211: Check previous MAC address for locally-generated-deauth 2022-11-27 14:18:53 +02:00
driver_nl80211_android.c Drop support for libnl 1.1 2020-01-02 18:05:38 +02:00
driver_nl80211_capa.c nl80211: Define vendor interface functions to offload PASN authentication 2022-09-02 16:18:26 +03:00
driver_nl80211_event.c nl80211: Check previous MAC address for locally-generated-deauth 2022-11-27 14:18:53 +02:00
driver_nl80211_monitor.c nl80211: Use monitor interface for sending no-encrypt test frames 2020-01-04 20:23:05 +02:00
driver_nl80211_scan.c nl80211: Allow more time for the initial scan with 6 GHz 2022-07-28 16:40:05 +03:00
driver_none.c driver: Remove unused send_ether() driver op 2020-01-05 18:32:10 +02:00
driver_openbsd.c Replace WPA_ALG_PMK with KEY_FLAG_PMK 2020-03-06 21:44:31 +02:00
driver_privsep.c privsep: Mask out control port capability flag 2020-03-01 21:31:07 +02:00
driver_roboswitch.c roboswitch: Check some read operation results 2019-03-09 18:56:48 +02:00
driver_wext.c Rename WPA_ALG_IGTK to use the correct cipher name for BIP 2020-05-17 01:31:19 +03:00
driver_wext.h driver: Move set_key() parameters into a struct 2020-01-09 00:48:57 +02:00
driver_wired.c Fix indentation level 2018-11-30 21:28:19 +02:00
driver_wired_common.c wired: Mark some common helper functions static 2016-11-30 20:08:39 +02:00
driver_wired_common.h wired: Mark some common helper functions static 2016-11-30 20:08:39 +02:00
drivers.c macsec_linux: Add a driver for macsec on Linux kernels 2016-11-30 20:08:36 +02:00
drivers.mak nl80211: Add ACS support for Broadcom device 2021-02-27 12:14:09 +02:00
drivers.mk nl80211: Add ACS support for Broadcom device 2021-02-27 12:14:09 +02:00
linux_defines.h nl80211: Move definitions into separate header files 2014-10-26 17:03:24 +02:00
linux_ioctl.c vlan: Use new bridge ioctl() 2019-01-02 00:23:43 +02:00
linux_ioctl.h nl80211: Generic Linux master interface support for hostapd 2015-07-16 12:33:29 +03:00
linux_wext.h wext: Fix musl build error 2014-12-14 18:05:32 +02:00
Makefile Add CONFIG_CODE_COVERAGE=y option for gcov 2013-11-24 19:16:12 +02:00
ndis_events.c src/drivers: Fix typos 2022-03-04 12:04:51 +02:00
netlink.c Move default action from after switch to within 2022-10-14 16:08:20 +03:00
netlink.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
nl80211_copy.h Sync with wireless-next.git include/uapi/linux/nl80211.h 2022-08-26 17:27:45 +03:00
priv_netlink.h netlink: Fix RTM_SETLINK padding at the end of the message 2014-10-12 19:27:16 +03:00
rfkill.c rfkill: Fix a memory leak 2016-02-16 00:14:47 +02:00
rfkill.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00