]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
3 years agoRename moderate latency level to XR latency level in vendor attributes
Nirav Shah [Tue, 25 Jan 2022 04:56:52 +0000 (10:26 +0530)] 
Rename moderate latency level to XR latency level in vendor attributes

Currently the moderate latency level is not used. Rename the moderate
latency level to XR latency level to be used in XR (extended reality)
applications.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agonl80211: Clear frequency information on leaving mesh
Jouni Malinen [Thu, 3 Feb 2022 22:31:20 +0000 (00:31 +0200)] 
nl80211: Clear frequency information on leaving mesh

Not doing this was resulting in test failures with many sequences of a
mesh test case (e.g., wpas_mesh_peer_connected) followed by
ap_csa_1_switch which was checking the driver wrapper frequency
information at the beginning.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Use a 120 second timeout for GAS query
Jouni Malinen [Thu, 3 Feb 2022 15:14:16 +0000 (17:14 +0200)] 
DPP: Use a 120 second timeout for GAS query

This is needed since the gas_query_req() operation could remain waiting
indefinitely for the response if the Configurator keeps sending out
comeback responses with additional delay. The DPP technical
specification expects the Enrollee to continue sending out new Config
Requests for 60 seconds, so this gives an extra 60 second time after the
last expected new Config Request for the Configurator to determine what
kind of configuration to provide.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoGAS server: Increase query timeout to 60 seconds for DPP
Jouni Malinen [Thu, 3 Feb 2022 09:36:43 +0000 (11:36 +0200)] 
GAS server: Increase query timeout to 60 seconds for DPP

DPP Enrollee might wait for the configuration for 60 seconds, so
increase the DPP Configurator timeout for the GAS server operation to 60
seconds to cover that full wait time. This is needed for cases where
user interaction can take significant amount of time before the
configuration response can be generated.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Start a listen operation for GAS server if needed
Jouni Malinen [Thu, 3 Feb 2022 09:30:06 +0000 (11:30 +0200)] 
DPP: Start a listen operation for GAS server if needed

Instead of depending on the TX-wait-response-time to be sufficient to
cover the full GAS exchange, start an ongoing listen operation on the
negotiation channel (if no such listen operation is already in place) to
allow the configuration exchange to take longer amount of time. This is
needed for cases where the conf=query is used to request Configurator
parameters from upper layers and that upper layer processing (e.g., user
interaction) takes significant amount of time.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Increase the wait time of Configurator GAS timeout
Jouni Malinen [Thu, 3 Feb 2022 22:22:33 +0000 (00:22 +0200)] 
tests: Increase the wait time of Configurator GAS timeout

dpp_gas_timeout could fail with an increased timeout for the
Configurator.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Increase wait in dpp_qr_code_config_event_initiator_no_response
Jouni Malinen [Thu, 3 Feb 2022 09:35:35 +0000 (11:35 +0200)] 
tests: Increase wait in dpp_qr_code_config_event_initiator_no_response

The DPP Enrollee might wait for up to 60 seconds for the configuration,
so use a longer timeout value to be able to cover this negative test
case where the Configurator never sends the response.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agonl80211: Add a handler for NL80211_CMD_FRAME_WAIT_CANCEL events
Jouni Malinen [Thu, 3 Feb 2022 22:12:13 +0000 (00:12 +0200)] 
nl80211: Add a handler for NL80211_CMD_FRAME_WAIT_CANCEL events

This can be helpful in figuring out when the driver has stopped waiting
on a specific channel and would need a remain-on-channel command to
continue listening on that channel.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoP2P: Update GO operating frequency after interface setup is completed
Sunil Ravi [Tue, 29 Jun 2021 18:18:20 +0000 (11:18 -0700)] 
P2P: Update GO operating frequency after interface setup is completed

Once the GO/AP interface initialization is completed, check if the
operating frequency set in the wpa_supplicant group interface structure
is different than the one set in the hostapd interface structure
associated with the group interface. If yes, update the frequency in the
wpa_supplicant group interface and network configuration to the
frequency set in the hostapd interface structure.

The frequency set in the hostapd interface is the correct/final
frequency wpa_supplicant configured in the kernel/driver. This is done
because wpa_supplicant may switch the initially requested primary and
secondary frequencies to get a secondary frequency with no beacons (to
avoid interference or 20/40 MHz coex logic). And the updated frequency
is informed by the driver only after the interface setup is completed
through the channel switch event - EVENT_CH_SWITCH. But wpa_supplicant
updates the frequency to applications through the P2P_GROUP_STARTED
event which is triggered before the EVENT_CH_SWITCH event. To send the
correct frequency to applications the frequency must be updated before
sending the P2P_GROUP_STARTED event.

Bug: 191272346
Test: Manual - Verified that GO frequency is updated and reported
correctly to Nearby application.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
3 years agotests: DPP Configurator with config query
Jouni Malinen [Wed, 2 Feb 2022 14:39:57 +0000 (16:39 +0200)] 
tests: DPP Configurator with config query

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Allow Configurator parameters to be provided during config exchange
Jouni Malinen [Wed, 2 Feb 2022 14:52:01 +0000 (16:52 +0200)] 
DPP: Allow Configurator parameters to be provided during config exchange

This provides an alternative mechanism for upper layer components to
control configuration parameters to be used by the local Configurator.
Instead of the previously used design where the Configurator parameters
had to be provided before initiating the DPP Authentication exchange,
the new alternative approach allows the DPP Authentication exchange to
be started before any Configurator parameters have been determined and
wpa_supplicant will then request the parameters once the DPP
Configuration Request has been received from the Enrollee. This allows
the Config Request information to be used at upper layers to determine
how the Enrollee should be configured.

For example for an Initiator:

CTRL: DPP_QR_CODE <URI from Responder/Enrollee>
CTRL: DPP_AUTH_INIT peer=1 conf=query
<3>DPP-CONF-NEEDED peer=1 src=02:00:00:00:00:00 net_role=sta name="Test" opclass=81,82,83,84,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130 mud_url=N/A
(upper layer processing; potentially including user interaction)
CTRL: DPP_CONF_SET peer=1 conf=sta-sae ssid=736165 pass=70617373776f7264
<3>DPP-CONF-SENT

For example for a Responder:

CTRL: SET dpp_configurator_params conf=query
CTRL: DPP_LISTEN 2412 role=configurator
<3>DPP-CONF-NEEDED peer=2 src=02:00:00:00:01:00 net_role=sta name="Test" opclass=81,82,83,84,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130 mud_url=N/A
(upper layer processing; potentially including user interaction)
CTRL: DPP_CONF_SET peer=2 conf=sta-sae ssid=736165 pass=70617373776f7264
<3>DPP-CONF-SENT

For example for an Initiator that can act both as a Configurator and an
Enrollee in a case where the Initiator becomes the Enrollee:

CTRL: DPP_AUTH_INIT peer=1 role=either conf=query
<3>DPP-CONF-RECEIVED

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoGAS server: Asynchronous request handler comeback time indication
Jouni Malinen [Wed, 2 Feb 2022 14:48:51 +0000 (16:48 +0200)] 
GAS server: Asynchronous request handler comeback time indication

Extend the GAS server functionality to allow a request handler to return
the initial comeback delay with a later callback instead of having to
indicate the comeback delay when returning from the handler function.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Store Enrollee config request information
Jouni Malinen [Wed, 2 Feb 2022 14:45:05 +0000 (16:45 +0200)] 
DPP: Store Enrollee config request information

This information can be helpful for upper layers in deciding how to
configure the Enrollee.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Make dpp_netrole_str() non-static
Jouni Malinen [Wed, 2 Feb 2022 14:42:50 +0000 (16:42 +0200)] 
DPP: Make dpp_netrole_str() non-static

This function is going to be needed outside dpp.c.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoEAP-pwd: Fix the prefix in a debug message
Jouni Malinen [Tue, 1 Feb 2022 17:58:40 +0000 (19:58 +0200)] 
EAP-pwd: Fix the prefix in a debug message

This was copied from sae.c, but the debug message prefix was not changed
to match the use here.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: WPA2-PSK AP with PMF association comeback (using radio_disabled)
Jouni Malinen [Tue, 1 Feb 2022 17:04:06 +0000 (19:04 +0200)] 
tests: WPA2-PSK AP with PMF association comeback (using radio_disabled)

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agonl80211: Partial support for radio_disable
Jouni Malinen [Tue, 1 Feb 2022 17:03:09 +0000 (19:03 +0200)] 
nl80211: Partial support for radio_disable

This is for testing purposes to allow a station mode associated to be
dropped without sending the AP a Deauthentication frame.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: DPP/PKEXv2 over TCP while associated
Jouni Malinen [Tue, 1 Feb 2022 16:39:34 +0000 (18:39 +0200)] 
tests: DPP/PKEXv2 over TCP while associated

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Use check_sae_capab() where possible
Jouni Malinen [Tue, 1 Feb 2022 16:16:35 +0000 (18:16 +0200)] 
tests: Use check_sae_capab() where possible

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Fix CONFIG_DPP3=y dependency in couple of test cases
Jouni Malinen [Mon, 31 Jan 2022 16:16:29 +0000 (18:16 +0200)] 
tests: Fix CONFIG_DPP3=y dependency in couple of test cases

These could not pass without DPP3 support.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: DPP PKEX over TCP and automatic connection and result reporting
Jouni Malinen [Fri, 28 Jan 2022 15:30:42 +0000 (17:30 +0200)] 
tests: DPP PKEX over TCP and automatic connection and result reporting

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Fix connection result reporting when using TCP
Jouni Malinen [Fri, 28 Jan 2022 15:28:49 +0000 (17:28 +0200)] 
DPP: Fix connection result reporting when using TCP

The TCP code path did not handle the postponed connection attempt on TX
status and the following result message from the Enrollee to the
Configurator. Fix this by adding TCP-versions of these operations to
match the way wpa_supplicant implemented this for the Public Action
frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: sigma_dut and DPP PKEX over TCP
Jouni Malinen [Thu, 27 Jan 2022 18:50:39 +0000 (20:50 +0200)] 
tests: sigma_dut and DPP PKEX over TCP

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: sigma_dut and additional protocol tests for DPP Network Intro
Jouni Malinen [Thu, 27 Jan 2022 16:44:57 +0000 (18:44 +0200)] 
tests: sigma_dut and additional protocol tests for DPP Network Intro

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Testing capability for invalid Protocol Version in Network Intro
Jouni Malinen [Thu, 27 Jan 2022 16:42:54 +0000 (18:42 +0200)] 
DPP: Testing capability for invalid Protocol Version in Network Intro

This extends dpp_test functionality to allow DPP Network Introduction
exchanges to use an incorrect value in the Protocol Version attribute.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: sigma_dut forcing PKEX v1 only
Jouni Malinen [Tue, 25 Jan 2022 22:14:27 +0000 (00:14 +0200)] 
tests: sigma_dut forcing PKEX v1 only

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: DPP PKEX over TCP
Jouni Malinen [Mon, 24 Jan 2022 22:35:58 +0000 (00:35 +0200)] 
tests: DPP PKEX over TCP

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
3 years agoDPP3: PKEX over TCP
Jouni Malinen [Mon, 24 Jan 2022 22:35:36 +0000 (00:35 +0200)] 
DPP3: PKEX over TCP

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
3 years agotests: Update DPP PKEX version indication style
Jouni Malinen [Tue, 25 Jan 2022 18:16:18 +0000 (20:16 +0200)] 
tests: Update DPP PKEX version indication style

Update test cases to match implementation.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Change PKEX version configuration design
Jouni Malinen [Tue, 25 Jan 2022 18:06:49 +0000 (20:06 +0200)] 
DPP: Change PKEX version configuration design

Use a separate ver=<1|2> parameter to DPP_PKEX_ADD instead of
overloading init=1 with version indication. This allows additional
options for forcing v1-only and v2-only in addition to automatic mode
(start with v2 and fall back to v1, if needed).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: DPP PKEXv2 initiator fallback to v1 in hostapd
Jouni Malinen [Mon, 24 Jan 2022 18:59:12 +0000 (20:59 +0200)] 
tests: DPP PKEXv2 initiator fallback to v1 in hostapd

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP3: Add PKEX initiator retries and fallback from v2 to v1 for hostapd
Jouni Malinen [Mon, 24 Jan 2022 18:57:19 +0000 (20:57 +0200)] 
DPP3: Add PKEX initiator retries and fallback from v2 to v1 for hostapd

This extends hostapd with the design used in wpa_supplicant for PKEX
initiator retries and automatic version fallback from v2 to v1 (the
latter is enabled only with CONFIG_DPP3=y).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Handle TX status events for broadcast DPP messages
Jouni Malinen [Mon, 24 Jan 2022 18:28:13 +0000 (20:28 +0200)] 
DPP: Handle TX status events for broadcast DPP messages

Report TX status for DPP messages even if the destination address was
broadcast. This is needed to get appropriate trigger for PKEX retries.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: sigma_dut DPP/PKEXv2 initiator and fallback to v1
Jouni Malinen [Mon, 24 Jan 2022 18:24:53 +0000 (20:24 +0200)] 
tests: sigma_dut DPP/PKEXv2 initiator and fallback to v1

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP3: Start with PKEXv2 and fall back to v1
Jouni Malinen [Mon, 24 Jan 2022 18:21:24 +0000 (20:21 +0200)] 
DPP3: Start with PKEXv2 and fall back to v1

Use automatic PKEX version negotiation as the initiator by starting with
PKEXv2 and if no response is received, trying again with PKEXv1. For
now, this is enabled only in wpa_supplicant CONFIG_DPP3=y builds.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Update dpp_proto_after_wrapped_data_pkex_cr_req for PKEXv2
Jouni Malinen [Mon, 24 Jan 2022 20:58:04 +0000 (22:58 +0200)] 
tests: Update dpp_proto_after_wrapped_data_pkex_cr_req for PKEXv2

Check for both PKEX v1 and v2 variants of the message.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoP2P: Send response frame on channel where the request is received
Qiwei Cai [Wed, 5 Jan 2022 05:04:24 +0000 (13:04 +0800)] 
P2P: Send response frame on channel where the request is received

The rx_freq of Public Action frame was not maintained by the GO and the
GO always sent the response on the operating channel. This causes
provision discovery failure when a P2P Device is sending a PD Request on
a 2.4 GHz social channel and the GO is responding on a 5 GHz operating
channel.

Save the rx_freq and use it for GO to sent the response. This extends
commit c5cc7a59acb2 ("Report offchannel RX frame frequency to hostapd")
to cover additional frame types.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoExtend QCA_NL80211_VENDOR_SUBCMD_PEER_FLUSH_PENDING
Madhvapathi Sriram [Tue, 30 Nov 2021 05:03:30 +0000 (10:33 +0530)] 
Extend QCA_NL80211_VENDOR_SUBCMD_PEER_FLUSH_PENDING

Extend the peer queue flush command with following attributes
1. Enable to flush per TID peer queue
2. Enable to configure when to flush the peer/TID queue

Signed-off-by: Madhvapathi Sriram <quic_msriram@quicinc.com>
3 years agotests: Update the repository branch name
Arowa Suliman [Mon, 17 Jan 2022 05:09:58 +0000 (21:09 -0800)] 
tests: Update the repository branch name

This was forgotten from the earlier commit.

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "blacklist" with "denylist" in vendor interface definition
Arowa Suliman [Mon, 17 Jan 2022 05:09:54 +0000 (21:09 -0800)] 
Replace "blacklist" with "denylist" in vendor interface definition

Replace the word "blacklist" with the inclusive word "denylist" and add
aliases for backward compatibility.

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "whitelist" with "allowlist" in vendor interface definition
Arowa Suliman [Mon, 17 Jan 2022 05:09:53 +0000 (21:09 -0800)] 
Replace "whitelist" with "allowlist" in vendor interface definition

Replace the word "whitelist" with the inclusive word "allowlist" and add
aliases for backward compatibility.

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agowpa_supplicant: ap: Update comment
Arowa Suliman [Mon, 17 Jan 2022 05:09:55 +0000 (21:09 -0800)] 
wpa_supplicant: ap: Update comment

Update the comment to use the word "include" instead of the oppressive
term "white-list".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoThe main branch is now used for v2.11 development
Jouni Malinen [Sun, 16 Jan 2022 21:31:00 +0000 (23:31 +0200)] 
The main branch is now used for v2.11 development

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoPreparations for v2.10 release hostap_2_10
Jouni Malinen [Sun, 16 Jan 2022 20:46:15 +0000 (22:46 +0200)] 
Preparations for v2.10 release

Update the version number for the build and also add the ChangeLog
entries for both hostapd and wpa_supplicant to describe main changes
between v2.9 and v2.10.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoUpdate copyright notices for the new year 2022
Jouni Malinen [Sun, 16 Jan 2022 20:50:46 +0000 (22:50 +0200)] 
Update copyright notices for the new year 2022

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agotests: Update eap_proto_pwd_errors to match implementation
Jouni Malinen [Fri, 7 Jan 2022 16:52:58 +0000 (18:52 +0200)] 
tests: Update eap_proto_pwd_errors to match implementation

A negative test was failing with the PWE derivation change in the
implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agotests: Update sae_bignum_failure to match implementation
Jouni Malinen [Fri, 7 Jan 2022 12:11:54 +0000 (14:11 +0200)] 
tests: Update sae_bignum_failure to match implementation

This was failing with the PWE derivation change in the implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agocrypto: Remove unused crypto_ec_point_solve_y_coord()
Jouni Malinen [Fri, 7 Jan 2022 17:44:10 +0000 (19:44 +0200)] 
crypto: Remove unused crypto_ec_point_solve_y_coord()

This wrapper function is not used anymore, so remove it.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoEAP-pwd: Derive the y coordinate for PWE with own implementation
Jouni Malinen [Fri, 7 Jan 2022 16:52:27 +0000 (18:52 +0200)] 
EAP-pwd: Derive the y coordinate for PWE with own implementation

The crypto_ec_point_solve_y_coord() wrapper function might not use
constant time operations in the crypto library and as such, could leak
side channel information about the password that is used to generate the
PWE in the hunting and pecking loop. As such, calculate the two possible
y coordinate values and pick the correct one to use with constant time
selection.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoSAE: Derive the y coordinate for PWE with own implementation
Jouni Malinen [Fri, 7 Jan 2022 11:47:16 +0000 (13:47 +0200)] 
SAE: Derive the y coordinate for PWE with own implementation

The crypto_ec_point_solve_y_coord() wrapper function might not use
constant time operations in the crypto library and as such, could leak
side channel information about the password that is used to generate the
PWE in the hunting and pecking loop. As such, calculate the two possible
y coordinate values and pick the correct one to use with constant time
selection.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoSAE: Move sqrt() implementation into a helper function
Jouni Malinen [Fri, 7 Jan 2022 11:47:16 +0000 (13:47 +0200)] 
SAE: Move sqrt() implementation into a helper function

This implementation within SSWU can be helpful for other users of the
dragonfly design, so move it into a shared helper function.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoDefined a driver interface for periodic TSF sync feature
Vishal Miskin [Thu, 2 Dec 2021 06:49:22 +0000 (12:19 +0530)] 
Defined a driver interface for periodic TSF sync feature

Add a QCA vendor netlink interface to start/stop periodic TSF sync
feature and also support configuration of interval value as part of TSF
sync start command. In addition, improve documentation for the related
attributes and values.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoAdd a QCA vendor attribute to indicate ACS over EHT
Veerendranath Jakkam [Thu, 6 Jan 2022 07:06:21 +0000 (12:36 +0530)] 
Add a QCA vendor attribute to indicate ACS over EHT

Add QCA_WLAN_VENDOR_ATTR_ACS_EHT_ENABLED flag attribute to conduct ACS
for EHT mode. The driver can consider EHT specific parameters such as
puncture pattern for ACS when this flag attribute is indicated by
userspace.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
3 years agoClear roam/BSS TM in progress flags for additional cases
Jouni Malinen [Tue, 11 Jan 2022 16:02:53 +0000 (18:02 +0200)] 
Clear roam/BSS TM in progress flags for additional cases

It looks like the recently added roam_in_progress and
bss_trans_mgmt_in_progress flags could end up getting set, but not
cleared, in some cases. Make sure these get cleared on explicit
disconnection request and also in case the SME-in-driver path is used
(while that path does not really use these flags yet, it is better to
not allow them to be forgotten to be set should it be extended to cover
similar functionality).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoReject authentication start during BSS TM requests
Nicolas Norvez [Wed, 5 Jan 2022 01:35:13 +0000 (01:35 +0000)] 
Reject authentication start during BSS TM requests

After receiving a BSS Transition Management request,
wpa_supplicant_connect() will abort ongoing scans, which will cause scan
results to be reported. Since the reassociate bit is set, this will
trigger a connection attempt based on the aborted scan's scan results
and cancel the initial connection request. This often causes
wpa_supplicant to reassociate to the same AP it is currently associated
to instead of the AP it was asked to transition to.

Add a bss_trans_mgmt_in_progress flag to indicate that we're currently
transitioning to a different AP so that we don't initiate another
connection attempt based on the possibly received scan results from a
scan that was in progress at the time the BSS Transition Management
request was received.

This is the equivalent of commit 5ac977758d35 ("Reject authentication
start during explicit roam requests") for the roaming scenario.

Signed-off-by: Nicolas Norvez <norvez@chromium.org>
3 years agoD-Bus: Fix build without CONFIG_INTERWORKING
Alex Kiernan [Sun, 2 Jan 2022 11:05:48 +0000 (11:05 +0000)] 
D-Bus: Fix build without CONFIG_INTERWORKING

Make wpas_dbus_handler_interworking_select() conditional on
CONFIG_INTERWORKING to avoid compilation issues.

Fixes: c8e4283f90e0 ("D-Bus: Interworking network selection")
Signed-off-by: Alex Kiernan <alexk@zuma.ai>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
3 years agoOpenSSL: Update security level drop for TLS 1.0/1.1 with OpenSSL 3.0
Jouni Malinen [Tue, 11 Jan 2022 15:37:32 +0000 (17:37 +0200)] 
OpenSSL: Update security level drop for TLS 1.0/1.1 with OpenSSL 3.0

OpenSSL 3.0 dropped these older TLS versions from the security level 2
to 1, so need to drop the security level all the way to 0 if TLS v1.0 or
v1.1 is explicitly enabled.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Update capability checks to include OpenSSL 3.0
Jouni Malinen [Tue, 11 Jan 2022 15:21:40 +0000 (17:21 +0200)] 
tests: Update capability checks to include OpenSSL 3.0

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Do not use SAE group 26
Jouni Malinen [Tue, 11 Jan 2022 12:09:43 +0000 (14:09 +0200)] 
tests: Do not use SAE group 26

This group should not be used with SAE and as such, it could cause
confusing test errors here. Use an acceptable group instead.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoOpenSSL: Fix compressed form encoding for subjectPublicKey with 3.0
Jouni Malinen [Tue, 11 Jan 2022 12:00:43 +0000 (14:00 +0200)] 
OpenSSL: Fix compressed form encoding for subjectPublicKey with 3.0

It looks like EC_KEY_set_conv_form() for the EC_KEY within the EVP_PKEY
does not take effect for i2d_PUBKEY() with OpenSSL 3.0, so allocate a
new wrapper EVP_PKEY after the conversion format change to be able to
return the correctly encoded (compressed) value here. This is required
for DPP to work correctly.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoOpenSSL: Load legacy provider when needed for OpenSSL 3.0
Jouni Malinen [Tue, 11 Jan 2022 10:43:19 +0000 (12:43 +0200)] 
OpenSSL: Load legacy provider when needed for OpenSSL 3.0

Number of the older algorithms have now been moved into a separate
provider in OpenSSL 3.0 and they are not available by default.
Explicitly load the legacy provider when such an algorithm is needed for
the first time.

In addition, at least for now, load the legacy providers when initiating
TLS context to maintain existing functionality for various private key
formats.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoOpenSSL: Clean up EVP_PKEY_get{0,1}_EC_KEY() use
Jouni Malinen [Tue, 11 Jan 2022 10:20:12 +0000 (12:20 +0200)] 
OpenSSL: Clean up EVP_PKEY_get{0,1}_EC_KEY() use

Use get1 whenever actually modifying the EC_KEY parameters and mark the
variable used with get0 const to be compatible with OpenSSL 3.0.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoOpenSSL: Speed up crypto_ec_point_compute_y_sqr()
Jouni Malinen [Mon, 10 Jan 2022 14:30:52 +0000 (16:30 +0200)] 
OpenSSL: Speed up crypto_ec_point_compute_y_sqr()

Optimize the calculation by computing (x^2 + a) first to get rid of one
separate multiplication by x.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoDPP: Remove dpp-listen radio work when stopping
Chenming Huang [Mon, 13 Dec 2021 07:57:58 +0000 (15:57 +0800)] 
DPP: Remove dpp-listen radio work when stopping

The radio work starting may be delayed. If the DPP listen operation is
stopped before the radio work starts, the pending dpp-listen radio work
won't get cleaned up, which might lead to failing to start the next DPP
listen operation.

Issue scenario: DPP start -> dpp-listen radio work added but not started
-> DPP stop, pending radio work not cleaned up -> radio work start ->
trying to start DPP but failing because a dpp-listen work already
exists.

This commit removes the potential pending dpp-listen radio
work when DPP stops.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoSAE: Make sure BSS entry is available to determine RSNXE information
Shivani Baranwal [Tue, 7 Dec 2021 08:25:24 +0000 (13:55 +0530)] 
SAE: Make sure BSS entry is available to determine RSNXE information

wpa_supplicant may use wrong SAE authentication method if it doesn't
have the scan result for the target BSS since RSNXE information is not
available.

For example, STA might use the hunting-and-pecking loop method for SAE
authentication even though AP supports SAE H2E and STA is configured
with sae_pwe=2.

This is possible in cases like EXTERNAL_AUTH triggered by the driver
during roaming. To avoid this update scan results to fetch the target
BSS scan result from the driver.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
3 years agoAdd new vendor attributes to avoid coex unsafe frequencies
Mukul Sharma [Thu, 16 Dec 2021 18:14:02 +0000 (23:44 +0530)] 
Add new vendor attributes to avoid coex unsafe frequencies

Add additional attributes in
QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY_EXT vendor sub command to
avoid usage of unsafe frequencies on wifi interfaces sent from userspace
to the driver/firmware. The driver/firmware shall use restrictions and
power cap accordingly to restrict the usage of these frequencies on
operating interface(s).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Fix DPP PKEXv2 capability checks
Jouni Malinen [Tue, 14 Dec 2021 16:25:43 +0000 (18:25 +0200)] 
tests: Fix DPP PKEXv2 capability checks

At least for the time being PKEXv2 needs CONFIG_DPP3=y to work in a
testable manner. Couple of the test cases did not cover this correctly
and resulted in failures (instead of skipping the tests) when the
default build configuration was used. Fix that by checking for DPP
version 3.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP3: Update version capability indication for hostapd
Jouni Malinen [Tue, 14 Dec 2021 17:43:54 +0000 (19:43 +0200)] 
DPP3: Update version capability indication for hostapd

The "GET_CAPABILITY dpp" command in wpa_supplicant was already extended
to cover DPP version 3, but the matching change for hostapd was
forgotten. Add that now.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoUpdate supported channel width set (HT40) after channel switch
peterhuang [Wed, 18 Aug 2021 10:48:53 +0000 (18:48 +0800)] 
Update supported channel width set (HT40) after channel switch

hostapd should update Supported Channel Width Set of HT Capability
Information field after channel switching done. Otherwise, it would
continue to use the old setting.

Signed-off-by: peterhuang <peterhuang@realtek.com>
3 years agoFix channel switch wrapper when switching from HT to VHT/HE
peterhuang [Wed, 18 Aug 2021 10:57:28 +0000 (18:57 +0800)] 
Fix channel switch wrapper when switching from HT to VHT/HE

Because ieee80211ac and ieee80211ax were not updated before channel
switch is done, hostapd didn't build the Channel Switch Wrapper element
when it switched from HT to bandwidth more than 40 MHz of VHT/HE. fix
this by allowing hostapd_eid_wb_chsw_wrapper() to determine internally
when the element needs to be added based on the new channel instead of
the old configuration.

Signed-off-by: peterhuang <peterhuang@realtek.com>
3 years agoUpdate ieee80211ac when channel switching
peterhuang [Thu, 19 Aug 2021 11:22:06 +0000 (19:22 +0800)] 
Update ieee80211ac when channel switching

hostapd will build wrong beacon_after in hostapd_fill_csa_settings() if
it doesn't update ieee80211ac when channel switching.

Signed-off-by: peterhuang <peterhuang@realtek.com>
3 years agomesh: Make forwarding configurable
Daniel Golle [Tue, 31 Aug 2021 07:44:07 +0000 (10:44 +0300)] 
mesh: Make forwarding configurable

Allow mesh_fwding (dot11MeshForwarding) to be specified in a mesh BSS
config, pass that to the driver (only nl80211 implemented for now) and
announce forwarding capability accordingly.

Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoACS/DFS: Support min_tx_power configuration
Alan Young [Thu, 11 Nov 2021 16:40:05 +0000 (16:40 +0000)] 
ACS/DFS: Support min_tx_power configuration

If min_tx_power is specified (default 0 dBm, i.e., no constraint), ACS
and DFS will not consider channels whose available max_tx_power is less
than the configured value.

This may be useful to exclude SRD (Short Range Device) channels which
may be limited to 13.9 dBm (25 mW) in some regulatory domains.

Signed-off-by: Alan Young <consult.awy@gmail.com>
3 years agotests: remotehost: Disable pipe buffering
Janusz Dziedzic [Sun, 24 Oct 2021 19:47:49 +0000 (21:47 +0200)] 
tests: remotehost: Disable pipe buffering

Before, we could loose some events because of pipe buffering. I saw this
problem when running "ubus listen" or "logread -f" and waiting some
specific events. After disabling buffering this works much better.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
3 years agoMBO: Fix the allowed range of mbo_assoc_disallow values
Janusz Dziedzic [Sun, 24 Oct 2021 19:48:34 +0000 (21:48 +0200)] 
MBO: Fix the allowed range of mbo_assoc_disallow values

This parameter was added with the commit message indicating the valid
reason code values to be 1-5, but with the implementation allowed only
1. There are five defined reason code values for the Association
Disallowed attribute, so extend the allowed range to cover all those
values.

Fixes: fb9a1c3e285d ("hostapd: Add MBO IE to Beacon, Probe Response, Association Response")
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
3 years agoD-Bus: Interworking network selection
Damien Dejean [Wed, 8 Dec 2021 07:45:32 +0000 (07:45 +0000)] 
D-Bus: Interworking network selection

Add the "InterworkingSelect" method to the DBus API to trigger an
Interworking scan with ANQP fetches. When a BSS that matches a
configured credential is found, the result is emitted using the signal
"InterworkingAPAdded". Completion of the full InterworkingSelect
operation is indicated with the "InterworkingSelectDone" signal.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
3 years agoD-Bus: Interworking/Hotspot 2.0 credential operations
Damien Dejean [Wed, 8 Dec 2021 07:45:31 +0000 (07:45 +0000)] 
D-Bus: Interworking/Hotspot 2.0 credential operations

Add "AddCred", "RemoveCred", and "RemoveAllCreds" methods to the D-Bus
API of the network interface to allow the caller to manipulate a set of
Interworking credentials similarly to the way this was enabled through
the control interface.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
3 years agoMove credential removal operations into helper functions
Damien Dejean [Wed, 8 Dec 2021 07:45:31 +0000 (07:45 +0000)] 
Move credential removal operations into helper functions

This allows the same functions to be used for both the control interface
and the D-Bus interface.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
3 years agoHS 2.0: Crypto engine support for creds
Damien Dejean [Wed, 8 Dec 2021 07:45:30 +0000 (07:45 +0000)] 
HS 2.0: Crypto engine support for creds

Add the support of engine, engine_id, ca_cert_id, cert_id, and key_id
parameters to credential blocks for Hotspot 2.0.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
3 years agotests: Fix a typo in a couple of error messages
Jouni Malinen [Sun, 12 Dec 2021 14:44:14 +0000 (16:44 +0200)] 
tests: Fix a typo in a couple of error messages

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agowlantest: Add the missing command line option -W to the usage text
Gokul Sivakumar [Wed, 3 Nov 2021 16:50:24 +0000 (22:20 +0530)] 
wlantest: Add the missing command line option -W to the usage text

Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com>
3 years agowlantest: Delete each entry from the WEP list before freeing the entry
Gokul Sivakumar [Wed, 3 Nov 2021 16:50:23 +0000 (22:20 +0530)] 
wlantest: Delete each entry from the WEP list before freeing the entry

To be consistent with how all the other dl lists like passphrase, PMK,
and PTK lists are freed, delete each entry from the WEP list before
freeing the entry.

Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com>
3 years agowlantest: Replace the duplicate functions with reuse of cli.h
Gokul Sivakumar [Wed, 3 Nov 2021 16:50:22 +0000 (22:20 +0530)] 
wlantest: Replace the duplicate functions with reuse of cli.h

The definitions of max_args, get_cmd_arg_num(), and tokenize_cmd() are
already shared by the hostapd_cli and wpa_cli commands by including the
cli.h header. So follow the same for wlantest_cli and remove the
duplicate function defitions.

Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com>
3 years agowlantest: Add new cli "help" command
Gokul Sivakumar [Wed, 3 Nov 2021 16:50:21 +0000 (22:20 +0530)] 
wlantest: Add new cli "help" command

Having a help cli command to view all the supported commands is helpful
when running the wlantest_cli manually instead via the python test
scripts.

$ wlantest_cli help
commands:
  ping = test connection to wlantest
  terminate = terminate wlantest
  list_bss = get BSS list
  list_sta <BSSID> = get STA list
  flush = drop all collected BSS data
  clear_sta_counters <BSSID> <STA> = clear STA counters
  clear_bss_counters <BSSID> = clear BSS counters
  get_sta_counter <counter> <BSSID> <STA> = get STA counter value
  get_bss_counter <counter> <BSSID> = get BSS counter value
  inject <frame> <prot> <sender> <BSSID> <STA/ff:ff:ff:ff:ff:ff>
  send <prot> <raw frame as hex dump>
  version = get wlantest version
  add_passphrase <passphrase> = add a known passphrase
  add_wepkey <WEP key> = add a known WEP key
  info_sta <field> <BSSID> <STA> = get STA information
  info_bss <field> <BSSID> = get BSS information
  clear_tdls_counters <BSSID> <STA1> <STA2> = clear TDLS counters
  get_tdls_counter <counter> <BSSID> <STA1> <STA2> = get TDLS counter value
  get_bss_counter <counter> <BSSID> = get BSS counter value
  relog = re-open log-file (allow rolling logs)
  get_tx_tid <BSSID> <STA> <TID> = get STA TX TID counter value
  get_rx_tid <BSSID> <STA> <TID> = get STA RX TID counter value
  help = show this usage help

$ wlantest_cli help add_passphrase
commands:
  add_passphrase <passphrase> = add a known passphrase

Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com>
3 years agowlantest: Properly free allocated memory on error exit paths
Gokul Sivakumar [Wed, 3 Nov 2021 16:50:20 +0000 (22:20 +0530)] 
wlantest: Properly free allocated memory on error exit paths

In the cases when a failure is experienced, the value "-1" was returned
from the main() function without doing any cleanup or deinit.

For example, if wlantest was started with the following set of command
line arguments then later when returning after a failure from main()
function, the memory allocated as part of handling the "-p" getopt
command line option was not freed. To fix memory leaks in this case,
properly free the previously allocated memory with the help of
wlantest_deinit() before returning from main().

$ sudo valgrind --leak-check=full --show-leak-kinds=all --verbose \
> --track-origins=yes --log-file=valgrind-out.txt \
> ./wlantest -i hwsim0 -dd -c -p "asdfasdfasdfasdf" -W "abcd"
Invalid WEP key 'abcd'

Memory leak reported by Valgrind when running wlantest as mentioned above.

==513454== HEAP SUMMARY:
==513454==     in use at exit: 128 bytes in 1 blocks
==513454==   total heap usage: 4 allocs, 3 frees, 5,720 bytes allocated
==513454==
==513454== Searching for pointers to 1 not-freed blocks
==513454== Checked 76,936 bytes
==513454==
==513454== 128 bytes in 1 blocks are definitely lost in loss record 1 of 1
==513454==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==513454==    by 0x1396CA: os_zalloc (in /home/ubuntu/hostap/wlantest/wlantest)
==513454==    by 0x10C345: add_passphrase (wlantest.c:125)
==513454==    by 0x10C345: main (wlantest.c:425)
==513454==
==513454== LEAK SUMMARY:
==513454==    definitely lost: 128 bytes in 1 blocks
==513454==    indirectly lost: 0 bytes in 0 blocks
==513454==      possibly lost: 0 bytes in 0 blocks
==513454==    still reachable: 0 bytes in 0 blocks
==513454==         suppressed: 0 bytes in 0 blocks
==513454==
==513454== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com>
3 years agoD-Bus: Capture group ifname before switching to global P2P instance
Hassoubi, Hicham [Fri, 3 Dec 2021 20:10:07 +0000 (20:10 +0000)] 
D-Bus: Capture group ifname before switching to global P2P instance

The P2P DBus interface was using the wrong interface name when calling
wpas_p2p_invite_group(). Capture the group interface name before calling
the method to fix this.

Signed-off-by: Hicham Hassoubi <Hicham_hassoubi@bose.com>
3 years agoSME: No need for OBSS scan if HT40 is disabled
Ernst Sjöstrand [Thu, 9 Dec 2021 13:08:56 +0000 (13:08 +0000)] 
SME: No need for OBSS scan if HT40 is disabled

Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com>
3 years agoRevert "Extract BSS coex 40 MHz check into a separate function"
Matthew Wang [Fri, 10 Dec 2021 17:59:23 +0000 (09:59 -0800)] 
Revert "Extract BSS coex 40 MHz check into a separate function"

This reverts commit 3af78a4e043ede6488eae081d854bad89500aec2.

This commit prepares a refactor for another patch, which is being
reverted.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
3 years agoRevert "STA OBSS: Add check for overlapping BSSs"
Matthew Wang [Fri, 10 Dec 2021 17:59:22 +0000 (09:59 -0800)] 
Revert "STA OBSS: Add check for overlapping BSSs"

This reverts commit 3204795d7a43bcbda8b695dd96d11f3000de7340.

The commit adds an additional check that checks for overlapping BSSs in
addition to the existing 40 MHz intolerance subfield checks. The commit
cites IEEE Std 802.11-2016, 11.16.12, which defines the proper behavior
for a 20/40 MHz HT STA and AP, but the standard actually doesn't say
anything about overlapping BSSs. Specifically, the standard states that
the only BSSs that belong in the Intolerant channel report are those
that satisfy trigger event A, defined as channels with BSSs that don't
contain the HT capabilities element (which wpa_supplicant already did
before). Note that we also include channels with BSSs that have the 40
MHz intolerance bit set in the Intolerant channel report.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
3 years agotests: DPP PKEXv2
Jouni Malinen [Tue, 7 Dec 2021 15:11:59 +0000 (17:11 +0200)] 
tests: DPP PKEXv2

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP2: PKEXv2 core protocol changes
Jouni Malinen [Tue, 7 Dec 2021 15:04:48 +0000 (17:04 +0200)] 
DPP2: PKEXv2 core protocol changes

Add support for PKEXv2 core protocol. This defines a new PKEX Exchange
Request message type with protocol negotiation and different rules for
key derivation with PKEXv2 or newer is used.

This does not change existing behavior for PKEX, i.e., the PKEXv1
variant will still be used by default.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: DPP3 protocol version during network introduction
Jouni Malinen [Fri, 3 Dec 2021 19:17:28 +0000 (21:17 +0200)] 
tests: DPP3 protocol version during network introduction

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Testing functionality to omit Protocol Version from Peer Discovery
Jouni Malinen [Fri, 3 Dec 2021 19:16:21 +0000 (21:16 +0200)] 
DPP: Testing functionality to omit Protocol Version from Peer Discovery

Allow the dpp_test parameter to be used to request the Protocol Version
attributed to be omitted from the Peer Discovery Request/Response
message.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP3: Verify version match during Network Introduction
Jouni Malinen [Fri, 3 Dec 2021 19:04:03 +0000 (21:04 +0200)] 
DPP3: Verify version match during Network Introduction

Verify that the Protocol Version attribute is used appropriate in Peer
Discovery Request/Response messages in cases where the signed Connector
includes the version information.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP3: Use Connector version instead of current version in Peer Discovery
Jouni Malinen [Fri, 3 Dec 2021 14:33:46 +0000 (16:33 +0200)] 
DPP3: Use Connector version instead of current version in Peer Discovery

Generate Peer Discovery Request/Response messages using the protected
version from the Connector, if present, instead of the currently
supported protocol version which might be higher than the one that got
included into the signed Connector during provisioning earlier.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP3: Add version member to Connector
Jouni Malinen [Fri, 3 Dec 2021 10:22:58 +0000 (12:22 +0200)] 
DPP3: Add version member to Connector

Indicate the protocol version number that the Enrollee used during the
DPP exchange that resulted in the generation of the Connector.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP3: Add build option for version 3 functionality
Jouni Malinen [Fri, 3 Dec 2021 10:09:18 +0000 (12:09 +0200)] 
DPP3: Add build option for version 3 functionality

CONFIG_DPP3=y can now be used to configure hostapd and wpa_supplicant
builds to include DPP version 3 functionality. This functionality is
still under design and the implementation is experimental and not
suitable to be enabled in production uses before the specification has
been finalized.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoReject ap_vendor_elements if its length is odd
Chaoli Zhou [Fri, 19 Nov 2021 14:13:29 +0000 (22:13 +0800)] 
Reject ap_vendor_elements if its length is odd

Align the process logic for ap_vendor_elements and ap_assocresp_elements
parsing by using the wpabuf_parse_bin() helper function in both.

Signed-off-by: Chaoli Zhou <zchaoli@codeaurora.org>
3 years agoFix bool type values for setband
Jouni Malinen [Fri, 26 Nov 2021 21:30:15 +0000 (23:30 +0200)] 
Fix bool type values for setband

wpa_add_scan_freqs_list() was updated to use bool for the is_6ghz
argument, but these callers were missed when updating the values from
0/1 to false/true.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoP2P: Remove 6 GHz channels from full scan if 6 GHz not enabled for P2P
Sreeramya Soratkal [Tue, 28 Sep 2021 15:33:15 +0000 (21:03 +0530)] 
P2P: Remove 6 GHz channels from full scan if 6 GHz not enabled for P2P

The channels included for the scan to connect to a P2P GO are optimized
such that the P2P GO preferred channel and the common channels are
included for the first few scans followed by a full scan in which all
the channels supported by the local device are included. This results in
P2P client including the 6 GHz channels for the full scan after GO
Negotiation even when 6 GHz channels are not used for the P2P
connection.

Exclude the 6 GHz channels from the full scan if 6 GHz channels are
supported but are not used for P2P connection.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>