]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
5 months agoP2P: Clear pending_listen_freq if listen failed
朱海 [Wed, 31 Jan 2024 12:58:47 +0000 (20:58 +0800)] 
P2P: Clear pending_listen_freq if listen failed

p2p_listen() use p2p->pending_listen_freq to check if there is a a
pending p2p_listen request. However, this value is not cleared when
failing to start listen operation, making extended listen not work
anymore.

P2P: Failed to request the driver to remain on channel (2412 MHz) for Listen state
p2p-dev-wlan0: Radio work 'p2p-listen'@0xa800d510 done in 0.005055 seconds
p2p-dev-wlan0: radio_work_free('p2p-listen'@0xa800d510: num_active_works --> 0
P2P: Previous Extended Listen operation had not been completed - try again
P2P: State LISTEN_ONLY -> IDLE
P2P: Extended Listen timeout
P2P: Going to listen(only) state
P2P: p2p_listen command pending already

Clear p2p->pending_listen_freq if the radio work to start the listen
operation fails.

Signed-off-by: zhuhai <zhuhai.mail@163.com>
5 months agoFix a typo in documentation of a configuration parameter
Jouni Malinen [Sun, 9 Feb 2025 10:48:16 +0000 (12:48 +0200)] 
Fix a typo in documentation of a configuration parameter

This "much" was likely supposed to be "must", but it is clearer to use
simpler "that contains" here.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 months agowolfSSL: Include asn.h to fix build with some library configs
Jouni Malinen [Sun, 9 Feb 2025 10:05:50 +0000 (12:05 +0200)] 
wolfSSL: Include asn.h to fix build with some library configs

It looks like wolfssl/wolfcrypt/asn.h gets pulled in by some of the DPP
functionality when --enable-wpas-dpp, but it is not included without
that. Include asn.h explicitly now that it is needed for non-DPP cases
as well after commit 99239d08de3e ("wolfssl: Implement RSA-OAEP-SHA256
for EAP-AKA privacy protection").

Signed-off-by: Jouni Malinen <j@w1.fi>
5 months agodrivers: RX-only configuration of the next TK during 4-way handshake
Jouni Malinen [Sat, 8 Feb 2025 18:11:30 +0000 (20:11 +0200)] 
drivers: RX-only configuration of the next TK during 4-way handshake

Introduce option for drivers to avoid race conditions with TK
configuration during 4-way handshake. The next pairwise TK is made
available to the driver interface before sending message 3 of the 4-way
handshake on the AP and after having received message 3 (but before
transmitting message 4) on the station. This allows the driver to
configure the next TK as an alternative RX-only key during the race
window and take the new TK fully into use once the 4-way handshake has
been fully completed. The alternative RX-only key must not be used for
TX and if a TK has already been configured, both that previously
configured TK and the next RX-only TK need to be allowed to decrypt
received frames (i.e., both needs to be tried before discarding a frame
as invalid). When taking the new TK fully into use, RX counters for it
must not be cleared. Unencrypted EAPOL frames must be allowed to be
received when only an RX-only TK is configured in the beginning of an
association.

This commit is only introducing the hostapd and wpa_supplicant internal
pieces for this functionality and this does not result in any changes to
the actual driver operations. This enables future commits to extend
driver wrappers (src/drivers/driver_*.c) to take this functionality into
use.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
5 months agoMLD: Fix Multi-Link element parsing for association failures
Jouni Malinen [Sat, 8 Feb 2025 16:00:06 +0000 (18:00 +0200)] 
MLD: Fix Multi-Link element parsing for association failures

The Common Info and STA Info fields are supposed to be extensible and as
such, their length fields need to be verified to be large enough, but if
there are unknown extra fields after the known fields, those need to be
silently ignored instead of rejecting the element.

Fixes: 5af986c75af4 ("MLD: Also mark links as failed after association failure")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
5 months agowlantest: Fix debug printing of extra STA Info field contents
Jouni Malinen [Sat, 8 Feb 2025 10:58:49 +0000 (12:58 +0200)] 
wlantest: Fix debug printing of extra STA Info field contents

Use the correct end pointer to avoid negative length and program
termination due to the hexdump.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
5 months agoAP MLD: Fix STA Info field parsing in Basic Multi-Link element
Jouni Malinen [Sat, 8 Feb 2025 10:55:42 +0000 (12:55 +0200)] 
AP MLD: Fix STA Info field parsing in Basic Multi-Link element

The STA Info field is supposed to be extensible. Instead of determined
the length of known components and only accepting that length, make sure
that there is sufficient octets in the received field for whatever we
are parsing and ignore any potential unknown extensions at the end.

In addition, simplify some of the bounds checking by using pointers to
the end of the subelement and the MLE itself instead of trying to track
the remaining lengths and a pointer to the current location
consistently.

Fixes: 5f5db9366cde ("AP: MLO: Process Multi-Link element from (Re)Association Request frame")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
5 months agoAP MLD: Simplify MLD MAC Address parsing from Multi-Link element
Jouni Malinen [Sat, 8 Feb 2025 09:58:43 +0000 (11:58 +0200)] 
AP MLD: Simplify MLD MAC Address parsing from Multi-Link element

There is no need to try to figure out the total expected length of the
Common Info field when we are interested in only the MLD MAC Address
field which is in the fixed header of this field in Basic Multi-Link
elements.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
5 months agoAP MLD: Fix Multi-Link element parsing in (Re)Association Request frame
Jouni Malinen [Sat, 8 Feb 2025 09:53:49 +0000 (11:53 +0200)] 
AP MLD: Fix Multi-Link element parsing in (Re)Association Request frame

The Common Info field in the Basic Multi-Link element is supposed to be
extensible with its Length field indicating the total length of the
field. Instead of only accepting that exact length, any larger value
needs to be accepted as well to support extensibility.

Fixes: 5f5db9366cde ("AP: MLO: Process Multi-Link element from (Re)Association Request frame")
Fixes: e996704201e7 ("AP: Handle re-association from a non-AP MLD")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
5 months agoP2P: Add Group ID info into P2P invitation control interface events
Shivani Baranwal [Tue, 28 Jan 2025 16:35:08 +0000 (22:05 +0530)] 
P2P: Add Group ID info into P2P invitation control interface events

Include the Group ID information in the P2P-INVITATION-RESULT and
P2P-INVITATION-ACCEPTED control interface events.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
5 months agoEHT: Fix 6 GHz HE operation bandwidth for 320 MHz with puncturing
Mohan Kumar G [Wed, 22 Jan 2025 19:06:34 +0000 (00:36 +0530)] 
EHT: Fix 6 GHz HE operation bandwidth for 320 MHz with puncturing

Channel width and center frequencies were updated incorrectly into the
HE Operation element when the AP is configured to use a 6 GHz 320 MHz
channel with a puncturing bitmap.

In hostapd_eid_he_operation(), punct_bitmap corresponds to 320 MHz while
oper_chwidth and seg0 are set for 160 MHz. When calculating legacy
bandwidth, punct_update_legacy_bw() uses only the first 160 MHz
puncturing bitmap and if the primary channel is in the second 160 MHz
segment, incorrect values are calculated for legacy bandwidth and center
frequencies.

Fix this issue by using the EHT operating channel width and center
frequency to calculate legacy bandwidth when puncturing is enabled.

Fixes: 2552de375db5 ("EHT: Fix HE center frequency for EHT 320 MHz with puncturing")
Signed-off-by: Mohan Kumar G <quic_mkumarg@quicinc.com>
5 months agoFix crash due to iteratively calling radio_remove_works()
Shivani Baranwal [Tue, 4 Feb 2025 09:35:12 +0000 (15:05 +0530)] 
Fix crash due to iteratively calling radio_remove_works()

Commit 3242793cb8df ("P2P: Remove pending p2p-listen radio work on
stopping listen") added removal of all pending p2p-listen radio works
when P2P listen is stopped. But in case where p2p-listen radio work is
pending with work->started=1 and radio_remove_works() is called (e.g.,
as part of interface disabling), there is an attempt to remove radio
work iteratively from wpas_stop_listen() causing a crash.

To avoid this, add check to avoid iterative calls to wpas_stop_listen().

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
5 months agonl80211: Fix compilation error due to uninitialized variable
Sunil Ravi [Tue, 4 Feb 2025 18:35:46 +0000 (18:35 +0000)] 
nl80211: Fix compilation error due to uninitialized variable

nl_flags is not necessarily set here.

Fixes: 00c2c20d74ee ("hostapd: Maintain single wpa_driver_nl80211_data (drv) object across interfaces")
Signed-off-by: Sunil Ravi <sunilravi@google.com>
5 months agoRemove extra statement terminators
Sunil Ravi [Tue, 4 Feb 2025 18:35:46 +0000 (18:35 +0000)] 
Remove extra statement terminators

Signed-off-by: Sunil Ravi <sunilravi@google.com>
5 months agoRADIUS: Fix pending request dropping
Jouni Malinen [Wed, 5 Feb 2025 17:23:39 +0000 (19:23 +0200)] 
RADIUS: Fix pending request dropping

A recent change to this moved the place where the processed RADIUS
request was removed from the pending list to happen after the message
handler had been called. This did not take into account possibility of
the handler adding a new pending request in the list and the prev_req
pointer not necessarily pointing to the correct entry anymore. As such,
some of the pending requests could have been lost and that would result
in not being able to process responses to those requests and also, to a
memory leak.

Fix this by determining prev_req at the point when the pending request
is being removed, i.e., after the handler function has already added a
new entry.

Fixes: 726432d7622c ("RADIUS: Drop pending request only when accepting the response")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
5 months agoQCA vendor values for traffic types for browsing and aperiodic bursts
Ananya Gupta [Thu, 23 Jan 2025 14:59:42 +0000 (20:29 +0530)] 
QCA vendor values for traffic types for browsing and aperiodic bursts

As part of flow classification enhancement, web browsing and aperiodic
bursty traffic will be detected. To enable this, add browsing and
aperiodic bursts types for traffic classification.

Signed-off-by: Ananya Gupta <quic_anangupt@quicinc.com>
5 months agoAdd QCA vendor test config attribute for link reconfiguration
Kavita Kavita [Thu, 23 Jan 2025 14:42:18 +0000 (20:12 +0530)] 
Add QCA vendor test config attribute for link reconfiguration

Add a nested attribute for a STA to control the driver's
response to BSS Transition Management (BTM) requests from the AP.

This is for testing purposes for special testbed functionality.

Signed-off-by: Kavita Kavita <quic_kkavita@quicinc.com>
5 months agoAdd QCA vendor attribute to enable/disable link reconfiguration support
Kavita Kavita [Thu, 23 Jan 2025 09:07:30 +0000 (14:37 +0530)] 
Add QCA vendor attribute to enable/disable link reconfiguration support

Add the attribute QCA_WLAN_VENDOR_ATTR_CONFIG_SETUP_LINK_RECONFIG_SUPPORT
to enable/disable link reconfiguration support in STA mode for testing
purposes.

Signed-off-by: Kavita Kavita <quic_kkavita@quicinc.com>
5 months agoAdd QCA vendor command to trigger primary link migration
Aditya Kumar Singh [Wed, 5 Feb 2025 03:52:34 +0000 (09:22 +0530)] 
Add QCA vendor command to trigger primary link migration

During MLO, the driver might select one of the link peers as the primary
link peer for doing one time operations/setup used at MLD peer level.
The primary link is not same as the association link. Now there can be
requirement to move the primary link from one link to other such as
during ML reconfiguration or user would like to configure this based on
its requirement such as load balancing.

Add a new vendor command QCA_NL80211_VENDOR_SUBCMD_PRI_LINK_MIGRATE to
trigger primary link migration from the userspace. Either just one ML
client or a bunch of clients can be migrated.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
6 months agowolfssl: wc_PBKDF2() in FIPS requires unlocking the private key
Juliusz Sosinowicz [Wed, 8 Jan 2025 18:41:06 +0000 (19:41 +0100)] 
wolfssl: wc_PBKDF2() in FIPS requires unlocking the private key

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agotests: Skip ap_wpa2_eap_fast_server_oom with wolfSSL
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:30 +0000 (20:16 +0200)] 
tests: Skip ap_wpa2_eap_fast_server_oom with wolfSSL

wolfSSL sends the session ticket extension on the first TLS handshake.
This causes the malloc error to be triggered on the first connection
instead of the second and the failure event is not registered in this
test case.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfSSL: Implement openssl_ecdh_curves
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:29 +0000 (20:16 +0200)] 
wolfSSL: Implement openssl_ecdh_curves

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfSSL: Simplify option setting in tls_set_conn_flags()
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:28 +0000 (20:16 +0200)] 
wolfSSL: Simplify option setting in tls_set_conn_flags()

Use one call to wolfSSL_set_options with all the relevant options
already set. In addition, use this function in
tls_connection_set_verify() instead of just tls_connection_set_params().

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Verify that session ticket setup does not fail
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:25 +0000 (20:16 +0200)] 
wolfssl: Verify that session ticket setup does not fail

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Actually use ocsp_stapling_response
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:25 +0000 (20:16 +0200)] 
wolfssl: Actually use ocsp_stapling_response

Without a call to wolfSSL_CTX_EnableOCSP(tls_ctx,
WOLFSSL_OCSP_URL_OVERRIDE); then the override URL would not be used. But
since we don't actually want to enable OCSP in this step, disable it
immediately after. The option will stay turned on.

Fully turn on OCSP stapling and do error checking on all calls.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Implement check_cert_subject
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:24 +0000 (20:16 +0200)] 
wolfssl: Implement check_cert_subject

Overall design was copied from tls_openssl.c. Multiple same
distinguished names in one subject name are not supported.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Add missing return in tls_init() in an error case
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:23 +0000 (20:16 +0200)] 
wolfssl: Add missing return in tls_init() in an error case

This is a fatal error and processing cannot continue further.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Remove unused and non-compiling code for OCSP
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:22 +0000 (20:16 +0200)] 
wolfssl: Remove unused and non-compiling code for OCSP

OCSP is handled internally by wolfSSL.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Log error number on failure
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:21 +0000 (20:16 +0200)] 
wolfssl: Log error number on failure

Log raw error number after wolfSSL_accept() or wolfSSL_connect() error.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Remove unnecessary WOLFSSL_X509_STORE manipulation
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:20 +0000 (20:16 +0200)] 
wolfssl: Remove unnecessary WOLFSSL_X509_STORE manipulation

Setting a new WOLFSSL_X509_STORE is not necessary when calling
wolfSSL_CTX_load_verify_locations().

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Generate events when OCSP status is revoked
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:19 +0000 (20:16 +0200)] 
wolfssl: Generate events when OCSP status is revoked

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agotests: ap_wpa2_eap_tls_versions: Run tests with wolfSSL
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:18 +0000 (20:16 +0200)] 
tests: ap_wpa2_eap_tls_versions: Run tests with wolfSSL

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agotests: ap_wpa2_eap_fast_cipher_suites: Allow wolfSSL to skip RC4 test
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:17 +0000 (20:16 +0200)] 
tests: ap_wpa2_eap_fast_cipher_suites: Allow wolfSSL to skip RC4 test

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agotests: ap_wpa2_eap_tls_rsa_and_ec: Use ciphersuites that wolfSSL understands
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:16 +0000 (20:16 +0200)] 
tests: ap_wpa2_eap_tls_rsa_and_ec: Use ciphersuites that wolfSSL understands

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agotests: Tune ap_wpa2_eap_fast_prf_oom for wolfssl
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:15 +0000 (20:16 +0200)] 
tests: Tune ap_wpa2_eap_fast_prf_oom for wolfssl

The wolfSSL backend only does one malloc in
tls_connection_get_eap_fast_key(). Failing on the second one skips the
only malloc and fails the test.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Set additional sigalgs when using anonymous cipher
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:14 +0000 (20:16 +0200)] 
wolfssl: Set additional sigalgs when using anonymous cipher

When setting an anonymous cipher, wolfSSL would only set the anonymous
signature algorithm. This sets some better defaults.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Implement SuiteB ciphersuites
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:08 +0000 (20:16 +0200)] 
wolfssl: Implement SuiteB ciphersuites

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Implement RSA-OAEP-SHA256 for EAP-AKA privacy protection
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:12 +0000 (20:16 +0200)] 
wolfssl: Implement RSA-OAEP-SHA256 for EAP-AKA privacy protection

Implement the crypto_rsa_key set of functions in the wolfSSL backend to
enable IMSI encryption for EAP-AKA and EAP-SIM.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Support tod policy
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:11 +0000 (20:16 +0200)] 
wolfssl: Support tod policy

Implement wolfssl_cert_tod() to support setting the correct tod value in
the certificate event message.

Always send the certificate event message in addition to error messages.
This is the same order of messages that the OpenSSL backend sends.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Fix get_x509_cert()
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:10 +0000 (20:16 +0200)] 
wolfssl: Fix get_x509_cert()

The conditional was checking if data was not present. We should be
allocating the buffer when data *is* present.

Fixes: fec03f98383e ("Add support for wolfSSL cryptographic library")
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Use defines for ex_data access
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:09 +0000 (20:16 +0200)] 
wolfssl: Use defines for ex_data access

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agowolfssl: Simplify tls_get_cipher()
Juliusz Sosinowicz [Thu, 4 Apr 2024 18:16:07 +0000 (20:16 +0200)] 
wolfssl: Simplify tls_get_cipher()

It appears that wolfSSL_get_cipher_name() returns the ciphersuite in the
format expected by hostapd.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
6 months agoOpenSSL: Use pkcs11-provider when OPENSSL_NO_ENGINE is defined
Davide Caratti [Wed, 15 Jan 2025 17:04:54 +0000 (18:04 +0100)] 
OpenSSL: Use pkcs11-provider when OPENSSL_NO_ENGINE is defined

Now that ENGINE API starts being deprecated in distros (like Fedora [1])
wpa_supplicant users might need a way to load certificates and keys from
PKCS11 URIs even when OPENSSL_NO_ENGINE is defined. We can do that using
pkcs11-provider: load it by default in wpa_supplicant, and try to use it
when OPENSSL_NO_ENGINE is defined and configuration requests PKCS11 URIs
for certificates / keys.

Inspired by pkcs11-provider test program 'tlssetkey.c' [2]

[1] https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine
[2] https://github.com/latchset/pkcs11-provider/blob/main/tests/tlssetkey.c

Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
6 months agotests: Enable TLS 1.3 tests with OpenSSL 3.4
Jouni Malinen [Sun, 2 Feb 2025 15:25:01 +0000 (17:25 +0200)] 
tests: Enable TLS 1.3 tests with OpenSSL 3.4

Replace the explicit list of OpenSSL 3.x versions with a wildcard 3.*
entry since TLS 1.3 support is very unlikely to be removed in the future
versions.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agotests: hostapd internal EAP server and timeout triggering disconnection
Jouni Malinen [Sun, 2 Feb 2025 10:02:18 +0000 (12:02 +0200)] 
tests: hostapd internal EAP server and timeout triggering disconnection

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agoAP: Fix disconnect from EAPOL state machine handling
Jouni Malinen [Sun, 2 Feb 2025 09:54:46 +0000 (11:54 +0200)] 
AP: Fix disconnect from EAPOL state machine handling

An earlier change to extend ap_sta_disconnect() to cover MLD cases ended
up calling ieee802_1x_free_station() from the step function in the EAPOL
authenticator state machine in case of EAP timeout and by doing so,
ended up leaving the EAPOL state machine operations continuing to be run
on freed memory.

Fix this by leaving the EAPOL state machine allocated when going through
all the other ap_sta_disconnect() steps so that the possible ongoing
operations can be finished safely before freeing memory. Actual freeing
of the state machine happens when freeing the full STA entry in the same
way that was used previously.

Fixes: 01677c47fb13 ("AP: Support disconnect with MLD")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agotests: Probe Request frame RX events with payload from hostapd
Jouni Malinen [Sat, 1 Feb 2025 18:04:52 +0000 (20:04 +0200)] 
tests: Probe Request frame RX events with payload from hostapd

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agoAP: Include the Probe Request frame inside RX_PROBE_REQUEST event
Quentin Feraboli [Thu, 30 Jan 2025 08:19:42 +0000 (09:19 +0100)] 
AP: Include the Probe Request frame inside RX_PROBE_REQUEST event

If notify_mgmt_frames is enabled, send the frame as a hexadecimal string
in the RX_PROBE_REQUEST events similarly to the AP-MGMT-FRAME-RECEIVED
events.

Signed-off-by: Quentin Feraboli <quentin.feraboli@softathome.com>
6 months agotests: Check for EAP-pwd capability in additional test cases
Jouni Malinen [Sat, 1 Feb 2025 17:45:55 +0000 (19:45 +0200)] 
tests: Check for EAP-pwd capability in additional test cases

These need to be skipped if the devices do not support EAP-pwd (e.g.,
when testing with GnuTLS).

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agotests: Check for SAE/OWE capability in additional test cases
Jouni Malinen [Sat, 1 Feb 2025 17:24:29 +0000 (19:24 +0200)] 
tests: Check for SAE/OWE capability in additional test cases

These need to be skipped if the devices do not support SAE/OWE (e.g.,
when testing with GnuTLS).

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agotests: Check OWE capability using a shared helper function
Jouni Malinen [Sat, 1 Feb 2025 17:29:30 +0000 (19:29 +0200)] 
tests: Check OWE capability using a shared helper function

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agoGnuTLS: Do not override priority string on shutdown for reauth
Jouni Malinen [Sat, 1 Feb 2025 17:13:53 +0000 (19:13 +0200)] 
GnuTLS: Do not override priority string on shutdown for reauth

Use the previously configured priority string instead of the default
value whenever shutting down a TLS connection in preparation for
reauthentication. This fixes an issue with GnuTLS ending up using TLS
1.3 for reauthentication even when 1.3 was explicitly disabled in the
configuration. That attempt to use TLS 1.3 failed in such case due to
different key derivation between TLS 1.3 and older versions.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agoGnuTLS: Use standard comment for falling through switch case
Jouni Malinen [Sat, 1 Feb 2025 16:49:15 +0000 (18:49 +0200)] 
GnuTLS: Use standard comment for falling through switch case

This gets rid of an implicit-fallthrough warning from the compiler.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agoGnuTLS: Disable TLS 1.3 if instructed
Mike Crowe [Thu, 30 Jan 2025 19:59:32 +0000 (19:59 +0000)] 
GnuTLS: Disable TLS 1.3 if instructed

Ensure that if TLS 1.3 is disabled (which is the default currently),
GnuTLS is told to disable support for it too. Some RADIUS servers
apparently object to downgrading from TLS 1.3 to TLS 1.2 later even
though FreeRADIUS doesn't seem to mind in my testing.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
6 months agowpa_supplicant: Use wpa_dbg() for "Successfully set 4addr mode"
Andrew Sayers [Mon, 27 Jan 2025 18:41:47 +0000 (18:41 +0000)] 
wpa_supplicant: Use wpa_dbg() for "Successfully set 4addr mode"

Most messages of the form "Successfully..." are set to MSG_DEBUG and
there is no need for this specific one to be any different.

Signed-off-by: Andrew Sayers <w1.fi@pileofstuff.org>
6 months agoExtend QCA vendor attributes for PASN offload from driver to userspace
Peddolla Harshavardhan Reddy [Fri, 3 Jan 2025 06:52:02 +0000 (12:22 +0530)] 
Extend QCA vendor attributes for PASN offload from driver to userspace

Extend the QCA vendor interface to allow the driver to initiate PASN
Authentication using user-preferred AKM and cipher suites for secure
ranging with configured security, providing greater flexibility. Add
support for SAE-tunneled PASN authentication with Password and PMKID
(PMKSA caching) attributes for an unsaved network profile with known and
valid credentials. Enable the comeback mechanism by including comeback
time and cookie in the status report to extend PASN Authentication with
a comeback.

Signed-off-by: Peddolla Harshavardhan Reddy <quic_peddolla@quicinc.com>
6 months agotests: Pass extra_bss_membership_selectors to nl80211 driver
Benjamin Berg [Wed, 8 Jan 2025 09:10:33 +0000 (10:10 +0100)] 
tests: Pass extra_bss_membership_selectors to nl80211 driver

mac80211 will start checking whether the BSS membership selectors
present in the supported rates set are supported by the local station.
Add the appropriate options so that the check is bypassed when
implemented on newer kernels.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 months agotests: Use fail_test() instead of relying on HT rejection
Benjamin Berg [Wed, 8 Jan 2025 09:10:32 +0000 (10:10 +0100)] 
tests: Use fail_test() instead of relying on HT rejection

This is more robust as mac80211 will start checking that it supports the
BSS membership selectors present in the supported rates set.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 months agonl80211: Send a list of BSS membership selectors supported by SME
Benjamin Berg [Wed, 8 Jan 2025 09:10:31 +0000 (10:10 +0100)] 
nl80211: Send a list of BSS membership selectors supported by SME

On authenticate and associate, include the
NL80211_ATTR_SUPPORTED_SELECTORS attribute to send a list of BSS
membership selectors that are supported by wpa_supplicant. This list
currently only contains the SAE H2E BSS membership selector as all the
other ones are handled by mac80211.

However, a new driver parameter is added to allow adding BSS membership
selectors for testing purposes.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 months agoAP: Only include SAE H2E BSS membership selector if SAE is required
Benjamin Berg [Wed, 8 Jan 2025 09:10:29 +0000 (10:10 +0100)] 
AP: Only include SAE H2E BSS membership selector if SAE is required

Including a BSS membership selector mandates the STA not to try to
connect in case it does not implement the indicated feature. However, in
the case of SAE H2E this may not be a hard requirement if the STA is
permitted to use a non-SAE AKM as well.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 months agoSync with wireless-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Sun, 26 Jan 2025 19:41:23 +0000 (21:41 +0200)] 
Sync with wireless-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2025-01-13.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agotests: SPP A-MSDU hwsim tests
Daniel Gabay [Tue, 7 Jan 2025 12:51:49 +0000 (14:51 +0200)] 
tests: SPP A-MSDU hwsim tests

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
6 months agoSTA: Support SPP A-MSDU negotiation
Daniel Gabay [Tue, 7 Jan 2025 12:51:48 +0000 (14:51 +0200)] 
STA: Support SPP A-MSDU negotiation

Implement SPP (Signaling and Payload Protected) A-MSDU negotiation.
Station advertise support in the RSNXE in the (Re)Association Request
frame whenever:
 - The driver supports SPP A-MSDU.
 - AP advertises SPP A-MSDU support in the RSNXE.
 - CCMP/GCMP cipher is used as the pairwise cipher in the connection.

Indicate to the driver to enable SPP A-MSDU in association parameters
when AP also advertised support in its RSNXE.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
6 months agonl80211: Option to tell the driver about SPP A-MSDUs in assoc params
Daniel Gabay [Tue, 7 Jan 2025 12:51:47 +0000 (14:51 +0200)] 
nl80211: Option to tell the driver about SPP A-MSDUs in assoc params

Use NL80211_ATTR_ASSOC_SPP_AMSDU attribute to indicate the driver
whether SPP A-MSDUs are used on this connection.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
6 months agoAP: Support SPP A-MSDU negotiation
Daniel Gabay [Tue, 7 Jan 2025 12:51:46 +0000 (14:51 +0200)] 
AP: Support SPP A-MSDU negotiation

Implement SPP (Signaling and Payload Protected) A-MSDU negotiation.
AP advertises support in the RSNXE whenever:
 - The spp_amsdu configuration parameter is enabled.
 - The driver supports SPP A-MSDU.
 - CCMP or GCMP cipher is enabled as a pairwise cipher.

Indicate to the driver to enable SPP A-MSDU when an associating station
advertised SPP A-MSDU support in the RSNXE in (Re)Association Request
frame.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
6 months agoAP: Add spp_amsdu configuration parameter
Daniel Gabay [Tue, 7 Jan 2025 12:51:44 +0000 (14:51 +0200)] 
AP: Add spp_amsdu configuration parameter

Add spp_amsdu (Signaling and Payload Protected A-MSDU) configuration
parameter for hostapd. This functionality depends on the driver
indicating support for it and CCMP/GCMP cipher suite being used. For the
time being, this functionality is disabled by default (spp_amsdu=0) to
avoid introducing known interoperability issues with the RSNXE in the
default configuration and since there has been quite minimal
interoperability testing of SPP A-MSDU so far.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
6 months agonl80211: SPP A-MSDU driver capability
Daniel Gabay [Tue, 7 Jan 2025 12:51:43 +0000 (14:51 +0200)] 
nl80211: SPP A-MSDU driver capability

cfg80211 introduced a new device capability, add a new driver capability
and station flag. In addition, since mac80211_hwsim does not implement
this feature in offload mode, make sure to disable it when
force_connect_cmd is set.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
6 months agoRSNXE definition of SPP A-MSDU Capable
Daniel Gabay [Tue, 7 Jan 2025 12:51:42 +0000 (14:51 +0200)] 
RSNXE definition of SPP A-MSDU Capable

This is based on IEEE P802.11-REVme/D7.0, Table 9-373 (Extended RSN
Capabilities field).

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
6 months agoAP: Add a csa_ie_only testing option
Emmanuel Grumbach [Sun, 12 Jan 2025 08:30:54 +0000 (10:30 +0200)] 
AP: Add a csa_ie_only testing option

This allows hostapd to be configured to add the CSA IE and not the ECSA
IE to mimic behavior of some APs.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 months agotests: Unpause publisher in nan_usd_publish_multi_chan_pause
Jouni Malinen [Sun, 26 Jan 2025 09:00:38 +0000 (11:00 +0200)] 
tests: Unpause publisher in nan_usd_publish_multi_chan_pause

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agoNAN USD: Add NAN_UNPAUSE_PUBLISH to cancel pauseState
Jouni Malinen [Sun, 26 Jan 2025 09:01:12 +0000 (11:01 +0200)] 
NAN USD: Add NAN_UNPAUSE_PUBLISH to cancel pauseState

This allows a publisher to be unpaused when service follow-up has been
completed with a peer. This functionality is not defined in the Wi-Fi
Aware specification for USD, but this is needed to avoid having to wait
for the 60 second pause state expiration since it is not clear when "USD
terminates" without upper layer service specific knowledge.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agohostapd: Fix 'start_disabled' option being ignored
Hancheng Yang [Mon, 13 Jan 2025 13:30:20 +0000 (14:30 +0100)] 
hostapd: Fix 'start_disabled' option being ignored

Fix two cases where 'start_disabled' were not respected:
- when ieee802_11_set_beacon() is called for a BSS, same operation will
  be called for all its colocated BSSs. Now we set beacon only for BSSs
  which have already had their beacon setting done.
- replace ieee802_11_set_beacons() by ieee802_11_update_beacons() in
  hostapd_setup_interface_complete_sync() for the same reason.

Signed-off-by: Hancheng Yang <hyang@freebox.fr>
6 months agobuild: Disable some optimizations if TRACE_BFD is enabled
Benjamin Berg [Mon, 6 Jan 2025 15:31:30 +0000 (17:31 +0200)] 
build: Disable some optimizations if TRACE_BFD is enabled

When TRACE_BFD is enabled we need to be able to fetch stack traces.
However, some required functions might be inlined by the compiler or
hidden due to tail call optimizations. Add -fno-inline and
-fno-optimize-sibling-calls to avoid these optimizations.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
6 months agotests: Simplify EHT tests that need to work with older tshark versions
Benjamin Berg [Mon, 6 Jan 2025 15:31:29 +0000 (17:31 +0200)] 
tests: Simplify EHT tests that need to work with older tshark versions

run_tshark() accepts now multiple filters. Change the tests that
required support for older tshark accordingly.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
6 months agotests: Permit passing multiple valid tshark filters
Benjamin Berg [Mon, 6 Jan 2025 15:31:28 +0000 (17:31 +0200)] 
tests: Permit passing multiple valid tshark filters

It is useful to support different versions of tshark which may have
updated disectors. In that case, there may be no filter that works with
all version of tshark.

Permit passing multiple filters which will be tried in-order. This
allows first trying the filter for the newer version and then falling
back to an older filter in order to support different tshark versions.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
6 months agoP2P: Provide better failure reason for group formation errors
Emilio Cobos Álvarez [Mon, 6 Jan 2025 12:25:57 +0000 (13:25 +0100)] 
P2P: Provide better failure reason for group formation errors

I was playing with the DBUS P2P interface of wpa_supplicant, and it's
hard to know what's going on when you get a group formation failure with
empty messages, to the point I usually need to resort to debugging
wpa_supplicant itself.

Provide meaningful failure reasons for these errors.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
6 months agotests: External password (file) storage with partially matching keys
Joshua Manchester [Tue, 21 Jan 2025 19:38:48 +0000 (19:38 +0000)] 
tests: External password (file) storage with partially matching keys

Signed-off-by: Joshua Manchester <joshuamanchester4@gmail.com>
6 months agoext_password_file: Ensure full key match with password file entries
Joshua Manchester [Tue, 21 Jan 2025 19:38:47 +0000 (19:38 +0000)] 
ext_password_file: Ensure full key match with password file entries

When searching for a matching key in the external password file, strings
were only compared up to the length of the key in the file. This meant
searching for key "foo" could retrieve the incorrect password if keys
"f" or "fo" were defined earlier in the file.

Signed-off-by: Joshua Manchester <joshuamanchester4@gmail.com>
6 months agotests: Known STA Indentification
Jouni Malinen [Sat, 25 Jan 2025 17:32:01 +0000 (19:32 +0200)] 
tests: Known STA Indentification

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
6 months agoSTA: Known STA Identification to skip association comeback mechanism
Jouni Malinen [Sat, 25 Jan 2025 17:36:11 +0000 (19:36 +0200)] 
STA: Known STA Identification to skip association comeback mechanism

Add a Known STA Identification element into (Re)Association Request
frame when using PMF with an AP with which we were last associated and
for which have stored the last used KCK in case that AP advertises
support for this capability to skip association comeback mechanism and
SA Query procedure.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
6 months agoAP: Known STA Identification to skip association comeback mechanism
Jouni Malinen [Sat, 25 Jan 2025 17:32:50 +0000 (19:32 +0200)] 
AP: Known STA Identification to skip association comeback mechanism

Allow AP to skip association comeback mechanism and SA Query procedure
if a currently associated STA tries to (re)association again by
including a valid Known STA Identification element in the
(Re)Association Request frame. This capability is disabled by default
and can be enabled with known_sta_identification=1.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
6 months agotests: RADIUS and discarding invalid RADIUS messages
Jouni Malinen [Sat, 25 Jan 2025 09:32:11 +0000 (11:32 +0200)] 
tests: RADIUS and discarding invalid RADIUS messages

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agoRADIUS: Drop pending request only when accepting the response
Jouni Malinen [Sat, 25 Jan 2025 09:21:16 +0000 (11:21 +0200)] 
RADIUS: Drop pending request only when accepting the response

The case of an invalid authenticator in a RADIUS response could imply
that the response is not from the correct RADIUS server and as such,
such a response should be discarded without changing internal state for
the pending request. The case of an unknown response (RADIUS_RX_UNKNOWN)
is somewhat more complex since it could have been indicated before
validating the authenticator. In any case, it seems better to change the
state for the pending request only when we have fully accepted the
response.

Allowing the internal state of pending RADIUS request to change based on
responses that are not fully validation could have allow at least a
theoretical DoS attack if an attacker were to have means for injecting
RADIUS messages to the network using the IP address of the real RADIUS
server and being able to do so more quickly than the real server and
with the matching identifier from the request header (i.e., either by
flooding 256 responses quickly or by having means to capture the RADIUS
request). These should not really be realistic options in a properly
protected deployment, but nevertheless it is good to be more careful in
processing RADIUS responses.

Remove a pending RADIUS request from the internal list only when having
fully accepted a matching RADIUS response, i.e., after one of the
registered handlers has confirmed that the authenticator is valid and
processing of the response has succeeded.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 months agotests: P2P2 invoke bootstrap comeback and pairing
Vinay Gannevaram [Wed, 22 Jan 2025 11:36:56 +0000 (17:06 +0530)] 
tests: P2P2 invoke bootstrap comeback and pairing

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agoP2P2: Bootstrapping through wpas_p2p_prov_disc()
Vinay Gannevaram [Wed, 22 Jan 2025 10:04:15 +0000 (15:34 +0530)] 
P2P2: Bootstrapping through wpas_p2p_prov_disc()

Upper layer component can use separate calls for bootstrapping and
pairing. Add support for bootstrapping through wpas_p2p_prov_disc() and
pairing through wpas_p2p_connect() by skipping bootstrapping with input
parameter pd equals to 0.

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agotests: Add provdisc parameter for P2P_CONNECT for P2P2 tests
Vinay Gannevaram [Wed, 22 Jan 2025 11:11:23 +0000 (16:41 +0530)] 
tests: Add provdisc parameter for P2P_CONNECT for P2P2 tests

For P2P2 connection, provdisc parameter in the P2P_CONNECT command is
used to initiate bootstrapping before pairing. Default enabling of
bootstrapping before pairing will be removed in a subsequent commit to
provide support for bootstrapping and pairing independently.

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agotests: Update P2P2 pairing verification test to validate DIRA
Vinay Gannevaram [Fri, 24 Jan 2025 13:01:56 +0000 (18:31 +0530)] 
tests: Update P2P2 pairing verification test to validate DIRA

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agoP2P2: Control interface command to validate DIRA info
Vinay Gannevaram [Sun, 19 Jan 2025 17:57:27 +0000 (23:27 +0530)] 
P2P2: Control interface command to validate DIRA info

Add a control interface command P2P_VALIDATE_DIRA to validate DIRA for
all the available Device Identity keys in the config file. Upper layer
components can use this to validate DIRA obtained from a peer in BLE
frames during BLE Assisted P2P R2 discovery.

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agoP2P2: Control interface command to get DIRA info of a P2P device
Vinay Gannevaram [Sun, 19 Jan 2025 17:22:27 +0000 (22:52 +0530)] 
P2P2: Control interface command to get DIRA info of a P2P device

Add a control interface command P2P_GET_DIRA to get DIRA nonce and tag
of a P2P device when pairing support is enabled. Upper layer components
can fetch DIRA info of a device and populate it in BLE frames for
BLE-Assisted P2P R2 Discovery.

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agoP2P2: Save the latest nonce and tag from a P2P USD discovery frame
Vinay Gannevaram [Sun, 19 Jan 2025 16:53:11 +0000 (22:23 +0530)] 
P2P2: Save the latest nonce and tag from a P2P USD discovery frame

During the P2P USD discovery, validate DIRA and store the valid nonce
and tag in the peer info structure. Upper layer components can identify
paired peer information with a new MAC address when valid nonce and tag
pair information is posted with device found event.

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agowlantest: Parse Link Reconfiguration Request/Response
Jouni Malinen [Fri, 24 Jan 2025 18:25:19 +0000 (20:25 +0200)] 
wlantest: Parse Link Reconfiguration Request/Response

Learn additional link addresses when link reconfiguration is used to add
new links. This commit does not remove links or update group keys, i.e.,
only the minimal case of adding new links is covered to allow unicast
frames on the new links to be decrypted.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
6 months agowlantest: Parse Extended MLD Capabilities And Operations in Common Info
Jouni Malinen [Fri, 24 Jan 2025 16:22:36 +0000 (18:22 +0200)] 
wlantest: Parse Extended MLD Capabilities And Operations in Common Info

Show the value in a clearer debug print instead of the generic "Extra
information at the end of Common Info".

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
6 months agoAP MLD: Skip over Extended MLD Capabilities And Operations field
Adil Saeed Musthafa [Wed, 22 Jan 2025 08:57:08 +0000 (00:57 -0800)] 
AP MLD: Skip over Extended MLD Capabilities And Operations field

Skip over the Extended MLD Capabilities And Operations field in the
Common Info field of the Basic Multi-Link element so that processing of
the information after the Common Info field can continue from the
correct offset.

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
6 months agotests: Succeed P2P group removal test if SSIDs happen to match
Benjamin Berg [Sun, 19 Jan 2025 07:48:46 +0000 (09:48 +0200)] 
tests: Succeed P2P group removal test if SSIDs happen to match

The test would fail in the unlikely event that the two SSIDs were the
same. Fix this by detecting the case and simply changing the expected
value (as the old entry will have been overwritten).

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
6 months agotests: Increase default go_neg_pbc timeout to 30 s
Benjamin Berg [Wed, 22 Jan 2025 11:14:19 +0000 (13:14 +0200)] 
tests: Increase default go_neg_pbc timeout to 30 s

Occasionally, the two device simply cannot find themselves within the 15
seconds (20 s - 5 s). Increase the default timeout to avoid random test
failures.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
6 months agoDo not write mesh_fwding network parameter if it has default value
Jouni Malinen [Fri, 24 Jan 2025 08:48:06 +0000 (10:48 +0200)] 
Do not write mesh_fwding network parameter if it has default value

This is set to 1 by default but the condition for writing it into the
configuration file used 0 as the default. Make these match so that there
won't be confusing entries in network block for cases that do not have
anything to do with mesh.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
6 months agotests: wpa_supplicant configuration parameter p2p2_client_list
Jouni Malinen [Fri, 24 Jan 2025 08:47:37 +0000 (10:47 +0200)] 
tests: wpa_supplicant configuration parameter p2p2_client_list

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
6 months agotests: Update P2P_INVITE parameters for P2P2 reinvoke
Vinay Gannevaram [Sat, 11 Jan 2025 06:44:34 +0000 (12:14 +0530)] 
tests: Update P2P_INVITE parameters for P2P2 reinvoke

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agoP2P2: Update P2P_INVITE processing for SSID randomization
Vinay Gannevaram [Sat, 11 Jan 2025 06:08:10 +0000 (11:38 +0530)] 
P2P2: Update P2P_INVITE processing for SSID randomization

With SSID randomization for P2P2 group reinvocation, the control
interface command P2P_INVITE requires the peer device address to be
present, but the network id is not required.

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
6 months agoP2P2: SSID randomization on group reinvoke
Vinay Gannevaram [Sat, 11 Jan 2025 06:08:10 +0000 (11:38 +0530)] 
P2P2: SSID randomization on group reinvoke

P2P R2 allows the GO to randomize SSID and Group BSSID when a group is
reinvoked. Add support to fetch the group details based on the device
identity block info of the peer with which the group reinvoke is
initiated. As the previous SSID of the network is no longer valid, fetch
the network details based on the ID of the device identity block.

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>