]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
2 years agowlantest: Adjust kdk_len according to RSNX capability
Adil Saeed Musthafa [Wed, 1 Mar 2023 19:21:38 +0000 (11:21 -0800)] 
wlantest: Adjust kdk_len according to RSNX capability

This is needed to derive the PTK correct when Secure LTF support is used
and the additional KDK component needs to be taken into account.

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
2 years agotests: Remove dynamically added hostapd interfaces
Avraham Stern [Wed, 15 Feb 2023 23:09:03 +0000 (01:09 +0200)] 
tests: Remove dynamically added hostapd interfaces

When an in interface is added dynamically to hostapd with
HWSimRadio, it's not removed during device reset.
This requires to manually remove it, otherwise subsequent tests may
fail. Better do it during device reset.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2 years agotests: Clear sae_groups in eht_sae test
Andrei Otcheretianski [Wed, 15 Feb 2023 23:09:02 +0000 (01:09 +0200)] 
tests: Clear sae_groups in eht_sae test

Otherwise subsequent tests may fail.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoWPA_AUTH: MLO: Add functions to get the AA and SPA
Ilan Peer [Wed, 15 Feb 2023 23:08:50 +0000 (01:08 +0200)] 
WPA_AUTH: MLO: Add functions to get the AA and SPA

As a preparation to use AP MLD address and non-AP MLD address
in the RSN Authenticator state machine, add utility functions to
get the current AA and SPA.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP: Split check_assoc_ies()
Ilan Peer [Wed, 15 Feb 2023 23:08:30 +0000 (01:08 +0200)] 
AP: Split check_assoc_ies()

As a preparation for processing an association request with
ML element, split the function such that the elements checking
would be separate from parsing.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agocommon: Support parsing link specific association request
Ilan Peer [Wed, 15 Feb 2023 23:08:29 +0000 (01:08 +0200)] 
common: Support parsing link specific association request

An association request in the context of an MLO connection can
contain an ML element that holds the per station profile for
the additional links negotiated. To support this, add a function
to parse the per station profile.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agocommon: Add support for clearing elements
Ilan Peer [Wed, 15 Feb 2023 23:08:28 +0000 (01:08 +0200)] 
common: Add support for clearing elements

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2 years agocommon: Split ieee8021_parse_elems()
Ilan Peer [Wed, 15 Feb 2023 23:08:27 +0000 (01:08 +0200)] 
common: Split ieee8021_parse_elems()

As a preparation to parse management frames that include ML elements
with per station profiles, split the function to a helper function that
would not memset() the elements structure.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2 years agonl80211: AP MLD support for adding multi link stations
Andrei Otcheretianski [Wed, 15 Feb 2023 23:08:26 +0000 (01:08 +0200)] 
nl80211: AP MLD support for adding multi link stations

Multi link stations are represented in the kernel using a single
station with multiple links and the first ADD_STA command also
creates the first link. Subsequent links should be added with
LINK_ADD commands.

Implement this logic and provide the required MLD information per
station/link.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agonl80211: Properly stop and deinit MLO AP
Andrei Otcheretianski [Wed, 15 Feb 2023 23:08:21 +0000 (01:08 +0200)] 
nl80211: Properly stop and deinit MLO AP

Delete all the links and stop beaconing on all the links on AP
deinit/stop.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agonl80211: Provide link_id in EAPOL_RX and RX_MGMT events
Andrei Otcheretianski [Wed, 15 Feb 2023 23:08:19 +0000 (01:08 +0200)] 
nl80211: Provide link_id in EAPOL_RX and RX_MGMT events

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agonl80211: Introduce and implement a callback to add an MLO link for AP MLD
Ilan Peer [Wed, 15 Feb 2023 23:08:16 +0000 (01:08 +0200)] 
nl80211: Introduce and implement a callback to add an MLO link for AP MLD

Add a driver callback to add a link to an AP interface.
As the kernel removes all links on underline interface removal, there
is currently no need to support individual link removal.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agonl80211: Refactor i802_bss to support multiple links
Ilan Peer [Wed, 15 Feb 2023 23:08:15 +0000 (01:08 +0200)] 
nl80211: Refactor i802_bss to support multiple links

Refactor struct i802_bss to support multiple links as a
preparation to support MLD AP.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2 years agoAP: Add some bridge port attribute settings
Anthony Refuerzo [Thu, 23 Feb 2023 04:57:23 +0000 (20:57 -0800)] 
AP: Add some bridge port attribute settings

"multicast_to_unicast" and "hairpin_mode" are usually set outside of
hostapd. However, DFS channel change events pull the BSS out of the
bridge causing these attributes to be lost. Make these settings tunable
within hostapd so they are retained after the BSS is brought up again.

Signed-off-by: Anthony Refuerzo <anthony96922@gmail.com>
2 years agonl80211: Make sure scan frequency debug buffer is NUL terminated
Jouni Malinen [Wed, 1 Mar 2023 08:38:02 +0000 (10:38 +0200)] 
nl80211: Make sure scan frequency debug buffer is NUL terminated

In theory, os_snprintf() could have filled the buffer to the end and
while the pos variable would not have been incremented beyond that,
there would not necessarily be a NUL termination at the end. Force the
array to end in NUL just in case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Fix frequencies array boundary check for scanned frequencies
Avraham Stern [Tue, 28 Feb 2023 11:10:01 +0000 (13:10 +0200)] 
nl80211: Fix frequencies array boundary check for scanned frequencies

The number of frequencies is increased before the boundary check,
thus it should be allowed to be equal to the number of elements in
the array. Update the limit to allow the full array to be used.

In addition, add the missing byte for the NULL terminator for the debug
print to be able to fit all values (assuming they are <= 9999 MHz).

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2 years agoAndroid: Add wowlan_disconnect_on_deinit to template configuration
Hu Wang [Wed, 22 Feb 2023 07:35:44 +0000 (23:35 -0800)] 
Android: Add wowlan_disconnect_on_deinit to template configuration

Add wowlan_disconnect_on_deinit=1 to wpa_supplicant_template, as
Android expects STA to be disconnected when wpa_supplicant is
terminated.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoEST: Write the RSA private key using the standard PRIVATE KEY format
Jouni Malinen [Thu, 23 Feb 2023 14:44:38 +0000 (16:44 +0200)] 
EST: Write the RSA private key using the standard PRIVATE KEY format

The routines used for using raw RSA keys directly have been deprecated
in OpenSSL 3.0. There should be no particular need to use the "RSA
PRIVATE KEY" format, so replace this with the more common "PRIVATE KEY"
format that can be written without use of the deprecated functions.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowebkit2: Avoid deprecated function call
Jouni Malinen [Thu, 23 Feb 2023 14:30:04 +0000 (16:30 +0200)] 
webkit2: Avoid deprecated function call

webkit_web_context_set_tls_errors_policy() has been deprecated. Use its
replacement webkit_website_data_manager_set_tls_errors_policy() when
building against sufficiently recent version of webkit2.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Filter out 6 GHz frequencies if not allowed for P2P connection
Shivani Baranwal [Tue, 14 Feb 2023 12:11:01 +0000 (17:41 +0530)] 
P2P: Filter out 6 GHz frequencies if not allowed for P2P connection

Add check to filter out 6 GHz frequencies from the local driver
frequency preference list when 6 GHz is not allowed for the P2P
connection. Earlier, 6 GHz frequency channels were included in the
preferred list if the p2p_6ghz_disable parameter was not set
irrespective of the allow_6ghz parameter.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoUpdate PMK in wpa_sm when roam+auth event indicated with authorized flag
Veerendranath Jakkam [Thu, 16 Feb 2023 16:52:13 +0000 (22:22 +0530)] 
Update PMK in wpa_sm when roam+auth event indicated with authorized flag

Currently, the PMK used by the driver is not updated to wpa_sm when
roaming is completed by the driver with the cached PMKSA and the
roam+auth event is indicated with the authorized flag.

To fix this, identify the PMKSA entry from the PMKID sent in
Reassociation Request frame and update the correct PMK to wpa_sm from
the PMKSA entry.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agonl80211: Replace the channel flags for VHT support
Avraham Stern [Mon, 2 Jan 2023 09:17:26 +0000 (11:17 +0200)] 
nl80211: Replace the channel flags for VHT support

The flags that indicate that a channel is allowed for 80/160 MHz use
are divided according to the position of the control channel (e.g.,
HOSTAPD_CHAN_VHT_10_70, HOSTAPD_CHAN_VHT_30_50, etc.).

However, the position of the control channel does not add any extra
regulatory information because when trying to use a 80/160 MHz channel
all the desired bandwidth has to be allowed for 80/160 MHz use,
regardless of the control channel position.

In addition, these flags are set only if the driver reports one
regulatory rule that allows the entire 80/160 MHz bandwidth.
However, even when a 80/160 MHz channel is allowed, in some cases the
bandwidth will be split into several regulatory rules because
different segments of the bandwidth differ in other flags (that don't
affect the use of the bandwidth for VHT channels). So, in such cases
these flags will not be set, although VHT channels are allowed.

As the result, VHT channels will not be used although they are allowed
by the regulatory domain.

Fix this by introducing new flags that indicate if a 2 0MHz channel is
allowed to be used as a part of a wider (80/160 MHz) channel.
The new flags are set for each 20 MHz channel independently and thus
will be set even if the regulatory rules for the bandwidth are split.

A 80/160 MHz channel is allowed if all its 20 MHz sub-channels are
allowed for 80/160 MHz usage.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agotests: Fix python3 processing of Popen output reading
Jouni Malinen [Wed, 22 Feb 2023 19:21:54 +0000 (21:21 +0200)] 
tests: Fix python3 processing of Popen output reading

Need to decode cmd.stdout.read() output before using it as a string.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: DPP Configurator and @CONF-OBJ-SEP@
Jouni Malinen [Wed, 22 Feb 2023 15:08:57 +0000 (17:08 +0200)] 
tests: DPP Configurator and @CONF-OBJ-SEP@

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoDPP: Allow both STA and AP configObject to be set
Jouni Malinen [Wed, 22 Feb 2023 15:07:07 +0000 (17:07 +0200)] 
DPP: Allow both STA and AP configObject to be set

Extend @CONF-OBJ-SEP@ behavior to allow the second entry to be used for
different netRole. In other words, allow both the AP and STA netRole
(though, only a single one per netRole) configuration to be set.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoDPP: Fix @CONF-OBJ-SEP@ parsing for multiple configs
Jouni Malinen [Wed, 22 Feb 2023 15:01:58 +0000 (17:01 +0200)] 
DPP: Fix @CONF-OBJ-SEP@ parsing for multiple configs

The first call to dpp_configuration_parse_helper() was supposed to use
the separately prepared tmp string with only the first configuration
entry, but it ended up using the full string that included both
configuration entries. This could result in the first configObject
getting a mix of parameters from both entries.

Fix the parsing to use only the text before the @CONF-OBJ-SEP@ separator
for the first entry.

Fixes: 7eb06a33697f ("DPP2: Allow multiple Config Objects to be build on Configurator")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: P2P persistent group re-invocation (go_bssid) with cfg80211 P2P Device
Jouni Malinen [Wed, 22 Feb 2023 12:12:58 +0000 (14:12 +0200)] 
tests: P2P persistent group re-invocation (go_bssid) with cfg80211 P2P Device

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Allow GO BSSID to be specified for P2P_GROUP_ADD commands
Jouni Malinen [Wed, 22 Feb 2023 12:11:17 +0000 (14:11 +0200)] 
P2P: Allow GO BSSID to be specified for P2P_GROUP_ADD commands

This allows the control interface to be used similarly to the way D-Bus
interface was extended to force a specific GO BSSID for optimizing
scanning.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Optimize join scan frequency
Matthew Wang [Wed, 22 Feb 2023 00:46:16 +0000 (16:46 -0800)] 
P2P: Optimize join scan frequency

Allow clients to specify the BSSID of an auto GO. If the auto GO has been
discovered on another interface, optimize scan frequency by performing
a single channel scan first. Android and ChromeOS use this to streamline
auto GO discovery.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
2 years agonl80211: Add frequency info in start AP command
Harshitha Prem [Wed, 22 Feb 2023 03:59:01 +0000 (09:29 +0530)] 
nl80211: Add frequency info in start AP command

When ACS is configured in multiple BSS case, sometimes a virtual AP
interface does not come up as the channel context information between
different BSSs of the same band does not match.

Same behavior is observed in case of multiple band/hardware under a
single wiphy, when we bring up multiple virtual interface in various
bands simultaneously and the kernel maps a random channel as it has more
than one channel context, e.g., say a 2.4 GHz channel to a 5 GHz virtual
AP interface when the start AP command is sent. This is because the
frequency information is not present in the command.

Add the frequency information into the start AP netlink command so that
the kernel maps the appropriate channel context by parsing it instead of
using a previous set channel information.

Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
2 years agotests: Make PASN checks for PTKSA_CACHE_LIST a bit more robust
Jouni Malinen [Tue, 21 Feb 2023 17:46:17 +0000 (19:46 +0200)] 
tests: Make PASN checks for PTKSA_CACHE_LIST a bit more robust

It was apparently possible for the test script to fetch the
PTKSA_CACHE_LIST information from hostapd before the PASN message 3 had
been processed since only the event from wpa_supplicant related to
sending of that frame was explicitly waited for. Add a small wait to try
to avoid this race condition with UML time-travel.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agomacsec_linux: Add support for MACsec hardware offload
Emeel Hakim [Tue, 14 Feb 2023 08:26:57 +0000 (10:26 +0200)] 
macsec_linux: Add support for MACsec hardware offload

This uses libnl3 to communicate with the macsec module available on
Linux. A recent enough version of libnl is needed for the hardware
offload support.

Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
2 years agomka: Allow configuration of MACsec hardware offload
Emeel Hakim [Tue, 14 Feb 2023 08:26:56 +0000 (10:26 +0200)] 
mka: Allow configuration of MACsec hardware offload

Add new configuration parameter macsec_offload to allow user to set up
MACsec hardware offload feature.

Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
2 years agotests: Country information in hostapd STATUS
Jouni Malinen [Tue, 21 Feb 2023 15:36:28 +0000 (17:36 +0200)] 
tests: Country information in hostapd STATUS

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agohostapd: Output country_code and country3 when using STATUS
Antonio Prcela [Mon, 20 Feb 2023 22:14:39 +0000 (23:14 +0100)] 
hostapd: Output country_code and country3 when using STATUS

Add the country_code and country3 config parameter to the STATUS output
to easier determine the current values for each of an hostapd
access point. Currently neither STATUS, GET [country_code/country3] nor
GET_CONFIG output it.

This is useful if the hostapd access point has been created with
wpa_ctrl_request() without using a *.conf file (like hostapd.conf).

Signed-off-by: Antonio Prcela <antonio.prcela@gmail.com>
Signed-off-by: Antonio Prcela <antonio.prcela@sartura.hr>
2 years agotests: PASN/KDK derivation with FT
Jouni Malinen [Tue, 21 Feb 2023 14:48:13 +0000 (16:48 +0200)] 
tests: PASN/KDK derivation with FT

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Store PTKSA entry for the correct BSSID in the FT protocol case
Jouni Malinen [Tue, 21 Feb 2023 15:25:50 +0000 (17:25 +0200)] 
FT: Store PTKSA entry for the correct BSSID in the FT protocol case

sm->bssid has not yet been updated here, so use the provided bssid
instead. This avoids replacing the PTKSA entry for the previous AP when
a new PTKSA is being stored while using the FT protocol.

Fixes: d70060f9665a ("WPA: Add PTKSA cache to wpa_supplicant for PASN")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMark addr argument to storing PTKSA const
Jouni Malinen [Tue, 21 Feb 2023 15:24:30 +0000 (17:24 +0200)] 
Mark addr argument to storing PTKSA const

This is not being modified, so mark it const to be more flexible for the
caller.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Store PTKSA from FT protocol
Jouni Malinen [Tue, 21 Feb 2023 15:20:47 +0000 (17:20 +0200)] 
FT: Store PTKSA from FT protocol

PTKSA was stored for the 4-way handshake and FILS cases, but not when it
was being derived through the use of the FT protocol.

Fixes: f2f8e4f45830 ("Add PTKSA cache to hostapd")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMark wpa_auth_remove_ptksa() static
Jouni Malinen [Tue, 21 Feb 2023 15:10:40 +0000 (17:10 +0200)] 
Mark wpa_auth_remove_ptksa() static

This function is not used outside wpa_auth.c and it is not mentioned in
any header file either, so it should have been marked static.

Fixes: f2f8e4f45830 ("Add PTKSA cache to hostapd")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Include KDK in FT specific PTK derivation on the AP
Shiva Sankar Gajula [Tue, 21 Feb 2023 04:09:35 +0000 (09:39 +0530)] 
FT: Include KDK in FT specific PTK derivation on the AP

FT AP was silently ignoring EAPOL-Key msg 2/4 due to Key MIC mismatch
when the STA advertises support for Secure LTF and derives the KDK while
the AP implementation did not derive KDK.

Fix this to include KDK while deriving PTK for FT cases on the AP.

Signed-off-by: Shiva Sankar Gajula <quic_sgajula@quicinc.com>
2 years agonl80211: Report guard interval and dual carrier modulation
David Ruth [Sat, 7 Jan 2023 07:29:17 +0000 (07:29 +0000)] 
nl80211: Report guard interval and dual carrier modulation

Allows collecting and exposing more information about the station's
current connection from the kernel to the connection manager.

* Add an enum to represent guard interval settings to driver.h.
* Add fields for storing guard interval and dual carrier modulation
  information into the hostap_sta_driver_data struct.
* Add bitmask values indicating the presence of fields.
  * STA_DRV_DATA_TX_HE_DCM
  * STA_DRV_DATA_RX_HE_DCM
  * STA_DRV_DATA_TX_HE_GI
  * STA_DRV_DATA_RX_HE_GI
* Retrieve NL80211_RATE_INFO_HE_GI and NL80211_RATE_INFO_HE_DCM in
  get_sta_handler(), and set appropriate flags.

Signed-off-by: David Ruth <druth@chromium.org>
2 years agodbus: Add inactive time to D-Bus signal info
David Ruth [Thu, 22 Dec 2022 20:54:41 +0000 (20:54 +0000)] 
dbus: Add inactive time to D-Bus signal info

This enables connection managers to receive and use this information in
the same manner that other station information is exposed.

Signed-off-by: David Ruth <druth@chromium.org>
2 years agodbus: Add D-Bus signal for PSK mismatch heuristics
Yichen Yu [Tue, 20 Dec 2022 07:08:41 +0000 (07:08 +0000)] 
dbus: Add D-Bus signal for PSK mismatch heuristics

As a workup action during disassociation, wpa_supplicant checks if the
disconnection could have been caused by PSK mismatch during WPA 4-way
handshake with function could_be_psk_mismatch() in event.c. A MSG_INFO
message will be sent on the control interface when there could be a PSK
mismatch, and this heuristic can be useful to indicate if the
disconnection is caused by a wrong passphrase provided by the user.
Here, propagate a new D-Bus signal 'PskMismatch' to notify other
applicantions.

Signed-off-by: Yichen Yu <yichenyu@chromium.org>
2 years agoP2P: Make invitation flow less aggressive
Ayala Beker [Mon, 19 Dec 2022 12:52:38 +0000 (14:52 +0200)] 
P2P: Make invitation flow less aggressive

Currently invitation request wait time is very long and not needed for
sending a single Action frame only. To not interfere with other parallel
channel activities, decrease the wait time to to 150 ms in case of an
active P2P GO on the system.

In addition, if a P2P GO tries to invite a client that doesn't respond,
it will attempt to invite again after 100 ms. This is too aggressive and
may result in missing beacon transmission and affecting GO activity on
its operating channel. Increase the timeout to 120 ms, to allow enough
time for beacon transmission.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoRework IBSS/mesh 80 MHz channel selection
Nicolas Cavallari [Wed, 15 Feb 2023 17:02:53 +0000 (18:02 +0100)] 
Rework IBSS/mesh 80 MHz channel selection

- Do not try to enable 80 MHz if 40 MHz is disabled or not selected (e.g.,
  due to obss_scan).
- If it is not possible to use 80 HMz or even 40 MHz, still attempt to
  configure HE40/VHT40/HE20/VHT20 instead of bailing out.
- When bailing out, also disable HE.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2 years agoFix creating 6 GHz IBSS/mesh on 5/6 GHz-capable PHYs
Nicolas Cavallari [Wed, 15 Feb 2023 17:02:52 +0000 (18:02 +0100)] 
Fix creating 6 GHz IBSS/mesh on 5/6 GHz-capable PHYs

If the PHY supports both 5 GHz and 6 GHz bands, there will be two
different struct hostapd_hw_modes with mode HOSTAPD_MODE_IEEE80211A,
one for each band, with potentially different capabilities.

Check that the struct hostapd_hw_modes actually contains the frequency
before selecting it.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2 years agoMake arrays static const in ibss_mesh_select_*()
Nicolas Cavallari [Wed, 15 Feb 2023 17:02:51 +0000 (18:02 +0100)] 
Make arrays static const in ibss_mesh_select_*()

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2 years agoSplit ibss_mesh_setup_freq() into multiple functions
Nicolas Cavallari [Wed, 15 Feb 2023 17:02:50 +0000 (18:02 +0100)] 
Split ibss_mesh_setup_freq() into multiple functions

ibss_mesh_setup_freq() has become a 342 line function with 23 local
variables, 1 or 2 goto labels depending on ifdefs and its logic is
quite unpredictable.

Split it into multiple functions. No functional change intended, it
should be bug-compatible with the original code, except for some log
messages that are skipped more often.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2 years agotests: WPA2-PSK and STA using 4addr mode
Jouni Malinen [Mon, 20 Feb 2023 22:12:22 +0000 (00:12 +0200)] 
tests: WPA2-PSK and STA using 4addr mode

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowpa_supplicant: Add option to explicitly set 4addr mode
Konstantinos Natsakis [Wed, 1 Feb 2023 00:16:18 +0000 (02:16 +0200)] 
wpa_supplicant: Add option to explicitly set 4addr mode

Add a new network profile option enable_4addr_mode=1 that puts an
interface in 4addr mode, for interfaces meant to be added to a bridge.

Signed-off-by: Konstantinos Natsakis <infradead.org@aleph-0.net>
2 years agoApply bias towards 6 GHz in roaming
Kaidong Wang [Fri, 3 Feb 2023 02:05:40 +0000 (02:05 +0000)] 
Apply bias towards 6 GHz in roaming

wpa_supplicant_need_to_roam_within_ess() applies bias to the minimum
difference of the signal level required to roam if the roam is from 2.4
GHz to higher band, but doesn't apply bias if the roam is from a lower
band to 6 GHz. Add bias towards 6 GHz, as 6 GHz networks usually provide
higher throughput.

Signed-off-by: Kaidong Wang <kaidong@chromium.org>
2 years agotests: WNM event report
Jouni Malinen [Mon, 20 Feb 2023 19:42:25 +0000 (21:42 +0200)] 
tests: WNM event report

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoWNM: Event report handling for BSS color collision and in-use
Yi-Chia Hsieh [Tue, 14 Feb 2023 23:07:58 +0000 (15:07 -0800)] 
WNM: Event report handling for BSS color collision and in-use

Add support for WNM event report handling for the BSS color collision
and in use events.

Co-developed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
2 years agoSmall textual improvements to wpa_supplicant man page
Remco Rijnders [Wed, 1 Feb 2023 17:07:08 +0000 (12:07 -0500)] 
Small textual improvements to wpa_supplicant man page

Signed-off-by: Remco Rijnders <remco@webconquest.com>
2 years agohostapd: Output hw_mode when using STATUS
Antonio Prcela [Thu, 2 Feb 2023 23:02:07 +0000 (00:02 +0100)] 
hostapd: Output hw_mode when using STATUS

Adding the hw_mode config parameter to the STATUS output to easier
determine the current hw_mode of an hostapd access-point. Currently
neither STATUS, GET hw_mode, nor GET_CONFIG output it.

Useful if the hostapd access point has been created with
wpa_ctrl_request() without using a *.conf file, like hostapd.conf.

Signed-off-by: Antonio Prcela <antonio.prcela@gmail.com>
Signed-off-by: Antonio Prcela <antonio.prcela@sartura.hr>
2 years agoEAP-TTLS server: Add Ident field to MS-CHAP-Error
Yihong Wu [Thu, 9 Feb 2023 12:44:50 +0000 (07:44 -0500)] 
EAP-TTLS server: Add Ident field to MS-CHAP-Error

Per RFC 2548, 2.1.5, MS-CHAP-Error contains an Ident field of one octet
followed by an ASCII message. Add the missing Ident field.

Signed-off-by: Yihong Wu <wu@domosekai.com>
2 years agoP2P: Pick the best driver pref freq for invitation process
Hu Wang [Mon, 20 Feb 2023 01:10:37 +0000 (17:10 -0800)] 
P2P: Pick the best driver pref freq for invitation process

Move the logic of picking the best driver pref freq into a separate
function, and use this to extend the functionality for invitation
process.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Ignore dpp-ca.py in git status
Jouni Malinen [Fri, 17 Feb 2023 14:25:33 +0000 (16:25 +0200)] 
tests: Ignore dpp-ca.py in git status

Some of the test cases can use dpp-ca.py symlink to sigma-dut.git. That
symlink is not in the repository, so ignore it explicitly in git status.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Clear SAE groups for dpp_ap_config_sae
Jouni Malinen [Fri, 17 Feb 2023 14:20:20 +0000 (16:20 +0200)] 
tests: Clear SAE groups for dpp_ap_config_sae

This is needed to avoid failures due to previously executed test cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoSend broadcast Probe Response frames on the 6 GHz band
Hari Chandrakanthan [Fri, 10 Feb 2023 12:40:14 +0000 (18:10 +0530)] 
Send broadcast Probe Response frames on the 6 GHz band

Change Probe Response frames to be sent as broadcast for 6 GHz band per
IEEE Std 802.11ax‐2021, 26.17.2.3.2: "If a 6 GHz AP receives a Probe
Request frame and responds with a Probe Response frame (per 11.1.4.3.4),
the Address 1 field of the Probe Response frame shall be set to the
broadcast address, unless the AP is not indicating its actual SSID in
the SSID element of its Beacon frames."

Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
2 years agoMLD STA: Indicate MLO support in NL80211_CMD_CONNECT
Veerendranath Jakkam [Wed, 19 Oct 2022 14:14:08 +0000 (19:44 +0530)] 
MLD STA: Indicate MLO support in NL80211_CMD_CONNECT

Send NL80211_ATTR_MLO_SUPPORT flag in NL80211_CMD_CONNECT to indicate
wpa_supplicant has support to handle MLO connection for SME-in-driver
case.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Add support for SAE external authentication offload to userspace
Veerendranath Jakkam [Wed, 19 Oct 2022 14:14:06 +0000 (19:44 +0530)] 
MLD STA: Add support for SAE external authentication offload to userspace

Enable MLO for SAE authentication when the driver indicates the AP MLD
address in an external authentication request. The MAC address of the
interface on which the external authentication request received will be
used as the own MLD address.

This commit does below for enabling MLO during external SAE
authentication:
- Use MLD addresses for SAE authentication.
- Add Basic Multi-Link element with the own MLD address in SAE
  Authentication frames.
- Send SAE Authentication frames with the source address as the own MLD
  address, destination address and BSSID as the AP MLD address to the
  driver.
- Validate the MLD address indicated by the AP in SAE Authentication
  frames against the AP MLD address indicated in external authentication
  request.
- Store the PMKSA with the AP MLD address after completing SAE
  authentication.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoqca-vendor: Add QCA_WLAN_VENDOR_MCC_QUOTA_TYPE_LOW_LATENCY
Liangwei Dong [Fri, 3 Feb 2023 03:26:07 +0000 (11:26 +0800)] 
qca-vendor: Add QCA_WLAN_VENDOR_MCC_QUOTA_TYPE_LOW_LATENCY

Add QCA_WLAN_VENDOR_MCC_QUOTA_TYPE_LOW_LATENCY attribute
to enable/disable Multi-Channel concurrency low latency mode.
The firmware will do optimization of channel time quota for
low latency in Multi-Channel concurrency state if enabled.

Signed-off-by: Liangwei Dong <quic_liangwei@quicinc.com>
2 years agotests: Clear SAE groups before the HE 6 GHz test cases
Jouni Malinen [Tue, 14 Feb 2023 11:55:36 +0000 (13:55 +0200)] 
tests: Clear SAE groups before the HE 6 GHz test cases

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: FT and VLAN in wpa_psk file
Jouni Malinen [Tue, 14 Feb 2023 09:26:58 +0000 (11:26 +0200)] 
tests: FT and VLAN in wpa_psk file

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFT: Store PMK-R0/PMK-R1 after EAPOL-Key msg 2/4 MIC validation
Jouni Malinen [Tue, 14 Feb 2023 09:29:30 +0000 (11:29 +0200)] 
FT: Store PMK-R0/PMK-R1 after EAPOL-Key msg 2/4 MIC validation

hostapd was previously storing the derived PMK-R0 and PMK-R1 as soon as
these keys were derived. While that is fine for most purposes, it is
unnecessary to do that so quickly and if anything were to fail before
the supplicant is able to return a valid EAPOL-Key msg 2/4, there would
not really be any real use for the derived keys.

For the special case of FT-PSK and VLAN determination based on the
wpa_psk file, the VLAN information is set in the per-STA data structures
only after the EAPOL-Key msg 2/4 MIC has been verified. This ended up
storing the PMK-R0/PMK-R1 entries without correct VLAN assignment and as
such, any use of the FT protocol would not be able to transfer the VLAN
information through RRB.

Split local storing of the FT key hierarchy for the cases using the FT
4-way handshake so that PMK-R0 and PMK-R1 are first derived and then
stored as a separate step after having verified the MIC in the EAPOL-Key
msg 2/4 (i.e., after having confirmed the per-STA passphrase/PSK was
selected) and VLAN update. This fixes VLAN information for the
wpa_psk_file cases with FT-PSK.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Verify hostapd STA vlan_id value
Jouni Malinen [Mon, 13 Feb 2023 21:17:08 +0000 (23:17 +0200)] 
tests: Verify hostapd STA vlan_id value

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Parse Multi-Link element in (re)association frames
Jouni Malinen [Mon, 13 Feb 2023 19:34:58 +0000 (21:34 +0200)] 
wlantest: Parse Multi-Link element in (re)association frames

Print the details from the Multi-Link elements from the association
exchange.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoRefine vendor subcmd QCA_NL80211_VENDOR_SUBCMD_ROAM_STATS
Chunquan Luo [Tue, 7 Feb 2023 04:02:05 +0000 (12:02 +0800)] 
Refine vendor subcmd QCA_NL80211_VENDOR_SUBCMD_ROAM_STATS

During implementation of commit 257b119c2d87 ("QCA vendor attribute of
update roaming cached statistics info") some deficiencies were noted as
listed below, so fix them. Since these are pre-implementation changes,
no ABI breakage is introduced.

1) Change all RSSI values to be signed values.
2) Add enums for scan type and dwell type instead of documenting
   their values with comments
3) Add missing QCA_ROAM_REASON_STA_KICKOUT to enum qca_roam_reason

Signed-off-by: Chunquan Luo <quic_chunquan@quicinc.com>
2 years agotests: Make pmksa_cache_and_cui more robust
Jouni Malinen [Fri, 10 Feb 2023 11:11:54 +0000 (13:11 +0200)] 
tests: Make pmksa_cache_and_cui more robust

Make sure hostapd has had time to complete 4-way handshake processing
before initiating reauthentication from wpa_supplicant. There is a small
window for race condition here when testing with UML and time travel.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: MACsec with EAP-PSK
Jouni Malinen [Fri, 10 Feb 2023 10:41:03 +0000 (12:41 +0200)] 
tests: MACsec with EAP-PSK

This verifies use of a shorter than 65 octet EAP Session-Id.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMACsec: Remove EAP Session-Id length constraint
Jouni Malinen [Fri, 10 Feb 2023 10:31:01 +0000 (12:31 +0200)] 
MACsec: Remove EAP Session-Id length constraint

The initial MACsec implementation required the EAP Session-Id to be at
least 65 octets long and by truncating the value to that length, the
practical limit of functional cases was limited to that exact length of
65 octets. While that happens to work with EAP method that use TLS, it
does not work with most other EAP methods.

Remove the EAP Session-Id length constraint and allow any length of the
Session-Id as long as the EAP method provides one. In addition, simplify
this be removing the unnecessary copying of the Session Id into a new
allocated buffer.

Fixes: dd10abccc86d ("MACsec: wpa_supplicant integration")
Fixes: a93b369c17b3 ("macsec: Support IEEE 802.1X(EAP)/PSK MACsec Key Agreement in hostapd")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agohostapd: Report error on unknown ACCEPT_ACL/DENY_ACL commands
Raphaël Mélotte [Wed, 4 Jan 2023 15:53:50 +0000 (16:53 +0100)] 
hostapd: Report error on unknown ACCEPT_ACL/DENY_ACL commands

Currently when using ACCEPT_ACL or DENY_ACL, no error is reported if
the rest of the command is unknown (e.g. 'ACCEPT_ACL FOOBAR' reports
'OK').

On the other hand, hostapd_cli makes it possible to use 'accept_acl'
and 'deny_acl' in lowercase, but the rest of the command (i.e. 'SHOW',
'ADD_MAC', 'CLEAR', etc) must be in uppercase.

As a result, the command 'accept_acl clear' could seem valid when
using hostapd_cli (as it reports 'OK'), while it actually does not do
anything (because 'clear' must be in uppercase).

To let users know whether the command really succeeded or not, report
an error when the command was not understood.

Note that this is also consistent with the way it is currently
implemented in wpa_supplicant.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
2 years agoutils: Move log2pcap to python3
Mordechay Goodstein [Mon, 2 Jan 2023 14:44:16 +0000 (16:44 +0200)] 
utils: Move log2pcap to python3

python2 is deprecated so move script to python3.
While at it, make some minor adjustments.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoFix BSS age underflow
Krishna T [Mon, 9 Jan 2023 20:09:10 +0000 (01:39 +0530)] 
Fix BSS age underflow

While checking for stale BSSes, the current time is used as a basis and
then based on age the stale check time is calculated, but if this is
done too early in the boot and if either BOOTTIME/MONOTONIC (the one
Zephyr uses by default) are used then the stale check time underflows
and goes to future causing active BSS entries in the scan to be treated
as stale and flushed.

Fix this by adding a check before calculating stale time and ignore this
check till the system reaches the BSS expiration time (this would never
happen with REALTIME clock).

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Signed-off-by: Sridhar Nuvusetty <sridhar.nuvusetty@nordicsemi.no>
2 years agotests: wpa_supplicant config file parsing of an invalid network
Jouni Malinen [Wed, 1 Feb 2023 16:21:55 +0000 (18:21 +0200)] 
tests: wpa_supplicant config file parsing of an invalid network

This is a regression test for a NULL pointer dereferencing from commit
d8d2b3a338a1 ("Implement read-only mode for SSIDs from the additional
config (-I)") .

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFix segfault in case of an invalid configuration
Krishna [Sun, 15 Jan 2023 19:58:54 +0000 (01:28 +0530)] 
Fix segfault in case of an invalid configuration

The RO variable is being assigned before the SSID is NULL checked, so,
any invalid configuration leads to a segmentation fault.

Fixes: d8d2b3a338a1 ("Implement read-only mode for SSIDs from the additional config (-I)")
Signed-off-by: Chaitanya Tata <chaitanya.tk17@gmail.com>
2 years agotests: Clear sae_groups in radius_sae_password
Jouni Malinen [Tue, 31 Jan 2023 10:00:18 +0000 (12:00 +0200)] 
tests: Clear sae_groups in radius_sae_password

This is needed to avoid failures caused by previous test cases having
left behind constraints on the allowed groups.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMLD STA: Use AP MLD address in PMKSA cache attempts for driver-SME case
Veerendranath Jakkam [Sat, 24 Dec 2022 09:41:05 +0000 (15:11 +0530)] 
MLD STA: Use AP MLD address in PMKSA cache attempts for driver-SME case

The previous implementation handles PMKSA cache attempts with AP MLD
address only for SME-in-wpa_supplicant cases since wpa_s->valid_links
wouldn't be set for SME-in-driver cases.

Fix SME-in-driver behavior by enabling PMKSA cache attempts with AP MLD
address when driver supports MLO and SME offload to driver.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Store PMKSA with AP MLD address for MLO connection event
Veerendranath Jakkam [Sat, 24 Dec 2022 09:53:46 +0000 (15:23 +0530)] 
MLD STA: Store PMKSA with AP MLD address for MLO connection event

Store PMKSA with AP MLD address while processing connect event for OWE
and FILS when the connection is MLO capable.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoSAE: Update PT value at later point for SME cases, if needed
Jouni Malinen [Mon, 30 Jan 2023 21:09:53 +0000 (23:09 +0200)] 
SAE: Update PT value at later point for SME cases, if needed

It was possible to hit a case where the SAE PT had not yet been derived,
e.g., when using P2P group re-invocation. Update PT use at the time
authentication is started, if needed, to avoid this. While this is not
really ideal from the externally observable timing view point, this is
done only for the case where there is no other option available with a
dynamically changing network configuration for P2P. Similar design was
already in place for the SAE offload-from-driver (external auth) case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Enable SAE-H2E for client when joining a 6 GHz group
Qiwei Cai [Wed, 11 Jan 2023 11:59:01 +0000 (19:59 +0800)] 
P2P: Enable SAE-H2E for client when joining a 6 GHz group

Both P2P GO and client always save key_mgmt = WPA_KEY_MGMT_PSK in the
configuration when storing a persistent group. Next time, when a GO is
started as an autonomous GO on a 6 GHz channel, it will change key_mgmt
to SAE and use hash-to-element mechanism, but the P2P client doesn't
change the parameter even if the group it wants to join is operating on
a 6 GHz channel. The P2P connection will be failed due to reason 'reject
due to mismatch with WPA/WPA2'.

Enable SAE-H2E for P2P client in this case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoSAE: Extend automatic enabling of H2E on 6 GHz to additional cases
Jouni Malinen [Mon, 30 Jan 2023 21:07:21 +0000 (23:07 +0200)] 
SAE: Extend automatic enabling of H2E on 6 GHz to additional cases

Commit 3a0edb2cd86e ("SAE: Enable H2E for 6 GHz BSS") started enabling
H2E automatically for SAE use on the 6 GHz band, but it did not update
these steps in verifying whether the STA has matching configuration for
a BSS that mandates use of H2E and whether to use PT for SAE in SME.
Update these to be aware of automatic H2E enabling.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoOCV: Fix build without CONFIG_OCV=y
Jouni Malinen [Mon, 30 Jan 2023 09:23:35 +0000 (11:23 +0200)] 
OCV: Fix build without CONFIG_OCV=y

ssid->ocv is defined within CONFIG_OCV block, so the use for it needs to
match.

Fixes: dc7e330e0b89 ("Set OCV capability based on Association Request frame RSNE")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Use nproc for determining how many parallel jobs to use (fuzz)
Jouni Malinen [Mon, 30 Jan 2023 09:21:45 +0000 (11:21 +0200)] 
tests: Use nproc for determining how many parallel jobs to use (fuzz)

This was already done in tests/hwsim/build.sh, but the fuzzing
build-test.sh can do same instead of using the hardcoded value 8.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: P2P Service Discovery initiated from Go device.
Shivani Baranwal [Wed, 21 Dec 2022 07:04:06 +0000 (12:34 +0530)] 
tests: P2P Service Discovery initiated from Go device.

Add a new P2P Service Discovery test to verify the handling of the
SD response frame received by the GO device.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoP2P: Fix handling Service Discovery Response received by GO device
Shivani Baranwal [Wed, 21 Dec 2022 06:35:12 +0000 (12:05 +0530)] 
P2P: Fix handling Service Discovery Response received by GO device

The received Service Discovery Response frame follows the ap_mgmt_rx()
path in P2P GO mode. If gas_query_rx_frame() doesn't process the frame,
call the Public Action frame callbacks if any are registered for further
processing of the RX frame.

Fixes: 9c2b8204e662 ("DPP: Integration for hostapd")
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoSet OCV capability based on Association Request frame RSNE
Aleti Nageshwar Reddy [Mon, 23 Jan 2023 09:53:31 +0000 (15:23 +0530)] 
Set OCV capability based on Association Request frame RSNE

Currently, OCV self-capability is being set into the RSN supplicant
state machine only during the initial connection and never getting
updated. But for the driver-SME cases the driver may enable/disable OCV
in (Re)Association Request frame RSNE based on the AP chosen to roam.
This will lead to missing synchronization between wpa_supplicant and the
driver. Thus, update OCV self-capability in the wpa_supplicant RSN state
machine based on the (Re)Association Request frame RSNE indicated in the
connect response.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agotests: Work around pyrad issues with octet strings that start with "0x"
Jouni Malinen [Wed, 25 Jan 2023 18:43:16 +0000 (20:43 +0200)] 
tests: Work around pyrad issues with octet strings that start with "0x"

pyrad's tools.py EncodeOctets() uses a design that tries to
automatically determine when the octetstring is a hex string based on
the binary data starting with "0x". That is not really nice since it
will result in failing one out of 65536 possible random inputs with
"binascii.Error: Non-hexadecimal digit found" when trying to decode an
actual (non-hex) binary string as a hexstring.

Work around this by convering the special cases where the
Message-Authenticator binary value happens to start with b"0x" to a
hexstring.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Allow some more time for a scan in discovery_group_client
Jouni Malinen [Fri, 20 Jan 2023 17:56:20 +0000 (19:56 +0200)] 
tests: Allow some more time for a scan in discovery_group_client

This makes the test case a bit more likely to be able to complete with
S1G being enabled in mac80211_hwsim. However, the 15 second P2P protocol
timeout itself can be hit in this type of a case and the test case will
still fail every now and then if all mac80211_hwsim supported channels
are included.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Clear sae_groups in pasn_sae_kdk
Jouni Malinen [Fri, 20 Jan 2023 17:52:08 +0000 (19:52 +0200)] 
tests: Clear sae_groups in pasn_sae_kdk

This test case could have failed when executed after a test case that
had forced a specific set of SAE groups.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Allow more VMs to be used that there are screen lines
Jouni Malinen [Fri, 20 Jan 2023 17:46:32 +0000 (19:46 +0200)] 
tests: Allow more VMs to be used that there are screen lines

curses prints were causing parallel-vm.py to terminate if there were too
many VMs to fit into the screen. For now, simply hide any VMs from the
live status if there is not sufficient room for them.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoWPS: Do not indicate incorrect PBC overlap based on partner link
Jouni Malinen [Fri, 20 Jan 2023 17:08:07 +0000 (19:08 +0200)] 
WPS: Do not indicate incorrect PBC overlap based on partner link

The check for PBC overlap on a partner link should not be done unless
the current interface is actually in active PBC mode. Furthermore, the
wpa_s->wps_overlap variable needs to be cleared in additional places to
avoid leaving it set indefinitely.

This was found with the following test case sequence:
dbus_wps_pbc_overlap dbus_p2p_two_groups

Fixes: b43e19f3f369 ("WPS: Cross band overlap detection with multiple interfaces")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Disable both APs before flushing PBC state
Jouni Malinen [Fri, 20 Jan 2023 17:06:25 +0000 (19:06 +0200)] 
tests: Disable both APs before flushing PBC state

One of the PBC APs was left running at the end of the tet case with
active PBC. Stop that AP as well before flushing scan information on the
STA.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Make wpas_p2p_notif_pbc_overlap() static
Jouni Malinen [Fri, 20 Jan 2023 16:02:26 +0000 (18:02 +0200)] 
P2P: Make wpas_p2p_notif_pbc_overlap() static

Commit ace0fbdb69b4 ("P2P: Fix segfault when PBC overlap is detected")
removed the external calls to this function, but did not mark it static.
Mark it static now to clarify expected uses through the
wpas_p2p_pbc_overlap_cb() timer handler.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Make ap_roam_open work with S1G channels
Jouni Malinen [Mon, 16 Jan 2023 21:06:38 +0000 (23:06 +0200)] 
tests: Make ap_roam_open work with S1G channels

If mac80211_hwsim has S1G channels enabled, the 15 second timeout was
not sufficiently long for full scan while connected.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Make wext_pmksa_cache work with S1G channels
Jouni Malinen [Mon, 16 Jan 2023 10:39:38 +0000 (12:39 +0200)] 
tests: Make wext_pmksa_cache work with S1G channels

If mac80211_hwsim has S1G channels enabled, the 15 second timeout was
not sufficiently long for full scan while connected.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Make ap_wps_iteration_error work with S1G channels
Jouni Malinen [Mon, 16 Jan 2023 10:02:30 +0000 (12:02 +0200)] 
tests: Make ap_wps_iteration_error work with S1G channels

If mac80211_hwsim has S1G channels enabled, the 15 second timeout was
not long enough to allow two scan iterations to be completed.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoQCA vendor attribute of update roaming cached statistics info
chunquan [Wed, 2 Nov 2022 03:40:00 +0000 (11:40 +0800)] 
QCA vendor attribute of update roaming cached statistics info

Add vendor subcmd QCA_NL80211_VENDOR_SUBCMD_ROAM_STATS and attribute id
in enum qca_wlan_vendor_attr_roam_cached_stats for collecting roaming
statistics information when diagnosing roaming behavior.

Signed-off-by: Chunquan Luo <quic_chunquan.quicinc.com>