]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
4 years agotests: Fix sporadic failures in p2p_channel_avoid3
Andrei Otcheretianski [Thu, 21 Jan 2021 15:40:36 +0000 (17:40 +0200)] 
tests: Fix sporadic failures in p2p_channel_avoid3

The P2P group may be originally formed on UNII-3, so disabling UNII-1
and UNII-2 will not result in a channel switch failing the test.
Fix this by setting 44 as a preferred channel.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agotests: Fix ap_ft_r0_key_expiration test
Andrei Otcheretianski [Thu, 21 Jan 2021 15:40:35 +0000 (17:40 +0200)] 
tests: Fix ap_ft_r0_key_expiration test

The test configures ft_r0_key_lifetime parameter, however ft_params
already contain the r0_key_lifetime. Since both options are accepted by
hostapd and set the same field, one of them gets overwritten.
As the dictionary enumeration order is not guaranteed in python, the
test may sporadically fail.
Fix that by explicitely removing the unneeded parameter.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agoDPP: Silence compiler warning about signed/unsigned comparison
Andrei Otcheretianski [Thu, 21 Jan 2021 15:40:32 +0000 (17:40 +0200)] 
DPP: Silence compiler warning about signed/unsigned comparison

Old gcc versions complain about signed/unsigned comparison in
dpp_rx_gas_resp(). Hide it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agoMake wpa_bss_ext_capab() handle NULL bss argument
Jouni Malinen [Sat, 6 Feb 2021 09:00:09 +0000 (11:00 +0200)] 
Make wpa_bss_ext_capab() handle NULL bss argument

This simplifies the callers that use wpa_s->current_bss (which could be
NULL).

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agorobust_av: Use wpa_bss_ext_capab() helper
Johannes Berg [Tue, 19 Jan 2021 19:07:36 +0000 (20:07 +0100)] 
robust_av: Use wpa_bss_ext_capab() helper

Use the helper instead of open-coding the check. Since the
helper doesn't handle a NULL BSS, keep that extra check.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agotests: he_tkip to match implementation change
Jouni Malinen [Sat, 6 Feb 2021 10:08:43 +0000 (12:08 +0200)] 
tests: he_tkip to match implementation change

HE is now getting disabled just like HT and VHT when only TKIP is
enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoDisable HE capabilities when using unacceptable security config
Shay Bar [Wed, 27 Jan 2021 16:01:17 +0000 (18:01 +0200)] 
Disable HE capabilities when using unacceptable security config

Add HE configuration check similar to HT/VHT.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
4 years agonl80211: Skip frame filter config for P2P-Device
Johannes Berg [Thu, 4 Feb 2021 20:26:40 +0000 (21:26 +0100)] 
nl80211: Skip frame filter config for P2P-Device

There's no point in attempting to configure frame filters on
a P2P-Devices that doesn't even have a netdev (nor passes any
data traffic), that just results in error messages. Skip it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agodbus: Fix IEs getter to use wpa_bss_ie_ptr()
Brad Kemp [Fri, 5 Feb 2021 20:46:49 +0000 (15:46 -0500)] 
dbus: Fix IEs getter to use wpa_bss_ie_ptr()

The wpa_bss structure's last element is an empty array. The forgotten
code here assumed that the array of IEs was contiguous to the wpa_bss
structure. This is not always the case anymore. Update this missed case
to use the new wpa_bss_ie_ptr() wrapper to send the correct array of IEs
over DBus.

Fixes: be7ee264f654 ("BSS: Use wrapper function for getting a pointer to the IE buffer")
Signed-off-by: Brad Kemp <brad at beechwoods.com>
4 years agoAdd HE in ieee80211_freq_to_channel_ext() documentation
Muna Sinada [Thu, 11 Jun 2020 11:18:43 +0000 (04:18 -0700)] 
Add HE in ieee80211_freq_to_channel_ext() documentation

This function covers HE cases, so include that in the comment.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
4 years agohostapd: Generalize channel switch methods to incorperated HE mode
Muna Sinada [Thu, 11 Jun 2020 11:18:43 +0000 (04:18 -0700)] 
hostapd: Generalize channel switch methods to incorperated HE mode

Remove the VHT specific naming on methods that are utilized in both VHT
and HE modes.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
4 years agohostapd: Enable HE for channel switch commmand
Muna Sinada [Thu, 11 Jun 2020 11:18:42 +0000 (04:18 -0700)] 
hostapd: Enable HE for channel switch commmand

Add HE as an accepted option ("he") in the CHAN_SWITCH command similarly
to the way VHT is addressed.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
4 years agoP2P: Add a maximum length limit for peer vendor IEs
Jouni Malinen [Thu, 4 Feb 2021 23:39:29 +0000 (01:39 +0200)] 
P2P: Add a maximum length limit for peer vendor IEs

This is mainly to help with fuzz testing that could generate overly long
test data that would not be possible in real use cases due to MMPDU size
limits. The implementation for storing vendor IEs with such
unrealisticly long IE buffers can result in huge number of memory
reallozations and analyzing those can be very heavy.

While the maximum length of the fuzzing test input could be limited, it
seems nicer to limit this IE storage limit instead to avoid timeouts
from fuzz test runs.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoP2P: Fix copying of secondary device types for P2P group client
Jouni Malinen [Mon, 9 Nov 2020 09:43:12 +0000 (11:43 +0200)] 
P2P: Fix copying of secondary device types for P2P group client

Parsing and copying of WPS secondary device types list was verifying
that the contents is not too long for the internal maximum in the case
of WPS messages, but similar validation was missing from the case of P2P
group information which encodes this information in a different
attribute. This could result in writing beyond the memory area assigned
for these entries and corrupting memory within an instance of struct
p2p_device. This could result in invalid operations and unexpected
behavior when trying to free pointers from that corrupted memory.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27269
Fixes: e57ae6e19edf ("P2P: Keep track of secondary device types for peers")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoRemove pointless defines for ext capab bits
Jouni Malinen [Wed, 3 Feb 2021 22:23:14 +0000 (00:23 +0200)] 
Remove pointless defines for ext capab bits

These were copy-pasted templates that were forgotten to be removed when
defining the bits.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoReset external_scan_running on interface deletion
David Su [Tue, 26 Jan 2021 22:26:13 +0000 (14:26 -0800)] 
Reset external_scan_running on interface deletion

Currently, the external_scan_running flag is not reset when an interface
is removed. Thus, if a connection attempt is made on another iface, it
will fail due to wpa_supplicant incorrectly assuming the radio is still
busy due to the ongoing scan.

To fix this, convert external_scan_running to a pointer to the interface
that started the scan. If this interface is removed, also reset the
pointer to NULL so that other operations may continue on this radio.

Test:
  1. Start scan on wlan0
  2. Remove wlan0
  3. Can connect to a network on wlan1

Signed-off-by: David Su <dysu@google.com>
4 years agoAP: Add 6 GHz security constraints
Aloka Dixit [Tue, 12 Jan 2021 19:29:18 +0000 (11:29 -0800)] 
AP: Add 6 GHz security constraints

Add security constraints for the 6 GHz band as given in IEEE
P802.11ax/D8.0, 12.12.2.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
4 years agomesh: Fix for leaving mesh
Abinaya Kalaiselvan [Mon, 1 Feb 2021 04:59:36 +0000 (10:29 +0530)] 
mesh: Fix for leaving mesh

Avoid multiple execution of wpa_drv_leave_mesh().

Fixes: 0896c442dcd5 ("mesh: Fix for mesh init/deinit")
Signed-off-by: Abinaya Kalaiselvan <akalaise@codeaurora.org>
4 years agoWPA: Support deriving KDK based on capabilities (Authenticator)
Ilan Peer [Wed, 16 Dec 2020 11:01:40 +0000 (13:01 +0200)] 
WPA: Support deriving KDK based on capabilities (Authenticator)

Derive the KDK as part of PMK to PTK derivation if forced by
configuration or in case both the local AP and the peer station declare
support for secure LTF.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Support deriving KDK based on capabilities
Ilan Peer [Wed, 16 Dec 2020 11:01:39 +0000 (13:01 +0200)] 
WPA: Support deriving KDK based on capabilities

Derive the KDK as part of PMK to PTK derivation if forced by
configuration or in case both the local station and the AP declare
support for secure LTF.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Include RSNXE in the PASN negotiation
Ilan Peer [Wed, 16 Dec 2020 11:01:38 +0000 (13:01 +0200)] 
PASN: Include RSNXE in the PASN negotiation

IEEE P802.11az/D2.6 added definitions to include RSNXE in the PASN
negotiation. Implement the new functionality in both wpa_supplicant and
hostapd.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoRSN: Add RSNXE new definitions
Ilan Peer [Wed, 16 Dec 2020 11:01:37 +0000 (13:01 +0200)] 
RSN: Add RSNXE new definitions

IEEE P802.11az/D2.6 defines the following additional capabilities to
RSNXE:

- Secure LTF support
- Secure RTT support
- Protection of range negotiation and measurement management frames.

Add support for advertising the new capabilities.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agotests: Add PASN tests with FT key derivation
Ilan Peer [Wed, 16 Dec 2020 11:01:05 +0000 (13:01 +0200)] 
tests: Add PASN tests with FT key derivation

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAP: Support PASN with FT key derivation
Ilan Peer [Wed, 16 Dec 2020 11:01:04 +0000 (13:01 +0200)] 
AP: Support PASN with FT key derivation

Note that the implementation is not complete as it is missing support
for the FT wrapped data which is optional for the station, but must be
supported by the AP in case the station included it.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Support PASN with FT key derivation
Ilan Peer [Wed, 16 Dec 2020 11:01:03 +0000 (13:01 +0200)] 
PASN: Support PASN with FT key derivation

Add support for PASN authentication with FT key derivation:

- As IEEE P802.11az/D2.6 states that wrapped data is optional and
  is only needed for further validation of the FT security parameters,
  do not include them in the first PASN frame.

- PASN with FT key derivation requires knowledge of the PMK-R1 and
  PMK-R1-Name for the target AP. As the WPA state machine stores PMK-R1,
  etc. only for the currently associated AP, store the mapping of
  BSSID to R1KH-ID for each previous association, so the R1KH-ID
  could be used to derive PMK-R1 and PMK-R1-Name. Do so instead
  of storing the PMK-R1 to avoid maintaining keys that might not
  be used.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agotests: Add PASN with FILS tests
Ilan Peer [Wed, 16 Dec 2020 11:00:57 +0000 (13:00 +0200)] 
tests: Add PASN with FILS tests

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAP: Support PASN with FILS key derivation
Ilan Peer [Wed, 16 Dec 2020 11:00:56 +0000 (13:00 +0200)] 
AP: Support PASN with FILS key derivation

As the PASN FILS authentication is only defined for FILS SK without PFS,
and to support PASN authentication with FILS, implement the PASN with
FILS processing as part of the PASN handling and not as part of the WPA
Authenticator state machine.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Support PASN with FILS key derivation
Ilan Peer [Wed, 16 Dec 2020 11:00:55 +0000 (13:00 +0200)] 
PASN: Support PASN with FILS key derivation

As the PASN FILS authentication is only defined for FILS SK without PFS,
and to support PASN authentication with FILS, implement the PASN with
FILS processing as part of the PASN handling and not as part of the WPA
state machine.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agotests: Add PASN tests with SAE
Ilan Peer [Wed, 16 Dec 2020 11:00:54 +0000 (13:00 +0200)] 
tests: Add PASN tests with SAE

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAP: Support PASN with SAE key derivation
Ilan Peer [Wed, 16 Dec 2020 11:00:53 +0000 (13:00 +0200)] 
AP: Support PASN with SAE key derivation

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Support PASN with SAE key derivation
Ilan Peer [Wed, 16 Dec 2020 11:00:52 +0000 (13:00 +0200)] 
PASN: Support PASN with SAE key derivation

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agotests: Add PASN test coverage
Ilan Peer [Wed, 16 Dec 2020 11:00:33 +0000 (13:00 +0200)] 
tests: Add PASN test coverage

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAP: Add support for PASN processing to the SME
Ilan Peer [Wed, 16 Dec 2020 11:00:32 +0000 (13:00 +0200)] 
AP: Add support for PASN processing to the SME

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAdd PTKSA cache to hostapd
Ilan Peer [Wed, 16 Dec 2020 11:00:31 +0000 (13:00 +0200)] 
Add PTKSA cache to hostapd

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAP: Add support for configuring PASN
Ilan Peer [Wed, 16 Dec 2020 11:00:30 +0000 (13:00 +0200)] 
AP: Add support for configuring PASN

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoctrl_iface: Add support for PASN authentication
Ilan Peer [Wed, 16 Dec 2020 11:00:29 +0000 (13:00 +0200)] 
ctrl_iface: Add support for PASN authentication

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Add support for PASN processing to wpa_supplicant
Ilan Peer [Wed, 16 Dec 2020 11:00:28 +0000 (13:00 +0200)] 
PASN: Add support for PASN processing to wpa_supplicant

Add PASN implementation to wpa_supplicant

1. Add functions to initialize and clear PASN data.
2. Add functions to construct PASN Authentication frames.
3. Add function to process PASN Authentication frame.
4. Add function to handle PASN frame TX status.
5. Implement the station side flow processing for PASN.

The implementation is missing support for wrapped data and PMKSA
establishment for base AKMs, and only supports PASN authentication or
base AKM with PMKSA caching.

The missing parts will be added in later patches.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Add PTKSA cache to wpa_supplicant for PASN
Ilan Peer [Wed, 16 Dec 2020 11:00:27 +0000 (13:00 +0200)] 
WPA: Add PTKSA cache to wpa_supplicant for PASN

PASN requires to store the PTK derived during PASN authentication
so it can later be used for secure LTF etc. This is also true
for a PTK derived during regular connection.

Add an instance of a PTKSA cache for each wpa_supplicant
interface when PASN is enabled in build configuration.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Add PTKSA cache implementation
Ilan Peer [Wed, 16 Dec 2020 11:00:26 +0000 (13:00 +0200)] 
WPA: Add PTKSA cache implementation

In order to be able to perform secure LTF measurements, both the
initiator and the responder need to first derive TK and KDK and store
them, so they would later be available for the secure LTF negotiation.

Add a basic implementation of a PTKSA cache that stores derived TK/KDK
which can later be used for secure LTF negotiation, and add it to the
build configuration.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Add a function to get PMKSA cache entry
Ilan Peer [Wed, 16 Dec 2020 11:00:25 +0000 (13:00 +0200)] 
WPA: Add a function to get PMKSA cache entry

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agocommon: Add PASN parsing to ieee802_11_parse_extension()
Ilan Peer [Wed, 16 Dec 2020 11:00:24 +0000 (13:00 +0200)] 
common: Add PASN parsing to ieee802_11_parse_extension()

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agotests: Add module tests for PASN PTK derivation
Ilan Peer [Wed, 16 Dec 2020 11:00:23 +0000 (13:00 +0200)] 
tests: Add module tests for PASN PTK derivation

Based on tests vectors taken from IEEE P802.11az/D2.6.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Add common Authentication frame build/validation functions
Ilan Peer [Wed, 16 Dec 2020 11:00:22 +0000 (13:00 +0200)] 
PASN: Add common Authentication frame build/validation functions

Add helper functions to construct a PASN Authentication frame and
validate its content, which are common to both wpa_supplicant and
hostapd.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Add functions to compute PTK, MIC and hash
Ilan Peer [Wed, 16 Dec 2020 11:00:21 +0000 (13:00 +0200)] 
PASN: Add functions to compute PTK, MIC and hash

1. Add a function to derive the PTK from a PMK and additional data.
2. Add a function to calculate the MIC for a PASN frames.
3. Add a function to compute the hash of an authentication frame body.

The above are built only in case that CONFIG_PASN is enabled at build
time.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoFILS: Extend the fils_pmk_to_ptk() function to also derive KDK
Ilan Peer [Wed, 16 Dec 2020 11:00:19 +0000 (13:00 +0200)] 
FILS: Extend the fils_pmk_to_ptk() function to also derive KDK

Extend the fils_pmk_to_ptk() to also derive Key Derivation
Key (KDK) which can later be used for secure LTF measurements.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoFT: Extend the wpa_pmk_r1_to_ptk() function to also derive KDK
Ilan Peer [Wed, 16 Dec 2020 11:00:18 +0000 (13:00 +0200)] 
FT: Extend the wpa_pmk_r1_to_ptk() function to also derive KDK

Extend the wpa_pmk_r1_to_ptk() to also derive Key Derivation
Key (KDK), which can later be used for secure LTF measurements.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Extend the wpa_pmk_to_ptk() function to also derive KDK
Ilan Peer [Wed, 16 Dec 2020 11:00:17 +0000 (13:00 +0200)] 
WPA: Extend the wpa_pmk_to_ptk() function to also derive KDK

Extend the wpa_pmk_to_ptk() to also derive Key Derivation
Key (KDK), which can later be used for secure LTF measurements.

Update the wpa_supplicant and hostapd configuration and the
corresponding WPA and WPA Auth state machine, to allow enabling of KDK
derivation. For now, use a testing parameter to control whether KDK is
derived.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agocommon: Allow WPA_CIPHER_GTK_NOT_USED as a valid group management cipher
Ilan Peer [Wed, 16 Dec 2020 11:00:16 +0000 (13:00 +0200)] 
common: Allow WPA_CIPHER_GTK_NOT_USED as a valid group management cipher

PASN authentication requires that group management cipher suite
would be set to 00-0F-AC:7 in the RSNE, so consider it as a valid
group management cipher and adjust the code accordingly.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agonl80211: Always register for RX authentication frames with PASN
Ilan Peer [Wed, 16 Dec 2020 11:00:15 +0000 (13:00 +0200)] 
nl80211: Always register for RX authentication frames with PASN

Register a filter that only requests PASN Authentication frames
to be passed to user space.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agonl80211: Allow off-channel of PASN authentication frames in send_mlme()
Ilan Peer [Wed, 16 Dec 2020 11:00:14 +0000 (13:00 +0200)] 
nl80211: Allow off-channel of PASN authentication frames in send_mlme()

As part of the support needed for PASN.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agowlantest: Include PASN into build
Ilan Peer [Wed, 16 Dec 2020 11:00:20 +0000 (13:00 +0200)] 
wlantest: Include PASN into build

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Add some specification definitions
Ilan Peer [Wed, 16 Dec 2020 11:00:20 +0000 (13:00 +0200)] 
PASN: Add some specification definitions

Based on IEEE P802.11az/D2.6.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAdd support for new 5 GHz channels 173 and 177
Sreeramya Soratkal [Mon, 23 Nov 2020 08:00:02 +0000 (13:30 +0530)] 
Add support for new 5 GHz channels 173 and 177

Add support for new channels 173 and 177 in the operating classes 125 to
130 as defined in draft IEEE P802.11ax/D8.0.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
4 years agoP2P: Fix channel selection for operating class 129
Sreeramya Soratkal [Mon, 23 Nov 2020 07:51:53 +0000 (13:21 +0530)] 
P2P: Fix channel selection for operating class 129

The operating class 129 includes channels with a maximum bandwidth of
160 MHz with center frequency index 50 and 114. The previous definition
of operating class 129 considered the center frequency index as actual
channels resulting in incorrect channel setup for the operating class.

Fix the definition of operating class 129 to consider channels with the
center frequency index of 50 and 114.

Also update the comment that describes the channel selection for
operating 128, 129, and 130 which mentions wpas_p2p_allow_channel()
verifies the channels while wpas_p2p_verify_channel() takes care of it.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
4 years agotests: DPP Responder behavior on missing Auth Confirm
Jouni Malinen [Fri, 22 Jan 2021 15:08:48 +0000 (17:08 +0200)] 
tests: DPP Responder behavior on missing Auth Confirm

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP: Abort authentication if no Auth Confirm is received within a second
Purushottam Kushwaha [Fri, 8 Jan 2021 09:38:25 +0000 (15:08 +0530)] 
DPP: Abort authentication if no Auth Confirm is received within a second

After sending DPP Auth Response, the Responder might not receive the
Auth Confirm either due to the Initiator not sending it or the reception
of the frame failing for some reason (e.g., Responder having already
left the negotiation channel). If this happens, following initiation
attempts would fail since the consecutive Auth Request would get
discarded since the previous authentication is still in progress.

Terminate DPP authentication on Responder, if no Auth Confirm is
received within one second of successfully sending Auth Response. This
allows the Responder to accept start of a new exchange.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd a configuration to disconnect on deinit if WoWLAN is enabled
Sunil Dutt [Tue, 19 Jan 2021 13:00:32 +0000 (18:30 +0530)] 
Add a configuration to disconnect on deinit if WoWLAN is enabled

Commit 02c21c02d09f ("wpa_supplicant: Do not disconnect on deinit if
WoWLAN is enabled") prevents the disconnection on deinit if the driver
indicates that WoWLAN is enabled. This is not the expected behavior in
some earlier use cases where the wpa_supplicant process is left running
when going to sleep and killing of the wpa_supplicant process is used
only when there is an expectation of Wi-Fi connection being disabled.

To support the use cases which require the WLAN to disconnect on deinit
even if WoWLAN is enabled, introduce a configuration parameter
wowlan_disconnect_on_deinit. This is set to 0 by default thereby not
impacting the functionality in the above mentioned commit. Setting it to
1 restores the old behavior before the commit identified above.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix rfkill testing with updated kernel
Jouni Malinen [Fri, 15 Jan 2021 16:10:34 +0000 (18:10 +0200)] 
tests: Fix rfkill testing with updated kernel

Kernel commit 14486c82612a ("rfkill: add a reason to the HW rfkill
state") added an extra byte to the end of the rfkill events and that
confused the read loop here since python tried to buffer the results
from multiple read() calls into the local buffer that then delivered the
extra octets in consecutive events. Fix this by disabling buffering for
these reads.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agodbus: Export new 'suiteb192' capability
Antonio Cardace [Wed, 16 Dec 2020 16:55:40 +0000 (17:55 +0100)] 
dbus: Export new 'suiteb192' capability

Export a new 'suiteb192' capability to indicate that wpa_supplicant was
built with WPA-EAP-SUITE-B-192 support and accepts
'key_mgmt=WPA-EAP-SUITE-B-192'.

Signed-off-by: Antonio Cardace <acardace@redhat.com>
4 years agoDBus: Add 'owe' to interface Capabilities
Brian Norris [Mon, 21 Dec 2020 18:40:31 +0000 (10:40 -0800)] 
DBus: Add 'owe' to interface Capabilities

Signed-off-by: Brian Norris <briannorris@chromium.org>
4 years agotests: Fix ap_ft_eap_pull_wildcard_multi_bss
Andrei Otcheretianski [Wed, 23 Dec 2020 10:17:10 +0000 (12:17 +0200)] 
tests: Fix ap_ft_eap_pull_wildcard_multi_bss

Python enumerates dictionaries in an arbitrary order, thus the resulting
configuration file will have the parameters shuffled randomly. This may
cause the test to fail when, for example, auth_server_addr is placed
after auth_server_port. Fix this by enforcing some of the fields to be
placed before the others.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agowpa_cli: Add WPS_EVENT_OVERLAP to action scripts
Berkay Ercan [Wed, 23 Dec 2020 14:58:44 +0000 (17:58 +0300)] 
wpa_cli: Add WPS_EVENT_OVERLAP to action scripts

WPS_EVENT_OVERLAP case was missing on wpa_cli_action_process function in
wpa_cli.c, so when the overlap event occurs, there was no event message
sent to the action script. Add this event case to the function.

Signed-off-by: Berkay Ercan <berkay.ercan@airties.com>
Signed-off-by: Veli Demirel <veli.demirel@airties.com>
4 years agotests: remote: Allow shuffle
Janusz Dziedzic [Sun, 10 Jan 2021 15:50:48 +0000 (16:50 +0100)] 
tests: remote: Allow shuffle

With -S option we will run tests in random order.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agotests: remotehost: Add missed select import
Janusz Dziedzic [Sun, 10 Jan 2021 15:50:47 +0000 (16:50 +0100)] 
tests: remotehost: Add missed select import

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agotests: remotehost: Remove wait_execute_complete
Janusz Dziedzic [Sun, 10 Jan 2021 15:50:46 +0000 (16:50 +0100)] 
tests: remotehost: Remove wait_execute_complete

Today we have thread_wait().

Fixes: 11b3af3dad12 ("tests: remotehost: Use correct name")
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agonl80211: Add missing WPA3-SAE auth_data in auth retry case
hongwang.li [Tue, 12 Jan 2021 02:12:58 +0000 (18:12 -0800)] 
nl80211: Add missing WPA3-SAE auth_data in auth retry case

When wpa_supplicant sends NL80211_CMD_AUTHENTICATE to kernel, it is
possible that the cfg80211 in kernel has expired the BSS entry that
we are trying to auth with. Then cfg80211 will reject the auth cmd.
In this case, wpa_supplicant will trigger a single channel scan to
refresh cfg80211 BSS entry, and retry the auth when scan is finished.

When this case happens, wpa_supplicant makes a copy of auth params,
such as frequency, bssid, ssid, ie and so on. So when we retry auth,
the copy of these params will be used. The problem is, a param named
auth_data is missed when making the copy. The auth_data is used by
NL80211_ATTR_SAE_DATA which is a mandatory field for WPA3-SAE auth.
In WPA3-SAE case the auth retry will always fail because auth_data is
missing. This patch fixes the issue.

Signed-off-by: hongwang.li <hongwang.li@sonos.com>
4 years agoFT: Update key mgmt properly in RSNE during roaming
Shiva Sankar Gajula [Wed, 13 Jan 2021 10:44:03 +0000 (16:14 +0530)] 
FT: Update key mgmt properly in RSNE during roaming

When STA is performing roam from WPA3 AP to WPA2 AP, the STA was
including key mgmt FT-SAE instead of FT-PSK in FT Authentication request
RSNE when using driver-based SME. This is because the RSNE/MDE/FTE were
updated and forwarded to the driver using the NL80211_CMD_UPDATE_FT_IES
command before updating key mgmt properly. Because of this, the AP is
rejecting FT Authentication request with WLAN_REASON_UNSPECIFIED reason
code which is due to the invalid keymgmt in RSNE.

Fix this by reordering IE population to happen earlier in the sequence
so that the updated key mgmt information can be provided when using
NL80211_CMD_UPDATE_FT_IES.

Signed-off-by: Shiva Sankar Gajula <sgajula@codeaurora.org>
4 years agotests: FT reassociation SAE-PSK-SAE
Jouni Malinen [Fri, 15 Jan 2021 10:00:57 +0000 (12:00 +0200)] 
tests: FT reassociation SAE-PSK-SAE

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd user configured vendor IEs to default scan IEs
Vinita S. Maloo [Thu, 3 Dec 2020 14:34:20 +0000 (20:04 +0530)] 
Add user configured vendor IEs to default scan IEs

Add user configured vendor IEs for Probe Request frames to default scan
IEs so that these IEs will be included in the Probe Request frames for
the scans issued also by components other than wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix p2p fuzzer build after API change
Jouni Malinen [Wed, 23 Dec 2020 12:09:52 +0000 (14:09 +0200)] 
tests: Fix p2p fuzzer build after API change

Commit 7b121af26af5 ("P2P: Delay P2P scan when an external scan is in
progress") added a new argument to p2p_scan_res_handled(), but did not
update this test tool. Fix this by using hardcoded value 0 for the new
delay argument.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAndroid: Pass the vendor events to $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)
Sunil Dutt [Fri, 11 Dec 2020 14:33:48 +0000 (06:33 -0800)] 
Android: Pass the vendor events to $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)

Android has a mechanism to extend the driver interface in vendor
specific ways. This implementation of the vendor interface is done in
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB). Extend this to allow the vendor
events to be provided to this library to facilitate the event
processing.

Introduce a new board configuration via
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT) rather than reusing
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB) to enable this event handling in the
private library. This is to avoid compilation issues for
wpa_driver_nl80211_driver_event() with the already existing private
library implementations defined with
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoP2P: Delay P2P scan when an external scan is in progress
Purushottam Kushwaha [Tue, 8 Dec 2020 10:53:56 +0000 (16:23 +0530)] 
P2P: Delay P2P scan when an external scan is in progress

When an external scan is in progress on the same radio, delay the P2P
search operation based on configuration parameter p2p_search_delay. The
"search_delay" configuration done through p2p_find always takes
precedence over this delay value set due to an external scan trigger.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoP2P: Recover p2p_find operation in case of failure to fetch scan results
Sunil Dutt [Tue, 8 Dec 2020 06:18:13 +0000 (11:48 +0530)] 
P2P: Recover p2p_find operation in case of failure to fetch scan results

Add a handler to notify failures to fetch the scan results and provide
an option to override default behavior of requesting a new scan in one
second in such an error condition. Use this new handler mechanism to
continue the p2p_find operation (by invoking p2p_scan_res_handled) for
an interim scenario where the p2p_scan attempt fails to get the scan
results from the driver which can happen, e.g., if there are parallel
updates to the cfg80211 scan results.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoProcess QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH after NL80211_CMD_ROAM
Purushottam Kushwaha [Fri, 27 Nov 2020 10:23:33 +0000 (15:53 +0530)] 
Process QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH after NL80211_CMD_ROAM

NL80211_CMD_ROAM indication is scheduled via a kernel work queue, while
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH is a vendor event from the
driver. Thus, a race condition can exist wherein the vendor event is
received prior to the NL80211_CMD_ROAM indication.

The processing of this vendor event depends on the NL80211_CMD_ROAM
indication to update the roamed BSS/BSSID information and thus the out
of sequence processing of these events would result in not updating the
right BSS information.

This commit adds a workaround to hold the pending
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event for up to 100 ms in
case NL80211_CMD_ROAM is not received first.

Signed-off-by: Purushottam Kushwaha <pkushwah@codeaurora.org>
4 years agonl80211: Do not ignore disconnection event after a connection event
Vamsi Krishna [Fri, 18 Dec 2020 17:20:00 +0000 (22:50 +0530)] 
nl80211: Do not ignore disconnection event after a connection event

After a disconnect command is issued, wpa_supplicant generates a
disconnection event to self and ignores the next disconnection event
coming from the driver.  In a race condition in which the driver
generates a connected event due to roaming just before receiving the
disconnect command from userspace, wpa_supplicant processes the
connected event after processing the self-generated disconnection event
and enters WPA_COMPLETED state. The driver sends a disconnection event
after processing the disconnect command sent by wpa_supplicant but the
disconnection event is ignored by wpa_supplicant as the disconnection
event is considered to be a result of locally generated disconnect
command. Thus, wpa_supplicant continues to be in the connected
(WPA_COMPLETED) state though the driver is in disconnected state.

Fix this out-of-sync behavior between the driver and wpa_supplicant by
not ignoring the disconnection event from the driver because of the
locally generated disconnect command sent to the driver if there is a
connection event received after issuing the disconnect command to the
driver.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Update ap_open_unexpected_assoc_event to match implementation
Jouni Malinen [Mon, 21 Dec 2020 13:50:33 +0000 (15:50 +0200)] 
tests: Update ap_open_unexpected_assoc_event to match implementation

Now that wpa_supplicant ignores the unexpected association event in
disconnected-not-trying-to-connect state, this test cases needs to be
modified to avoid incorrect failures.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDrop unexpected connection event while disconnected
Vamsi Krishna [Thu, 3 Dec 2020 16:45:29 +0000 (22:15 +0530)] 
Drop unexpected connection event while disconnected

If there is a disconnect command from wpa_supplicant immediately after
the driver sends a connection event to userspace but before that event
is received and processed by wpa_supplicant, wpa_supplicant processes
the disconnect command and a self-generated disconnected event first
followed by the connected event received from the driver. As a result
wpa_supplicant moves to the WPA_COMPLETED state.  Whereas the driver
processes the disconnect command received from wpa_supplicant after it
sends the connected event and moves to the disconnected state. Due to
this race between the disconnect command from wpa_supplicant and the
connected event from the driver, wpa_supplicant is moving to the
connected state though the driver is moving to the disconnected state
which results in abnormal functionality.

Ignore the connection event coming from the driver when wpa_supplicant
is not trying to connect after a disconnect command is issued but before
the next connect command is issued to fix the above mentioned race
condition.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoVendor feature capability to notify TWT asynchronous response support
Sunil Dutt [Fri, 18 Dec 2020 04:36:19 +0000 (10:06 +0530)] 
Vendor feature capability to notify TWT asynchronous response support

The response for the respective TWT operations can either be synchronous
or asynchronous (wherever specified). If synchronous, the response to
this operation is obtained in the corresponding vendor command reply to
the user space. For asynchronous case, the response is obtained as an
event with the same operation type.

Drivers shall support either of these modes but not both simultaneously.
The support for asynchronous mode is advertised through the new flag
QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT. If the driver does not
include this flag, it shall support synchronous mode.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoNew TWT operations and attributes to TWT Setup and Nudge
Sunil Dutt [Tue, 24 Nov 2020 18:11:11 +0000 (23:41 +0530)] 
New TWT operations and attributes to TWT Setup and Nudge

Define the following additional TWT operations:
QCA_WLAN_TWT_GET_STATS, QCA_WLAN_TWT_CLEAR_STATS,
QCA_WLAN_TWT_GET_CAPABILITIES, QCA_WLAN_TWT_SETUP_READY_NOTIFY.

Also define new attributes to qca_wlan_vendor_attr_twt_setup
and qca_wlan_vendor_attr_twt_nudge.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP2: Add DPP_CONTROLLER commands to hostapd_cli and wpa_cli
Disha Das [Thu, 10 Dec 2020 06:05:32 +0000 (11:35 +0530)] 
DPP2: Add DPP_CONTROLLER commands to hostapd_cli and wpa_cli

Add the DPP control interface DPP_CONTROLLER_START and
DPP_CONTROLLER_STOP commands to the CLIs.

Signed-off-by: Disha Das <dishad@codeaurora.org>
4 years agoUse bool for is_6ghz variables and functions
Jouni Malinen [Fri, 11 Dec 2020 15:18:09 +0000 (17:18 +0200)] 
Use bool for is_6ghz variables and functions

Replace the implicit boolean checks that used int variables with use of
a more explicit bool variable type.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: setband with band combination
Jouni Malinen [Fri, 11 Dec 2020 15:10:30 +0000 (17:10 +0200)] 
tests: setband with band combination

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoExtend the setband support for 6 GHz and band combinations
Veerendranath Jakkam [Thu, 6 Aug 2020 06:34:48 +0000 (12:04 +0530)] 
Extend the setband support for 6 GHz and band combinations

Support possible band combinations of 2.4 GHz, 5 GHz, and 6 GHz with
QCA_WLAN_VENDOR_ATTR_SETBAND_MASK attribute. Ensure backwards
compatibility with old drivers that are using
QCA_WLAN_VENDOR_ATTR_SETBAND_VALUE attribute and supporting only 2.4 GHz
and 5 GHz bands.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
4 years agotests: Update scan_fail to match implementation change
Jouni Malinen [Fri, 11 Dec 2020 17:54:47 +0000 (19:54 +0200)] 
tests: Update scan_fail to match implementation change

The function name for adding frequency lists changed, so this test case
needs a matching change to avoid failures.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoscan: Add a helper function to append supported freqs from a given band
Veerendranath Jakkam [Fri, 20 Nov 2020 14:28:50 +0000 (19:58 +0530)] 
scan: Add a helper function to append supported freqs from a given band

This functionality was repeated for couple of times. Use a shared helper
function to avoid code duplication.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
4 years agoFix gcc-10 build with -Werror=array-bounds and dl_list_for_each()
Jouni Malinen [Fri, 4 Dec 2020 11:45:03 +0000 (13:45 +0200)] 
Fix gcc-10 build with -Werror=array-bounds and dl_list_for_each()

The earlier workaround for UBSAN issues in commit 3b6b3ae58133 ("Modify
dl_list_for_each() to not use unaligned access with WPA_TRACE") ended up
using a construction in which the type cast to the containing structure
was compared instead of the struct dl_list pointers. While that worked
around the UBSAN issue, it resulted in a comparison that gcc-10
interprets as being out of bounds for struct dl_list (which it obviously
is since this is to find the start of the containing structure).

Revert that workaround and instead, mark the struct dl_list used within
struct os_alloc_trace to have matching 16 octet alignment as the
containing structure. This is also restoring consistent design for
dl_list_for_each*().

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: HE: Add a test for wifi generation on 2.4 GHz
Johannes Berg [Tue, 13 Oct 2020 12:04:01 +0000 (14:04 +0200)] 
tests: HE: Add a test for wifi generation on 2.4 GHz

This was broken in the kernel in mac80211 for a while, until commit
780a8c9efc65 ("mac80211: do not disable HE if HT is missing on 2.4 GHz")
fixed it.

Add a test for wifi generation on 2.4 GHz in addition to the 5 GHz one.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agowolfSSL: Client cert loading API fix
Juliusz Sosinowicz [Wed, 21 Oct 2020 15:59:53 +0000 (17:59 +0200)] 
wolfSSL: Client cert loading API fix

Client cert loading API should check equality to SSL_SUCCESS for
success.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
4 years agonl80211: Report invalid signal and noise when info is unavailable
Avraham Stern [Tue, 3 Nov 2020 07:54:16 +0000 (09:54 +0200)] 
nl80211: Report invalid signal and noise when info is unavailable

When the driver sends a CQM RSSI threshold event, wpa_supplicant queries
the driver for the signal and noise values. However, it is possible that
by that time the station has already disconnected from the AP, so these
values are no longer valid. In this case, indicate that these values are
invalid by setting them to WPA_INVALID_NOISE.

Previously a value of 0 would be reported, which may be confusing as
this is a valid value.

Since nl80211_get_link_signal() and nl80211_get_link_noise() already set
invalid values for a case of failure, just use the value set by these
functions even if they fail.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
4 years agotests: remotehost: Introduce wait_event()
Janusz Dziedzic [Sat, 7 Nov 2020 10:49:15 +0000 (11:49 +0100)] 
tests: remotehost: Introduce wait_event()

Allow to run local/remote process like:
 - ubus listen
 - logread -f
 - tail -f
 - wpa_cli
 - hostapd_cli
And next wait for specific event(s).

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agotests: remotehost: Use correct name
Janusz Dziedzic [Sat, 7 Nov 2020 10:49:14 +0000 (11:49 +0100)] 
tests: remotehost: Use correct name

While we start thread use:
 - thread_run
 - therad_stop
 - thread_wait

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agowlantest: Allow missing RSNE in S1G beacon
Thomas Pedersen [Thu, 22 Oct 2020 18:20:32 +0000 (11:20 -0700)] 
wlantest: Allow missing RSNE in S1G beacon

S1G beacons save a few bytes by not requiring the RSNE in beacon if RSN
BSS is configured. Handle this in wlantest by only clearing RSNE from
the BSS info if frame is a Probe Response frame.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
4 years agotests: Skip dpp_enterprise_tcp tests without OpenSSL
Andrei Otcheretianski [Thu, 22 Oct 2020 15:01:37 +0000 (18:01 +0300)] 
tests: Skip dpp_enterprise_tcp tests without OpenSSL

Skip these tests if OpenSSL wasn't loaded, instead of crashing.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agotests: Determine number of parallel make jobs automatically
Jouni Malinen [Fri, 4 Dec 2020 09:49:04 +0000 (11:49 +0200)] 
tests: Determine number of parallel make jobs automatically

Use nproc (if available) instead of the hardcoded 8 parallel make jobs.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Skip test cases properly if tshark is not available
Jouni Malinen [Fri, 4 Dec 2020 09:43:45 +0000 (11:43 +0200)] 
tests: Skip test cases properly if tshark is not available

Instead of trying to process empty results, mark the test case as
skipped if tshark is not available.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix p2p_autogo_pref_chan_not_in_regulatory
Thomas Pedersen [Thu, 27 Aug 2020 22:58:55 +0000 (15:58 -0700)] 
tests: Fix p2p_autogo_pref_chan_not_in_regulatory

Sweden now allows channel 149 in the updated wireless-regdb. Choose
Japan for the negative test instead.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
4 years agoAdd option to ignore Probe Request frames when RSSI is too low
John Crispin [Wed, 12 Aug 2020 16:55:31 +0000 (18:55 +0200)] 
Add option to ignore Probe Request frames when RSSI is too low

Add a new hostapd configuration parameters rssi_ignore_probe_request to
ignore Probe Request frames received with too low RSSI.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agowpa_supplicant: Initial connection speedup
Frederik Juul [Thu, 23 Jul 2020 08:39:41 +0000 (08:39 +0000)] 
wpa_supplicant: Initial connection speedup

Add initial_freq_list to wpa_supplicant configuration. This option
allows wpa_supplicant to scan a smaller list of frequencies when it
starts. This in turn allows for a faster connection to an already known
network. This limit applies only for the initial scan operation and does
not restrict other channels from being used in consecutive scans.

Tests have shown this to reduce the amount of time for connecting to a
network from roughly 3 seconds to roughly 0.1 second.

Signed-off-by: Frederik Juul <frederik.juul@3shape.com>
4 years agotests: DFS and no available channel after radar detection
Jouni Malinen [Wed, 2 Dec 2020 14:47:28 +0000 (16:47 +0200)] 
tests: DFS and no available channel after radar detection

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDFS: Enter DFS state if no available channel is found
David Bauer [Sat, 4 Jul 2020 08:12:21 +0000 (10:12 +0200)] 
DFS: Enter DFS state if no available channel is found

Previously hostapd would not stop transmitting when a DFS event was
detected and no available channel to switch to was available.

Disable and re-enable the interface to enter DFS state. This way, TX
does not happen until the kernel notifies hostapd about the NOP
expiring.

Signed-off-by: David Bauer <mail@david-bauer.net>