]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
17 months agotest: Clear country config param at the end of kernel_reg_disconnect
Jouni Malinen [Sun, 18 Feb 2024 09:03:55 +0000 (11:03 +0200)] 
test: Clear country config param at the end of kernel_reg_disconnect

This is needed to avoid causing issues for following test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
17 months agoAdd QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER command
mukul sharma [Thu, 8 Feb 2024 07:47:29 +0000 (13:17 +0530)] 
Add QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER command

During high battery voltage scenario, higher MCS data rate leads to poor
EVM accuracy which causes poor user experience. Hence to provide better
user experience, EVM accuracy needs to be improved by adjusting TX power
for MCS rate of specific band/radio chain. To achieve this, add a new
vendor command to configure required parameters in the WLAN driver.

Signed-off-by: Mukul Sharma <quic_mukul@quicinc.com>
17 months agoAdd QCA vendor attribute for BTM support configuration
Veerendranath Jakkam [Thu, 8 Feb 2024 09:11:08 +0000 (14:41 +0530)] 
Add QCA vendor attribute for BTM support configuration

Add a vendor attribute to configure BTM support in STA mode.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
17 months agotests: NAN USD
Jouni Malinen [Sun, 11 Feb 2024 17:10:08 +0000 (19:10 +0200)] 
tests: NAN USD

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
17 months agoNAN: USD in hostapd
Jouni Malinen [Thu, 15 Feb 2024 15:41:05 +0000 (17:41 +0200)] 
NAN: USD in hostapd

Add hostapd support for interacting with the NAN discovery engine to
allow single-channel (i.e., the AP's operating channel) USD as Publisher
or Subscriber.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
17 months agoNAN: USD in wpa_supplicant
Jouni Malinen [Sat, 10 Feb 2024 09:57:23 +0000 (11:57 +0200)] 
NAN: USD in wpa_supplicant

Add wpa_supplicant support for interacting with the NAN discovery engine
to allow USD as Publisher or Subscriber.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
17 months agoNAN: Unsynchronized service discovery (USD)
Jouni Malinen [Sat, 10 Feb 2024 09:57:23 +0000 (11:57 +0200)] 
NAN: Unsynchronized service discovery (USD)

Add NAN discovery engine and wpa_supplicant interface to use it for the
subset of NAN functionality that is needed for USD.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
17 months agoNAN: Protocol definitions
Jouni Malinen [Sat, 10 Feb 2024 08:58:01 +0000 (10:58 +0200)] 
NAN: Protocol definitions

Add NAN protocol definitions that are needed for USD based on Wi-Fi
Aware specification v4.0.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
17 months agoAdd os_reltime helpers to work with milliseconds
Jouni Malinen [Wed, 14 Feb 2024 19:42:35 +0000 (21:42 +0200)] 
Add os_reltime helpers to work with milliseconds

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
17 months agoDPP: Fix DPP Action frame check for EVENT_RX_MGMT events
Jouni Malinen [Tue, 13 Feb 2024 22:59:15 +0000 (00:59 +0200)] 
DPP: Fix DPP Action frame check for EVENT_RX_MGMT events

This was missing a check for the Category field and could have matched
other Action frames than Public Action frames.

Fixes: 9c2b8204e662 ("DPP: Integration for hostapd")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: FT and prepending PMKR1NAme to EAPOL-Key msg 2/4
Jouni Malinen [Sat, 3 Feb 2024 18:13:25 +0000 (20:13 +0200)] 
tests: FT and prepending PMKR1NAme to EAPOL-Key msg 2/4

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoFT: Allow wpa_supplicant to be configured to prepend PMKR1Name
Jouni Malinen [Sat, 3 Feb 2024 18:13:46 +0000 (20:13 +0200)] 
FT: Allow wpa_supplicant to be configured to prepend PMKR1Name

The standard is somewhat unclear on whether the PMKIDs used in
(Re)Association Request frame (i.e., potential PMKIDs that could be used
for PMKSA caching during the initial mobility domain association) are to
be retained or removed when generating EAPOL-Key msg 2/4.

wpa_supplicant has replaced the PMKID List contents from (Re)Association
Request frame with PMKR1Name when generating EAPOL-Key msg 2/4 for FT.
Allow it to be configured (ft_prepend_pmkid=1) to prepend the PMKR1Name
without removing the PMKIDs from (Re)Association Request frame.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoFT: Allow PMKIDs from AssocReq to be in EAPOL-Key msg 2/4
Jouni Malinen [Sat, 3 Feb 2024 18:39:56 +0000 (20:39 +0200)] 
FT: Allow PMKIDs from AssocReq to be in EAPOL-Key msg 2/4

The standard is somewhat unclear on whether the PMKIDs used in
(Re)Association Request frame (i.e., potential PMKIDs that could be used
for PMKSA caching during the initial mobility domain association) are to
be retained or removed when generating EAPOL-Key msg 2/4.

hostapd used to require that only the PMKR1Name is included in the PMKID
List of RSNE in EAPOL-Key msg 2/4. Extend this to allow the PMKIDs that
were included in the (Re)Association Request frame to be present as long
as the correct PMKR1Name is also present. This would allow PMKSA caching
to be used in initial mobility domain association with supplicant
implementations that insert the PMKR1Name without removing the PMKIDs
used in the (Re)Association Request frame. wpa_supplicant did not use to
that, but other implementations might.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoAP MLD: Handle EAPOL only on the association link
Chenming Huang [Thu, 23 Nov 2023 09:49:22 +0000 (15:19 +0530)] 
AP MLD: Handle EAPOL only on the association link

For some implementation, there is no link id in EAPOL event, e.g., use
drv_event_eapol_rx for receiving. Current design for such case is switch
to a link that stores the peer. However, this is error-prone because for
non-AP MLD case, sta_info is stored in all valid links but EAPOL sm is
only initialized in the association link. If EAPOL RX event is handled
in a non-association link, it will be discarded and this leads to EAPOL
timeout.

So find the association link to handle received EAPOL frame in such
case. This replaces the previously used workaround for RSN/wpa_sm for
the no link id specified case.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
18 months agoAP MLD: Do not allow disabling first interface affiliated with an AP MLD
Chenming Huang [Wed, 20 Dec 2023 08:39:18 +0000 (14:09 +0530)] 
AP MLD: Do not allow disabling first interface affiliated with an AP MLD

Disabling the first interface calls hapd_deinit(), which causes some
issues, e.g., failure when trying to disable other interfaces due to
NULL drv_priv.

So check that all other interfaces are already disabled before disable
the first interface.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
18 months agotests: AP MLD with two links and disabling/enabling full AP MLD
Jouni Malinen [Fri, 2 Feb 2024 20:25:27 +0000 (22:25 +0200)] 
tests: AP MLD with two links and disabling/enabling full AP MLD

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoAP MLD: Add support for hostapd_cli to disable/enable AP MLD
Chenming Huang [Thu, 7 Sep 2023 04:08:00 +0000 (09:38 +0530)] 
AP MLD: Add support for hostapd_cli to disable/enable AP MLD

Existing commands ENABLE/DISABLE only enable/disable the corresponding
link. To disable all links, multiple calls from different control
interfaces would be needed.

Add new commands "disable_mld" and "enable_mld" for hostapd_cli to
support disabling/enabling AP MLD for convenience.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
18 months agohostapd: Do not use prefix matching for ENABLE/RELOAD/DISABLE
Jouni Malinen [Fri, 2 Feb 2024 20:26:29 +0000 (22:26 +0200)] 
hostapd: Do not use prefix matching for ENABLE/RELOAD/DISABLE

These control interface commands do not take any parameters and as such,
do not need to use a prefix match. Replace that with an exact string
match to avoid matching other potential command strings.

Fixes: 7554565299a1 ("hostapd: Add ctrl_iface for enabling/reloading/disabling interface")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoAP MLD: Process link info when handling new STA event with driver SME
Chenming Huang [Tue, 21 Nov 2023 06:12:29 +0000 (11:42 +0530)] 
AP MLD: Process link info when handling new STA event with driver SME

When association is handled in hostapd, a non-AP MLD's info is stored in
all valid links. This should be the same when SME is offloaded to the
driver.

Also skip some operations that are already done by the driver
when SME is offloaded.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
18 months agotests: 40 MHz HT40 plus/minus to 20 MHz downgrade
Jouni Malinen [Fri, 2 Feb 2024 15:54:03 +0000 (17:54 +0200)] 
tests: 40 MHz HT40 plus/minus to 20 MHz downgrade

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoHandle both HT40+ and HT40- allowed consistently in channel check
Jouni Malinen [Fri, 2 Feb 2024 15:50:40 +0000 (17:50 +0200)] 
Handle both HT40+ and HT40- allowed consistently in channel check

Return the result from the first hostapd_is_usable_chan() call instead
of the following attempts in case of ht40_plus_minus_allowed to have
consistent behavior with the case where only one option is specified.
This allows the fallback to 20 MHz to work in additional cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Downgrade to 20 MHz due to regdb constraints
Jouni Malinen [Fri, 2 Feb 2024 09:16:21 +0000 (11:16 +0200)] 
tests: Downgrade to 20 MHz due to regdb constraints

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoACS: Handle ACS channel selected event in specified link
Chenming Huang [Sat, 29 Jul 2023 02:51:03 +0000 (08:21 +0530)] 
ACS: Handle ACS channel selected event in specified link

When ACS offloaded to the driver, the channel selected event carries
link id to specify the link if operating as AP MLD.

Find the specified link to handle this event.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
18 months agoACS: Add link id if operating as an AP MLD
Chenming Huang [Sat, 29 Jul 2023 02:19:03 +0000 (07:49 +0530)] 
ACS: Add link id if operating as an AP MLD

ACS is triggered per link, so link id is needed for the driver to handle
when the ACS operation is offloaded.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
18 months agowlantest: Fix TK iteration based on the PTK file
Jouni Malinen [Thu, 1 Feb 2024 17:51:56 +0000 (19:51 +0200)] 
wlantest: Fix TK iteration based on the PTK file

Use of ptk_len is not valid here to check what is the length of the
actual TK. Fix this by using ptk->tk_len instead so that the appropriate
decryption function can be selected for cases where the TKs are
configured through the PTK file.

Fixes: ce7bdb54e5c9 ("wlantest: Extend Management frame decryption to support GCMP and CCMP-256")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Remove WpaSupplicant control interface workarounds
Jouni Malinen [Wed, 31 Jan 2024 10:27:48 +0000 (12:27 +0200)] 
tests: Remove WpaSupplicant control interface workarounds

Now that run-tests.py closes the control interface sockets explicitly,
there is no need to try to avoid using dev[] within the D-Bus test
cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Close wpa_supplicant control interface sockets at the end
Jouni Malinen [Wed, 31 Jan 2024 10:16:36 +0000 (12:16 +0200)] 
tests: Close wpa_supplicant control interface sockets at the end

Close all the control interface sockets and delete the client socket
files explicitly at the end of the test loop. This removes needs for
various workarounds that tried to force WpaSupplicant and Ctrl class
__del__() to remove the sockets.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotest: dbus: Wait for connection before disconnect (again)
Johannes Berg [Tue, 30 Jan 2024 16:21:29 +0000 (17:21 +0100)] 
test: dbus: Wait for connection before disconnect (again)

The same thing as we did previously in dbus_p2p_autogo_pbc
can evidently also happen in dbus_p2p_autogo.

The test here wants to connect and then disconnect again,
but it's driven only by the GO side, so the client may end
up (with UML time-travel) not fully connecting, and then
it all fails. Wait for the client to have connected first.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18 months agotests: AP MLD behavior with multiple STAs
Jouni Malinen [Tue, 30 Jan 2024 09:42:05 +0000 (11:42 +0200)] 
tests: AP MLD behavior with multiple STAs

In particular, verify AID assignment by AP MLD to both non-AP MLDs and
non-MLD STAs.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoAP MLD: Fix AID allocation for legacy STA
Harish Rachakonda [Tue, 30 Jan 2024 09:15:58 +0000 (14:45 +0530)] 
AP MLD: Fix AID allocation for legacy STA

Currently, AID is not allocated properly in hostapd for legacy non-MLD
STA in case of an AP MLD. All such stations have same AID.

Fix this issue by allocating AID properly in hostapd when operating as
an AP MLD and the STA is not an MLD.

Fixes: d924be3bd06a ("AP: AID allocation for MLD")
Signed-off-by: Harish Rachakonda <quic_rachakon@quicinc.com>
18 months agoAdd QCA vendor command to disassociate with peer
Muna Sinada [Wed, 17 Jan 2024 03:48:48 +0000 (19:48 -0800)] 
Add QCA vendor command to disassociate with peer

This is an event indicating to the user space to disassociate with
peer based on the peer MAC address provided.

Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
18 months agotest: dbus: Wait for connection before disconnect
Johannes Berg [Sun, 28 Jan 2024 19:59:09 +0000 (20:59 +0100)] 
test: dbus: Wait for connection before disconnect

The test here wants to connect and then disconnect again, but it's
driven only by the GO side, so the client may end up (with UML
time-travel) not fully connecting, and then it all fails. Wait for the
client to have connected first.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18 months agoOpenSSL: Use library functions for HPKE when possible
Jouni Malinen [Sun, 28 Jan 2024 18:18:07 +0000 (20:18 +0200)] 
OpenSSL: Use library functions for HPKE when possible

OpenSSL 3.2 added support for HPKE. Use that implementation when
possible. At least for now, the internal version needs to be included as
well to be able to cover the special DPP use case with brainpool curves.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoRemove forgotted STAKey related functionality in EAPOL-Key Request
Jouni Malinen [Sun, 28 Jan 2024 17:15:08 +0000 (19:15 +0200)] 
Remove forgotted STAKey related functionality in EAPOL-Key Request

The use of a MAC KDE in the Key Data field of an EAPOL-Key Request frame
was only for the STAKey handshake. That handshake was implemented in
2005 as an experimental functionality and it was then removed in 2006.
However, this part of the functionality was forgotten. This does not do
anything in practice, so simplify the implementation and remove it.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agotests: FILS SK and STA requesting PTK rekeying
Jouni Malinen [Sun, 28 Jan 2024 17:02:55 +0000 (19:02 +0200)] 
tests: FILS SK and STA requesting PTK rekeying

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoFILS: Fix EAPOL-Key request generation
Jouni Malinen [Sun, 28 Jan 2024 16:56:47 +0000 (18:56 +0200)] 
FILS: Fix EAPOL-Key request generation

The Encrypted Key Data field need to be set to 1 whenever using an AEAD
cipher. Without this, the Authenticator would discard the EAPOL-Key
request frame when using FILS.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoDiscard EAPOL-Key request without Secure=1
Jouni Malinen [Sun, 28 Jan 2024 16:41:06 +0000 (18:41 +0200)] 
Discard EAPOL-Key request without Secure=1

EAPOL-Key request is accepted only if the MIC has been verified, so PTK
must have already been derived and Secure=1 needs to be used. Check the
Secure bit explicitly for completeness even though the MIC verification
is already taking care of validating that the sender is in the
possession of valid keys.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoDiscard EAPOL-Key Request frames during 4-way handshake
Jouni Malinen [Sun, 28 Jan 2024 16:32:03 +0000 (18:32 +0200)] 
Discard EAPOL-Key Request frames during 4-way handshake

While the Authenticator state machine conditions are already checking
for sm->EAPOLKeyRequest, it seems clearer to explicitly discard any
EAPOL-Key Request frame that is received unexpectedly during a 4-way
handshake.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoMove Key Replay Counter checks for EAPOL-Key frames to helper functions
Jouni Malinen [Sun, 28 Jan 2024 09:38:45 +0000 (11:38 +0200)] 
Move Key Replay Counter checks for EAPOL-Key frames to helper functions

This simplifies wpa_receive().

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoCheck Key Descriptor Version value earlier in the process
Jouni Malinen [Sun, 28 Jan 2024 09:26:16 +0000 (11:26 +0200)] 
Check Key Descriptor Version value earlier in the process

There is no need to try to process the EAPOL-Key frame if it has an
unexpected Key Descriptor Version value. Move these checks to happen
earlier in the sequence. In adition, use a separate helper function for
this to simplify wpa_receive() a bit.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoReject undefined Key Descriptor Version values explicitly
Jouni Malinen [Sun, 28 Jan 2024 09:22:47 +0000 (11:22 +0200)] 
Reject undefined Key Descriptor Version values explicitly

Check that the EAPOL-Key frame Key Descriptor Version value is one of
the defined values explicitly instead of failing to process the Key Data
field later (or end up ignoring the unexpected value if no processing of
Key Data is needed).

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoUse more generic checks for Key Descriptor Version 2 and 3
Jouni Malinen [Sun, 28 Jan 2024 09:18:40 +0000 (11:18 +0200)] 
Use more generic checks for Key Descriptor Version 2 and 3

IEEE Std 802.11-2020 describes the rule based on not-TKIP for value 2
and no pairwise cipher condition on value 3, so use that set of more
generic rules here.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoRemove always true check on EAPOL-Key message in authenticator
Jouni Malinen [Sun, 28 Jan 2024 09:07:55 +0000 (11:07 +0200)] 
Remove always true check on EAPOL-Key message in authenticator

This was practically dead code since no other msg value exist anymore.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agotests: EAPOL-Key msg 4/4 protocol testing for invalid Key Data encryption
Jouni Malinen [Sun, 28 Jan 2024 09:06:26 +0000 (11:06 +0200)] 
tests: EAPOL-Key msg 4/4 protocol testing for invalid Key Data encryption

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agotests: Use the provided timeout for P2P peer discovery
Jouni Malinen [Sat, 27 Jan 2024 09:35:31 +0000 (11:35 +0200)] 
tests: Use the provided timeout for P2P peer discovery

p2p_go_neg_init() ignored the provided timeout value and used the
default 15 second timeout in discover_peer(). This did not allow the
recently added go_neg_pbc() timeout increase for concurrent cases to be
used fully.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoExtend frequency configuration to handle 6 GHz channel 2
Thirusenthil Kumaran J [Wed, 10 Jan 2024 03:19:11 +0000 (08:49 +0530)] 
Extend frequency configuration to handle 6 GHz channel 2

In hostapd_set_freq_params(), if center_segment0 is 2, call
ieee80211_chan_to_freq() with operating class 136 instead of 131.

This is needed because, channel 2 is an exception in the 6 GHz band. It
comes before channel 1 and is part of operating class 136.

Channels order in 6 GHz:
    2 (Operating Class 136)
    1   5   9 ....  (Operating Class 131)

Signed-off-by: Thirusenthil Kumaran J <quic_thirusen@quicinc.com>
18 months agoAdd a QCA vendor attribute to determine QCA device
Muna Sinada [Wed, 17 Jan 2024 03:30:21 +0000 (19:30 -0800)] 
Add a QCA vendor attribute to determine QCA device

Add a new attribute for
%QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION subcommand. This
attribute is an 8 bit unsigned value used to specify whether an
associated peer is a QCA device.

Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
18 months agotests: Make P2P SD multi-query tests more robust
Jouni Malinen [Fri, 26 Jan 2024 15:13:37 +0000 (17:13 +0200)] 
tests: Make P2P SD multi-query tests more robust

Accept any sequence and number of responses as long as the needed
Bonjour and UPnP services are found.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoP2P: Accept P2P SD response without TX status
Jouni Malinen [Fri, 26 Jan 2024 15:12:16 +0000 (17:12 +0200)] 
P2P: Accept P2P SD response without TX status

If a GAS response is received for a pending SD query, process it even if
the TX status event for the query has not yet been received. It is
possible for the TX status and RX events to be reordered especially when
using UML time-travel, so this is needed to avoid race conditions to
make SD more robust.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agonl80211: Increase the hard scan timeout for initial attempt
Jouni Malinen [Fri, 26 Jan 2024 10:26:36 +0000 (12:26 +0200)] 
nl80211: Increase the hard scan timeout for initial attempt

If both 6 GHz and S1G channels are included, the previously used timeout
was not long enough at least with mac80211_hwsim. Increase the initial
timeout to allow such a scan to be completed.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Allow more time for chirping in dpp_chirp_ap_5g
Jouni Malinen [Fri, 26 Jan 2024 10:18:32 +0000 (12:18 +0200)] 
tests: Allow more time for chirping in dpp_chirp_ap_5g

The full scan at the beginning of the chirping step can take over 15
seconds when 6 GHz and S1G channels are included and the timeout here is
not enough to handle that.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Flush scan cache for rrm_beacon_req_table_detail
Jouni Malinen [Fri, 26 Jan 2024 10:10:41 +0000 (12:10 +0200)] 
tests: Flush scan cache for rrm_beacon_req_table_detail

Explicitly flush the scan cache in wpa_supplicant and cfg80211 to avoid
test failures here. An additional BSS table entry from a scan based on a
previous test case could result in causing this test case to report
failure since each beacon response could include multiple entries and
the check for the details would fail due to the unexpected data.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Make dfs_etsi more robust
Jouni Malinen [Fri, 26 Jan 2024 10:00:24 +0000 (12:00 +0200)] 
tests: Make dfs_etsi more robust

Explicitly wait for the STA to complete connection or channel switch
processing before running the second connectivity check.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoDFS: Print the random channel list entry selection in debug print
Jouni Malinen [Fri, 26 Jan 2024 09:59:48 +0000 (11:59 +0200)] 
DFS: Print the random channel list entry selection in debug print

This makes it a bit easier to understand what happens with random
channel selection after radar detection.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoDFS: Fix a typo in a debug message
Jouni Malinen [Fri, 26 Jan 2024 09:42:54 +0000 (11:42 +0200)] 
DFS: Fix a typo in a debug message

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Add more time for concurrent GO group negotiation cases
Jouni Malinen [Fri, 26 Jan 2024 09:18:24 +0000 (11:18 +0200)] 
tests: Add more time for concurrent GO group negotiation cases

It is possible for the parallel connection attempt with an AP and P2P
device discovery with P2P search on social channels to take close to the
15 second timeout and these test cases could fail because of that
instead of a real issue. Increase the timeout to make this less likely
to cause test failures. In addition, add a debug entry to the log on the
r_dev timeout to avoid confusing print from the i_dev thread reporting a
timeout even when the first timeout was on the rdev_

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoSend actual BTM capability when the driver takes care of BSS selection
Veerendranath Jakkam [Wed, 24 Jan 2024 19:44:23 +0000 (01:14 +0530)] 
Send actual BTM capability when the driver takes care of BSS selection

wpa_supplicant disables BTM capability in Extended Capabilities element
when wpa_supplicant selects a misbehaving MBO/OCE AP that uses RSN
without PMF, but this is disabling BTM support for whole ESS connection
lifetime though the BTM support can be enabled when the driver takes
care of BSS selection and selects/roams to a BSS which is MBO and OCE
specification compliant. Thus, always set the actual BTM capability in
Extended Capabilities element when the driver takes care of BSS
selection.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
18 months agowlantest: Adjust kdk_len according to RSNX capability for FT
Veerendranath Jakkam [Wed, 24 Jan 2024 03:17:15 +0000 (08:47 +0530)] 
wlantest: Adjust kdk_len according to RSNX capability for FT

Commit 0660f31ba0d0 ("wlantest: wlantest: Adjust kdk_len according to
RSNX capability") added support for PTK derivation and the additional
KDK component when Secure LTF support is used in the non-FT case.

Cover the same for the FT case to derive the correct PTK and consider
the additional KDK component when Secure LTF support is used.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
18 months agotests: Enable PSK AKMs in EHT+MLO in WPA3 transition mode test
Jouni Malinen [Thu, 25 Jan 2024 17:48:51 +0000 (19:48 +0200)] 
tests: Enable PSK AKMs in EHT+MLO in WPA3 transition mode test

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Do not enable VHT for EHT test cases on 2.4 GHz
Jouni Malinen [Thu, 25 Jan 2024 17:41:33 +0000 (19:41 +0200)] 
tests: Do not enable VHT for EHT test cases on 2.4 GHz

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: proxyarp_errors: Sync carrier before sending frame
Johannes Berg [Wed, 24 Jan 2024 16:12:49 +0000 (17:12 +0100)] 
tests: proxyarp_errors: Sync carrier before sending frame

Similar to other cases before, this may end up trying to
send the frame before the carrier state is ready. Ensure
it's ready before sending the frame.

To do that, rename the sync_carrier() function and make
the ifname argument optional.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18 months agotests: FST: Leave time to process session request
Johannes Berg [Wed, 24 Jan 2024 16:12:48 +0000 (17:12 +0100)] 
tests: FST: Leave time to process session request

Due to scheduling in UML time-travel, the test may continue
running and find that the failure didn't trigger when really
the frame just didn't make it through to the other side. Add
some time for the necessary processing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18 months agonl80211: Set allowed frequency list per link for AP MLD
Chenming Huang [Mon, 15 Jan 2024 12:03:18 +0000 (17:33 +0530)] 
nl80211: Set allowed frequency list per link for AP MLD

QCA_WLAN_VENDOR_ATTR_CONFIG_AP_ALLOWED_FREQ_LIST needs be to set per
link if operating as an AP MLD.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
18 months agoEnhance QCA vendor interface with new SAR version numbers
mukul sharma [Wed, 10 Jan 2024 10:14:32 +0000 (15:44 +0530)] 
Enhance QCA vendor interface with new SAR version numbers

Add more SAR version numbers in the qca_wlan_vendor_sar_version.

Signed-off-by: Mukul Sharma <quic_mukul@quicinc.com>
18 months agoMake test code easier for static analyzers
Jouni Malinen [Mon, 22 Jan 2024 20:02:39 +0000 (22:02 +0200)] 
Make test code easier for static analyzers

The previous os_strncmp() calls have already verified that there is a
space in the string, so this os_strchr() call cannot really return NULL.
Anyway, make this easier for static analyzers to understand.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoSAE: Fix resource leak on reading a separate password file
Jouni Malinen [Mon, 22 Jan 2024 20:00:35 +0000 (22:00 +0200)] 
SAE: Fix resource leak on reading a separate password file

The file needs to be closed on all paths before exiting from the
function.

Fixes: e748e50c629f ("SAE passwords from a separate file")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoACS: More consistent checking of the best channel pointer
Jouni Malinen [Mon, 22 Jan 2024 19:58:06 +0000 (21:58 +0200)] 
ACS: More consistent checking of the best channel pointer

It looks like best might be NULL in some cases, so check for this
explicitly before trying to dereference it for a debug print.

Fixes: 733de85680a4 ("ACS: Fix not selecting the best channel in the segment")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoFix error path on Key Data field decryption
Jouni Malinen [Mon, 22 Jan 2024 19:54:34 +0000 (21:54 +0200)] 
Fix error path on Key Data field decryption

key_data_buf is already freed on the common exit path, so do not try to
free it here on error.

Fixes: 4abc37e67b9a ("Support Key Data field decryption for EAPOL-Key msg 2/4 and 4/4")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoFT: Fix architecture for RxKH loading from a file
Jouni Malinen [Mon, 22 Jan 2024 19:30:10 +0000 (21:30 +0200)] 
FT: Fix architecture for RxKH loading from a file

src/ap/ap_config.c is not really supposed to call directly into a
function in hostapd/config_file.c. Furthermore, the wrapper through
ap_config.c did not really have any real value since it just called a
function that is within hostapd/*.c and that wrapper was called from
hostapd/*.c.

Instead of the wrapper, just call the function directly within the
hostapd directory.

Fixes: 392114a17960 ("FT: Add dynamic reload of RxKH definitions from file")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoOpenSSL: Fix a memory leak on an error path
Jouni Malinen [Mon, 22 Jan 2024 17:12:12 +0000 (19:12 +0200)] 
OpenSSL: Fix a memory leak on an error path

peerkey from EVP_PKEY_new() needs to be freed on all error paths.

Fixes: b062507670b5 ("OpenSSL: Implement crypto_ecdh routines without EC_KEY for OpenSSL 3.0")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Allow valgrind suppressions to be used
Jouni Malinen [Mon, 22 Jan 2024 16:27:24 +0000 (18:27 +0200)] 
tests: Allow valgrind suppressions to be used

This makes valgrind reports somewhat cleaner when external libraries
have memory leaks that are not straighforward to fix. In addition,
increase the number of functions to include backtraces since the default
was not large enough to cover some cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoAvoid uninitialized seq number in debug print for testing functionality
Jouni Malinen [Mon, 22 Jan 2024 16:26:19 +0000 (18:26 +0200)] 
Avoid uninitialized seq number in debug print for testing functionality

If the driver fetch for the current sequency number fails, do not try to
print the value in a debug print without having cleared it.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agotests: Fix a memory leak in a module test
Jouni Malinen [Mon, 22 Jan 2024 16:25:55 +0000 (18:25 +0200)] 
tests: Fix a memory leak in a module test

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agodbus: Avoid memory leak on error when signaling PropertiesChanged
Jouni Malinen [Mon, 22 Jan 2024 15:14:53 +0000 (17:14 +0200)] 
dbus: Avoid memory leak on error when signaling PropertiesChanged

put_changed_properties() might fail, e.g., due to memory allocation
failure or a failure in a property getter function. Such an error case
would have leaked the message iteration container since the call to
dbus_message_iter_close_container() would have been skipped.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agonl80211: Fix wiphy event handling when the driver is deinitialized
Jouni Malinen [Mon, 22 Jan 2024 12:39:54 +0000 (14:39 +0200)] 
nl80211: Fix wiphy event handling when the driver is deinitialized

Radar detection event could have resulted in the driver interface
instance getting deinitialized and the related memory freed in the
middle of the loop. This was not an issue when the event was passed only
into a single interface, but it became an issue when the loop tried to
send it to all interfaces. If the driver were removed, that loop check
would have used freed memory. Avoid this by explicitly checking that the
driver interface instance is still valid.

Fixes: f13683720239 ("nl80211: Pass wiphy events to all affected interfaces")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoDPP: Avoid a potential use-after-free on an error path in AP
Jouni Malinen [Mon, 22 Jan 2024 11:59:03 +0000 (13:59 +0200)] 
DPP: Avoid a potential use-after-free on an error path in AP

The TX status handler for DPP Authentication Confirm message might have
resulted in use-after-free if the start of a GAS query were to fail,
e.g., due to being somehow unable to transmit the initial request. Avoid
this by explicitly confirming that the authentication session was not
removed.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoDPP: Fix use-after-free in connection status reporting when using TCP
Jouni Malinen [Mon, 22 Jan 2024 11:11:17 +0000 (13:11 +0200)] 
DPP: Fix use-after-free in connection status reporting when using TCP

The current connection (struct dpp_connection) might get removed during
the dpp_tcp_send_msg() call, so the code setting the
on_tcp_tx_complete_remove flag needs to check whether that happened to
avoid a potential use-after-free.

Fixes: 33cb47cf0191 ("DPP: Fix connection result reporting when using TCP")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoDPP3: Fix potential use-after-free on push button bootstrap info
Jouni Malinen [Mon, 22 Jan 2024 10:41:02 +0000 (12:41 +0200)] 
DPP3: Fix potential use-after-free on push button bootstrap info

When removing the bootstrap info for the PB context, all the possible
pointers to that information needs to be cleared to avoid accesses to
freed memory.

Fixes: 37bccfcab854 ("DPP3: Push button bootstrap mechanism")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoEAP-SIM/AKA peer: Fix use-after-free for privacy identity
Jouni Malinen [Mon, 22 Jan 2024 09:47:00 +0000 (11:47 +0200)] 
EAP-SIM/AKA peer: Fix use-after-free for privacy identity

When the privacy protected itentity is used for EAP-SIM/AKA, the buffer
containing the identity was freed just before its use. Fix that by
reordering the operations.

Fixes: 881cb4198b55 ("EAP-SIM/AKA peer: Simplify identity selection for MK derivation")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agonl80211: Fix memory leak on libnl nl_cb
Jouni Malinen [Mon, 22 Jan 2024 09:35:51 +0000 (11:35 +0200)] 
nl80211: Fix memory leak on libnl nl_cb

nl_socket_get_cb() increases cb_refcnf for the cb that is bound to a
socket and as such, nl_cb_put() needs to be used with the returned cb
after having cloned it to avoid leaking memory due to cb_refcnt never
getting back to 0.

Fixes: da0d51fee74b ("nl80211: Use socket cb instead of global->nl_cb in send_and_recv()")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
18 months agoOpenSSL: Fix a memory leak in crypto_ec_key_parse_priv()
Jouni Malinen [Sun, 21 Jan 2024 22:37:31 +0000 (00:37 +0200)] 
OpenSSL: Fix a memory leak in crypto_ec_key_parse_priv()

The OpenSSL 3.x version of crypto_ec_key_parse_priv using
OSSL_DECODER_CTX missed the call to free the context. Fix it to avoid a
memory leak.

Fixes: 4f4479ef9e1c ("OpenSSL: crypto_ec_key_parse_{priv,pub}() without EC_KEY API")
Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoAP MLD: Optimize struct mld_link_info size
Jouni Malinen [Sun, 21 Jan 2024 20:24:08 +0000 (22:24 +0200)] 
AP MLD: Optimize struct mld_link_info size

Use smaller variables when possible and reorder the variables to avoid
unnecessary padding. This drops struct mld_link_info size from 64 to 48
bytes and removes 240 bytes from struct sta_info.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoMark hostapd_gen_probe_resp() static
Jouni Malinen [Sun, 21 Jan 2024 20:09:07 +0000 (22:09 +0200)] 
Mark hostapd_gen_probe_resp() static

This function has been used only within beacon.c and it got accidentally
converted to a global function.

Fixes: 6b5e00a80e5f ("AP: Use a struct for Probe Response generation in/out params")
Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoAP MLD: Reduce struct mld_link_info size
Jouni Malinen [Sun, 21 Jan 2024 19:06:18 +0000 (21:06 +0200)] 
AP MLD: Reduce struct mld_link_info size

Replace the fixed length maximum buffer size for STA profile with
dynamically allocated buffers for active links. This reduces struct
mld_link_info size by almost 16 kB and drops the per-STA information in
struct sta_info to a more reasonable size to avoid the almost 10x
increase from MLO support.

In addition, free the resp_sta_profile buffers as soon as the ML element
has bee generated for (Re)Association Response frame since those buffers
are not needed after that.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoAP MLD: Fix RADIUS deinit
Jouni Malinen [Sun, 21 Jan 2024 19:00:57 +0000 (21:00 +0200)] 
AP MLD: Fix RADIUS deinit

The singleton RADIUS client design did not address the deinit path
properly. Since hapd->radius could be shared with another links, the
pointer on all those other links needs to be cleared before freeing the
RADIUS client context. Without this, deinit path could have ended trying
to use freed memory when clearing STA entries from other links and
trying to flush any pending RADIUS client messages.

Fixes: a213fee11da3 ("AP: MLO: Make IEEE 802.1X SM, authserv, and RADIUS client singletons")
Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoAP MLD: Use a helper function to set whether a STA is a non-AP MLD
Jouni Malinen [Sun, 21 Jan 2024 17:06:36 +0000 (19:06 +0200)] 
AP MLD: Use a helper function to set whether a STA is a non-AP MLD

This makes it easier to change the struct sta_info design for MLD by
reducing the number of direct references.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoAP MLD: Use a helper function to check if a STA is a non-AP MLD
Jouni Malinen [Sun, 21 Jan 2024 16:45:28 +0000 (18:45 +0200)] 
AP MLD: Use a helper function to check if a STA is a non-AP MLD

This makes it easier to change the struct sta_info design for MLD by
reducing the number of direct references.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agotests: Association comeback mechanism in wpa_supplicant
Jouni Malinen [Sun, 21 Jan 2024 10:17:07 +0000 (12:17 +0200)] 
tests: Association comeback mechanism in wpa_supplicant

Allow the Timeout Interval Type field in the Timeout Interval element to
be overridden with a different value for testing purposes to be able to
bypass the association comeback processing in mac80211. This allows the
wpa_supplicant internal functionality to be tested.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoSME: Handle PMF association comeback when not handled in driver
Harry Bock [Wed, 10 Jan 2024 19:09:09 +0000 (14:09 -0500)] 
SME: Handle PMF association comeback when not handled in driver

In associations using PMF (IEEE 802.11w/MFP), the infrastructure
implements SA teardown protection by rejecting an (Re)Association
Request frame from an already-associated client.  The AP responds with
error 30 (Association request rejected temporarily) to instruct the
(potentially spoofing) client to back off, while it issues an SA Query
procedure to the already-associated client. If the client can respond to
it within the back-off period, it considers the new association to be a
spoof attempt.

However, there are cases where a legitimate client might need to
handle this error response - consider if the STA has deauthenticated,
but the AP cannot hear it (out of range).  If the MFP STA has deleted
its keys, it cannot respond to the SA Query procedure.

This association comeback process has commonly been implemented in the
driver, e.g., within mac80211 in case of the Linux drivers that use SME
in userspace. However, there are drivers that do not implement this
functionality. Extended wpa_supplicant to cover such cases as well.

The current implementation interprets this association error as a true
error, and will either add the BSS to the list of ignored BSSIDs, or
continue to try other BSSes. This can cause wpa_supplicant to back off
trying to reconnect for progressively longer intervals, depending on the
infrastructure's configured comeback timeout.

Allow wpa_supplicant to interpret the error, searching for the Timeout
Interval element in the (Re)Association Response frame and starting a
timer in the SME layer to re-associate after the timeout. This can be a
long delay (1-4 seconds in my experience), but it is likely much shorter
than bouncing between nearby BSSes.

This does not change behavior for drivers that implement association
comeback timer internally since they do not report the temporary
association rejection status code to user space.

Signed-off-by: Harry Bock <hbock@zebra.com>
18 months agotests: Write more info and statistics in parallel-vm.log
Jouni Malinen [Sat, 20 Jan 2024 18:53:21 +0000 (20:53 +0200)] 
tests: Write more info and statistics in parallel-vm.log

This is helpful in tracking how the total test execution time changes.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoD-Bus: Add a signal for HS2.0 terms and conditions
Damien Dejean [Fri, 19 Jan 2024 15:52:54 +0000 (15:52 +0000)] 
D-Bus: Add a signal for HS2.0 terms and conditions

Add HS20TermsAndConditions signal to D-Bus API to allow clients to be
notified when the network requires the acceptance of terms and
conditions. The URL of the T&C page is provided as a signal parameter.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
18 months agowlantest: Do not decrease debug level for test vectors
Jouni Malinen [Sat, 20 Jan 2024 17:45:20 +0000 (19:45 +0200)] 
wlantest: Do not decrease debug level for test vectors

The CCMP PV1 test vector dropped debugging verbosity at the end. This
was not really supposed to be done since these test vectors are expected
to print at EXCESSIVE verbosity.

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agowlantest: Add test vectors for S1G BIP
Henry Ptasinski [Thu, 11 Jan 2024 01:20:55 +0000 (17:20 -0800)] 
wlantest: Add test vectors for S1G BIP

- CMAC and GMAC modes
- 128-bit and 256-bit modes
- normal BIP and BIP using BCE
- test vectors with minimum and optional additional header elements in
  S1G beacon frames
- S1G Beacon Compatibility element in some cases, no other beacon body
   components

Signed-off-by: Henry Ptasinski <henry@e78com.com>
Signed-off-by: Andrew Pope <andrew.pope@morsemicro.com>
Signed-off-by: David Goodall <dave@morsemicro.com>
18 months agowlantest: Fix the cipher name in a BIP-GMAC-256 test vector
Henry Ptasinski [Thu, 11 Jan 2024 01:20:55 +0000 (17:20 -0800)] 
wlantest: Fix the cipher name in a BIP-GMAC-256 test vector

Signed-off-by: Henry Ptasinski <henry@e78com.com>
Signed-off-by: Andrew Pope <andrew.pope@morsemicro.com>
Signed-off-by: David Goodall <dave@morsemicro.com>
18 months agotests: FT with dynamic RxKHs configuration
Jouni Malinen [Sat, 20 Jan 2024 08:46:23 +0000 (10:46 +0200)] 
tests: FT with dynamic RxKHs configuration

Signed-off-by: Jouni Malinen <j@w1.fi>
18 months agoFT: Add control interface command to show configured RxKHs
Dariusz Kopka [Mon, 15 Jan 2024 13:16:00 +0000 (14:16 +0100)] 
FT: Add control interface command to show configured RxKHs

The new GET_RXKHS control interface command can be used to list the
currently configured RxKHs.

Signed-off-by: Dariusz Kopka <dariusz@plume.com>
18 months agoFT: Add dynamic reload of RxKH definitions from file
Dariusz Kopka [Mon, 15 Jan 2024 13:16:00 +0000 (14:16 +0100)] 
FT: Add dynamic reload of RxKH definitions from file

hostapd reads the list of Rx Key Holders from hostapd.conf file.
However, for systems where topology changes dynamically, the update
of RxKHs list is required without reloading the whole configuration.

Introduce a new source of RxKH definition with original syntax:
- rxkh_file - Path to a file containing a list of RxKHs.

In addition, add a control interface command RELOAD_RXKHS to
reload RxKHs definition from the file specified in `rxkh_file`.

This allows hostapd to properly distribute Rx keys even after topology
change (assuming rxkh_file is updated and reload_rxkhs command issued).

Syntax of rxkh_file is the same as extraction of r0kh and r1kh options
from original hostapd.conf file.

```
r0kh=ff:ff:ff:ff:ff:ff * 00112233445566778899aabbccddeeff
r0kh=ff:ff:ff:ff:ff:ff * 00112233445566778899aabbccddeeff
r1kh=00:00:00:00:00:00 00:00:00:00:00:00 00112233445566778899aabbccddeef
r1kh=00:00:00:00:00:00 00:00:00:00:00:00 00112233445566778899aabbccddeef
r1kh=00:00:00:00:00:00 00:00:00:00:00:00 00112233445566778899aabbccddeef
```

Signed-off-by: Dariusz Kopka <dariusz@plume.com>
18 months agoFT: Move RxKH configuration clearing into a helper function
Dariusz Kopka [Mon, 15 Jan 2024 13:16:00 +0000 (14:16 +0100)] 
FT: Move RxKH configuration clearing into a helper function

This can be used as a shared function for reloading RxKHs at runtime.

Signed-off-by: Dariusz Kopka <dariusz@plume.com>
18 months agoFix building against OpenSSL 3
Jouke Witteveen [Mon, 15 Jan 2024 17:57:52 +0000 (18:57 +0100)] 
Fix building against OpenSSL 3

Smartcard support uses the ENGINE API of OpenSSL, which has been
deprecated as of OpenSSL 3. Rather than migrating the code to the new API
or pretending that we do not support OpenSSL 3, accept that we use
deprecated functionality.

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
18 months agonl80211: Avoid NL80211_WPA_VERSION_3 on older kernel versions
Benjamin Berg [Wed, 17 Jan 2024 19:04:28 +0000 (20:04 +0100)] 
nl80211: Avoid NL80211_WPA_VERSION_3 on older kernel versions

NL80211_WPA_VERSION_3 was only added in kernel 5.2 so it should not be
set for older kernel versions.  There is no direct way to check if the
value is supported. However, we can use the new infrastructure to check
whether the kernel has the NL80211_ATTR_SAE_PASSWORD attribute. It is
related and was added at the same time.

Fixes: 6cc78b3945d3 ("nl80211: Set NL80211_WPA_VERSION_2 vs. _3 based on AKM")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>