]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
2 years agowlantest: Find a STA entry based on MLO affiliated link addresses
Jouni Malinen [Thu, 29 Sep 2022 10:08:37 +0000 (13:08 +0300)] 
wlantest: Find a STA entry based on MLO affiliated link addresses

Allow a single STA entry to be found for a non-AP MLD regardless of
which link MAC address was used to transmit/receive it.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Recognize SAE case for moving from State 1 to 2
Jouni Malinen [Thu, 29 Sep 2022 08:59:54 +0000 (11:59 +0300)] 
wlantest: Recognize SAE case for moving from State 1 to 2

Update STA state tracking for SAE authentication as well as the previous
covered Open System algorithm.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Use RSNE from MLO Link KDE, if present, for validation
Jouni Malinen [Thu, 29 Sep 2022 08:50:28 +0000 (11:50 +0300)] 
wlantest: Use RSNE from MLO Link KDE, if present, for validation

Check the Beacon/Probe Response frame RSNE against the RSNE within the
MLO Link KDE for the current affiliated link instead of RSNE when
processing the EAPOL-Key msg 3/4 Key Data field.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Print the TA of a Beacon frame for which there is no BIGTK
Jouni Malinen [Wed, 28 Sep 2022 21:03:27 +0000 (00:03 +0300)] 
wlantest: Print the TA of a Beacon frame for which there is no BIGTK

This makes the debug message more useful for determining whether an
expected BIGTK has been derived.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Learn GTK/IGTK/BIGTK for the current link in MLO case
Jouni Malinen [Wed, 28 Sep 2022 21:00:45 +0000 (00:00 +0300)] 
wlantest: Learn GTK/IGTK/BIGTK for the current link in MLO case

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoMLD STA: Add support for parsing MLO KDEs
Rohan Dutta [Thu, 15 Sep 2022 09:53:45 +0000 (15:23 +0530)] 
MLD STA: Add support for parsing MLO KDEs

Add support for parsing MLO KDEs as defined in Table 12-10 (KDE
selectors) in IEEE P802.11be/D2.0.

Signed-off-by: Rohan Dutta <quic_drohan@quicinc.com>
Co-authored-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agowlantest: Use wpa_parse_kde_ies() directly
Jouni Malinen [Wed, 28 Sep 2022 20:07:08 +0000 (23:07 +0300)] 
wlantest: Use wpa_parse_kde_ies() directly

Make this easier to understand by using the appropriately named function
to parse KDEs/IEs in the Key Data field of EAPOL-Key frames instead of
using the wrapper function that is there just to provide the old
function name for wpa_supplicant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Verify Beacon frame MME even after Probe Response reception
Jouni Malinen [Wed, 28 Sep 2022 20:02:31 +0000 (23:02 +0300)] 
wlantest: Verify Beacon frame MME even after Probe Response reception

rx_mgmt_beacon() was skipping all steps after a Probe Response frame
from the AP had been processed. This is expected for the parts that were
updating the bss entry information, but the checks for beacon protection
should not be skipped in this manner.

Skip onlu the updating parts while checking that beacon protection is
used correctly to make this more useful.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd QCA vendor interface support for Spatial Reuse (SR) feature
Rachit Kankane [Tue, 30 Aug 2022 12:25:18 +0000 (17:55 +0530)] 
Add QCA vendor interface support for Spatial Reuse (SR) feature

Add a new vendor sub-command to implement Spatial Reuse feature.
Userspace enables SR feature with specific configuration parameters. The
driver/firmware upon receiving the command, enables the SR feature if it
is supported by the currently connected AP. The driver may reject the
command if it cannot enable the SR with the configured parameters. The
driver sends events to userspace to indicate when SR feature is enabled
or disabled internally. Userspace can also query SR feature related
parameters and statistics from the driver/firmware as needed.

Signed-off-by: Rachit Kankane <quic_rkankane@quicinc.com>
Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agoFix compiler warning on shift overflow in QCA vendor definitions
Chaoli Zhou [Wed, 21 Sep 2022 08:25:45 +0000 (16:25 +0800)] 
Fix compiler warning on shift overflow in QCA vendor definitions

Fix the following compiler error:
qca-vendor.h:5892:54: error: result of β€˜1 << 31’ requires 33 bits to represent, but β€˜int’ only has 32 bits [-Werror=shift-overflow=]
 5892 |  QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40INTOL     = 1 << 31,

This "1" needs to be marked unsigned for this case of MSB=1.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
2 years agoFix compilation error due to use of bitwise '&' with boolean operands
Sunil Ravi [Fri, 16 Sep 2022 19:22:02 +0000 (12:22 -0700)] 
Fix compilation error due to use of bitwise '&' with boolean operands

Compiler throws a warning for using bitwise operation in
wpa_s_setup_sae_pt() function instead of logical AND operation on two
boolean values.

Fixes: e81ec0962d02 ("SAE: Use H2E unconditionally with the new AKM suites")
Signed-off-by: Sunil Ravi <sunilravi@google.com>
2 years agoP2P: Allow P2P CSA from 5 GHz to 2.4 GHz band
Sunil [Tue, 19 Jul 2022 22:04:39 +0000 (22:04 +0000)] 
P2P: Allow P2P CSA from 5 GHz to 2.4 GHz band

IEEE Std 802.11-2020, 11.8.8 (Selecting and advertising a new channel)
doesn't restrict switching to a channel which is not in the same band as
the current band. But at the same time, there are some issues in
switching between the 2.4/5 GHz bands and the 6 GHz band. So limit the
check to consider the critical use case of switching from a 5 GHz channel
to a 2.4 GHz channel.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
2 years agotests: Automatic channel selection and 2.4 GHz channel 14
Jouni Malinen [Thu, 22 Sep 2022 21:25:24 +0000 (00:25 +0300)] 
tests: Automatic channel selection and 2.4 GHz channel 14

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoUpdate hw mode after ACS selects the channel
Sunil Ravi [Wed, 10 Aug 2022 22:56:55 +0000 (22:56 +0000)] 
Update hw mode after ACS selects the channel

hostapd based automatic channel selection doesn't update the hardware
mode after the channel is selected. This change specifically helps
channel 14 which can operate only in IEEE 802.11b mode.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
2 years agotests: P2P and avoid frequencies preventing 80 MHz on channel 149"
Jouni Malinen [Thu, 22 Sep 2022 21:12:33 +0000 (00:12 +0300)] 
tests: P2P and avoid frequencies preventing 80 MHz on channel 149"

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Set operating class along with operating channel width
Sunil [Tue, 19 Jul 2022 00:04:20 +0000 (00:04 +0000)] 
P2P: Set operating class along with operating channel width

While setting up the P2P GO interface, wpa_supplicant sets the operating
channel width to CHANWIDTH_USE_HT in cases where it fails to set 80 MHz
bandwidth. In the same flow, update the operating class, too, according
to the channel width. This is to avoid setting up the operational
channel width back to 80 MHz from hostapd interface setup.

Signed-off-by: Sunil <sunilravi@google.com>
2 years agoP2P: Fix the issue in setting optimized listen channel
Sunil Ravi [Wed, 7 Sep 2022 20:23:05 +0000 (20:23 +0000)] 
P2P: Fix the issue in setting optimized listen channel

wpas_p2p_optimize_listen_channel() checks for the state and current ssid
of the interface calling this function. This check prevents the function
from setting the optimized listen channel. Since the listen channel is
stored in global P2P configuration data, do not check the state and
current interface of the caller.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
2 years agoFix RNR BSSID setting for own interfaces
Shay Bar [Thu, 26 May 2022 07:13:22 +0000 (10:13 +0300)] 
Fix RNR BSSID setting for own interfaces

bss->conf->bssid may be kept unset and will cause an empty BSSID field
in RNR. Fix this to use own_addr instead.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
Signed-off-by: moran.daori <moran.daori@celeno.com>
2 years agodbus: Omit FT key mgmt capabilities without CONFIG_IEEE80211R
Clemens Famulla-Conrad [Sat, 25 Jun 2022 21:33:50 +0000 (23:33 +0200)] 
dbus: Omit FT key mgmt capabilities without CONFIG_IEEE80211R

If wpa_supplicant was build without CONFIG_IEEE80211R, the
exposed key-management capabilities should not include one of the
FT protocols. If someone would use a FT protocol in such situation,
it would fail anyway.

Signed-off-by: Clemens Famulla-Conrad <cfamullaconrad@suse.de>
2 years agodbus: Fix property DebugShowKeys and DebugTimestamp
Clemens Famulla-Conrad [Tue, 5 Jul 2022 11:11:28 +0000 (13:11 +0200)] 
dbus: Fix property DebugShowKeys and DebugTimestamp

It is possible to specify -t or -K multiple times. With this the
value isn't boolean anymore and we hit a assert in libdbus
function `dbus_message_iter_append_basic()`, which expect 0 or 1
for DBUS_TYPE_BOOLEAN.

Signed-off-by: Clemens Famulla-Conrad <cfamullaconrad@suse.de>
2 years agoAdd usage print for -q flag
Orr Mazor [Thu, 12 May 2022 08:50:16 +0000 (10:50 +0200)] 
Add usage print for -q flag

Signed-off-by: Orr Mazor <o.mazor@genexis.eu>
2 years agoACS: Include frequency in info messages
stijn@linux-ipv6.be [Tue, 30 Aug 2022 11:45:11 +0000 (14:45 +0300)] 
ACS: Include frequency in info messages

The ACS info messages frequently appear for multiple channels. Without
the actual frequency in the messages, they are not very informative.
Add the frequency to them to improve this.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agoUse a less generic name for IEEE802.11 CRC-32 routine
Sergey Matyukevich [Mon, 5 Sep 2022 20:18:23 +0000 (23:18 +0300)] 
Use a less generic name for IEEE802.11 CRC-32 routine

Hostapd uses 'crc32' name for IEEE802.11 CRC-32 routine. This name is
too generic. Buildroot autobuilder detected build configuration that
failed to build due to the naming conflict: static linking with openssl
using zlib-ng as a zlib provider, e.g. see:
- http://autobuild.buildroot.net/results/9901df820d3afa4cde78e8ad6d62cb8ce7e69fdb/
- http://autobuild.buildroot.net/results/ac19975f0bf77f4a8ca574c374092ba81cd5a332/

Use a less generic name ieee80211_crc32 for IEEE802.11 CRC-32 routine
to avoid such naming conflicts.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
2 years agotests: hwsim: Search for UBSAN in kernel messages
Johannes Berg [Wed, 17 Aug 2022 07:17:31 +0000 (09:17 +0200)] 
tests: hwsim: Search for UBSAN in kernel messages

If UBSAN is enabled, flag errors from it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 years agotests: vm: Simplify parameter passing
Johannes Berg [Tue, 12 Jul 2022 21:44:19 +0000 (23:44 +0200)] 
tests: vm: Simplify parameter passing

Since the kernel  actually passes the command-line parameters
as environment variables to the init script, there's no need
to parse them out of /proc/cmdline.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 years agotests: hwsim: Allow configuring MODULEDIR
Johannes Berg [Mon, 13 Jun 2022 09:07:07 +0000 (11:07 +0200)] 
tests: hwsim: Allow configuring MODULEDIR

It can be useful to configure a different module directory, so you don't
need to install the kernel modules in the host /lib/modules/ location.
Allow configuring it in the config file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 years agotests: Reload correct regdb if possible/needed
Johannes Berg [Wed, 11 May 2022 13:09:06 +0000 (15:09 +0200)] 
tests: Reload correct regdb if possible/needed

If cfg80211 is built into the kernel, then it may/will have
loaded the regdb before we mount our own /lib/firmware. This
may result in using the wrong regulatory data. Fix this by
using iw to reload the regdb after mounting it.

Fixes: a29c2399a77a ("tests: Add regulatory database to VMs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 years agoACS: Don't select indoor channel on outdoor operation
David Bauer [Sun, 11 Sep 2022 16:41:12 +0000 (18:41 +0200)] 
ACS: Don't select indoor channel on outdoor operation

Don't select channels designated for exclusive indoor use when the
country string is set for outdoor operation (country3=0x4f, i.e., the
third character of the country string is 'O').

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agowpa_supplicant man page missing -I flag
Robert Hernandez [Tue, 13 Sep 2022 14:52:01 +0000 (14:52 +0000)] 
wpa_supplicant man page missing -I flag

wpa_supplicant: Missing manpage -I entry

Signed-off-by: Robert James Hernandez <rob@sarcasticadmin.com>
2 years agoAdd a new QCA vendor attribute to support flexible TWT
nakul kachhwaha [Tue, 9 Aug 2022 12:09:51 +0000 (17:39 +0530)] 
Add a new QCA vendor attribute to support flexible TWT

Add a new attribute QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_SP_START_OFFSET to
configure offset to shift start of the service period. This attribute
will be used when device supports flexible TWT. If provided, this
attribute will override QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME.

Signed-off-by: nakul kachhwaha <quic_nkachhwa@quicinc.com>
2 years agoMLD STA: Indicate per link channel switch
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:22 +0000 (20:14 +0530)] 
MLD STA: Indicate per link channel switch

Parse link id info from channel switch events and indicate the info to
control interface using new per link channel switch events. If channel
switch happens on the link which used during association both legacy
and new per-link channel switch events will be reported.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Add per-link MLO signal poll
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:21 +0000 (20:14 +0530)] 
MLD STA: Add per-link MLO signal poll

Add support to fetch and indicate per-link MLO signal poll information
via a new control interface command MLO_SIGNAL_POLL.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Add MLO_STATUS control interface command
Shivani Baranwal [Thu, 8 Sep 2022 14:44:20 +0000 (20:14 +0530)] 
MLD STA: Add MLO_STATUS control interface command

Add support for MLO_STATUS control interface command to indicate
per-link information.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agonl80211: Send bssid info as parameter to nl80211_get_link_signal()
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:19 +0000 (20:14 +0530)] 
nl80211: Send bssid info as parameter to nl80211_get_link_signal()

Add bssid as parameter to nl80211_get_link_signal() instead of using
bssid from driver structure. This is useful for calling the function
per-MLO link.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Indicate AP MLD address in STATUS command
Aleti Nageshwar Reddy [Thu, 8 Sep 2022 14:44:18 +0000 (20:14 +0530)] 
MLD STA: Indicate AP MLD address in STATUS command

Append AP MLD address info into the STATUS control interface command.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agoMLD STA: Indicate AP MLD address in CTRL-EVENT-CONNECTED
Aleti Nageshwar Reddy [Thu, 8 Sep 2022 14:44:17 +0000 (20:14 +0530)] 
MLD STA: Indicate AP MLD address in CTRL-EVENT-CONNECTED

Append the AP MLD address to CTRL-EVENT-CONNECTED when the current
connection uses MLO.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agoAdd AP MLD address into BSS command output
Aleti Nageshwar Reddy [Thu, 8 Sep 2022 14:44:16 +0000 (20:14 +0530)] 
Add AP MLD address into BSS command output

Indicate AP MLD address in the response to the BSS control interface
command.

Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
2 years agobss: Parse and store MLD address of the AP from Multi-Link element
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:15 +0000 (20:14 +0530)] 
bss: Parse and store MLD address of the AP from Multi-Link element

Parse Multi-Link element received in scan result to get AP MLD address
and cache it in the wpa_bss structure.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoHelper function to get MLD address from Basic Multi-Link element
Shivani Baranwal [Thu, 8 Sep 2022 14:44:14 +0000 (20:14 +0530)] 
Helper function to get MLD address from Basic Multi-Link element

Add a utility function to fetch Multi-Link Device (MLD) address from a
Basic Multi-Link element.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoscan: Helper function to get ML IE of specified type from scan result IEs
Shivani Baranwal [Thu, 8 Sep 2022 14:44:13 +0000 (20:14 +0530)] 
scan: Helper function to get ML IE of specified type from scan result IEs

Add a helper function to get Multi-Link element of a specified type from
scan result Probe Response frame or Beacon frame elements.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agonl80211: Use AP MLD address to set supplicant port as authorized
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:12 +0000 (20:14 +0530)] 
nl80211: Use AP MLD address to set supplicant port as authorized

Use AP MLD address as the peer's MAC address to set supplicant port as
authorized for MLO connection.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Fetch MLO connection info into core wpa_supplicant
Shivani Baranwal [Thu, 8 Sep 2022 14:44:11 +0000 (20:14 +0530)] 
MLD STA: Fetch MLO connection info into core wpa_supplicant

Add support to fetch MLO connection info from the driver to the
wpa_supplicant instance of corresponding MLD STA interface. In addition,
return true for BSSs associated with MLO links from wpa_bss_in_use() to
avoid getting them cleared from scan results.

Co-authored-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agonl80211: Indicate MLO connection info in driver status
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:10 +0000 (20:14 +0530)] 
nl80211: Indicate MLO connection info in driver status

Indicate MLO connection info in DRIVER-STATUS control interface command.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agonl80211: Parse MLO connection info in NL80211_CMD_CONNECT event
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:09 +0000 (20:14 +0530)] 
nl80211: Parse MLO connection info in NL80211_CMD_CONNECT event

Parse NL80211_ATTR_MLO_LINKS in NL80211_CMD_CONNECT event and cache the
MLO connection information. Set the legacy connection fields such as
assoc_freq and bssid to the values of the MLO link on which association
happened.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoAdd a helper function to get ML IE of specified type from IEs buffer
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:08 +0000 (20:14 +0530)] 
Add a helper function to get ML IE of specified type from IEs buffer

Add a helper function to find the specified type of Multi-Link element
from IEs buffer.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoEHT: Add Multi-Link element field definitions
Veerendranath Jakkam [Thu, 8 Sep 2022 14:44:07 +0000 (20:14 +0530)] 
EHT: Add Multi-Link element field definitions

Define the following fields described in IEEE P802.11be/D2.1:
- Multi-Link element types as defined in Table 9-401c (Type subfield
  encoding)
- Basic Multi-Link element presence bitmap as defined in Figure
  9-1002g (Presence Bitmap subfield of the Basic Multi-Link element
  format)

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoP2P: Use only PSC for P2P group in the 6 GHz band
Qiwei Cai [Wed, 27 Jul 2022 05:20:08 +0000 (13:20 +0800)] 
P2P: Use only PSC for P2P group in the 6 GHz band

P2P connections in the 6 GHz band should be limited to preferred
scanning channels since AP/GO discovery cannot depend on 2.4/5 GHz
discovery.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoConfigure RRM elements to the driver in the driver-AP-SME case
Chaoli Zhou [Tue, 30 Aug 2022 07:13:57 +0000 (15:13 +0800)] 
Configure RRM elements to the driver in the driver-AP-SME case

Support updating the RRM IEs to the driver for Probe Response and
(Re)Association response frames in the AP mode when the SME is
implemented in the driver.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
2 years agotests: sigma_dut and EAP-AKA with imsiPrivacyCertID
Jouni Malinen [Wed, 14 Sep 2022 17:31:55 +0000 (20:31 +0300)] 
tests: sigma_dut and EAP-AKA with imsiPrivacyCertID

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoSAE: Use correct SSID profile for SAE auth retries during external auth
Veerendranath Jakkam [Mon, 8 Aug 2022 11:33:38 +0000 (17:03 +0530)] 
SAE: Use correct SSID profile for SAE auth retries during external auth

Previously, wpa_supplicant was using the current SSID for building the
SAE authentication commit frame for retries during external
authentication. But the external authentication SSID can be different
from the current SSID. Fix this by using the correct SSID profile.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoSAE: Include the new -EXT-KEY AKMs in external auth case
Jouni Malinen [Tue, 13 Sep 2022 02:12:03 +0000 (05:12 +0300)] 
SAE: Include the new -EXT-KEY AKMs in external auth case

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoSAE: Make sure H2E PT is derived for external auth SSID profile
Veerendranath Jakkam [Mon, 8 Aug 2022 10:18:53 +0000 (15:48 +0530)] 
SAE: Make sure H2E PT is derived for external auth SSID profile

The driver's SME may choose a BSS of a different ESS (SSID) compared to
the current SSID and trigger external authentication. If the chosen SSID
is not associated/selected before by wpa_supplicant it won't have the
H2E PT derived. Make sure to derive PT for SSID indicated in the
external authentication request.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoEnable TWT responder AP role only if IEEE 802.11ax/HE is enabled
Manaswini Paluri [Wed, 6 Jul 2022 13:57:59 +0000 (19:27 +0530)] 
Enable TWT responder AP role only if IEEE 802.11ax/HE is enabled

Set TWT responder configurator in the driver parameters only when the AP
is configured with HE enabled. This was already done for the extended
capability bit generation in commit 8de0ff0fa1de ("HE: Add TWT responder
extended capabilities field"), but this parameter for the driver command
to start the AP in _ieee802_11_set_beacon() missed the condition.

Move the ieee80211ax check into the common helper function to cover both
cases. In addition, add a check for disable_11ax to cover the case where
HE is disabled for a specific BSS.

Fixes: ab8c55358e10 ("HE: Dynamically turn on TWT responder support")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd p2p_optimize_listen_chan=1 to default Android template
Hu Wang [Fri, 26 Aug 2022 03:17:50 +0000 (11:17 +0800)] 
Add p2p_optimize_listen_chan=1 to default Android template

Commit e3bd6e9dc0 ("P2P: Use another interface operating channel as
listen channel") allows P2P listen channel to be selected based on
another interface operating channel if it is one of social channels
(i.e., 2.4 GHz 1, 6, 11).

This optimization is disabled by default due to the technical
specification expectations, but since this can be quite helpful for
optimized behavior, enable it by adding p2p_optimize_listen_chan=1 to
the default Android configuration template.

2 years agoExtend attributes of QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO
Aleti Nageshwar Reddy [Wed, 27 Jul 2022 11:40:08 +0000 (17:10 +0530)] 
Extend attributes of QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO

Extend attributes of subcmd QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO
for quering per MCS TX and RX packets from the driver/firmware.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoQCA vendor attribute to configure periodic sounding
Kiran Kumar Lokere [Fri, 9 Sep 2022 23:42:45 +0000 (16:42 -0700)] 
QCA vendor attribute to configure periodic sounding

Add a new QCA vendor attribute to configure the periodic sounding for Tx
beamformer functionality.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: MLD MAC Address in CCMP/GCMP AAD/nonce
Jouni Malinen [Mon, 5 Sep 2022 20:08:43 +0000 (23:08 +0300)] 
wlantest: MLD MAC Address in CCMP/GCMP AAD/nonce

Use the MLD MAC Address instead of link address in CCMP/GCMP AAD/nonce
construction when processing an individually addressed Data frame with
FromDS=1 or ToDS=1 between an AP MLD and non-AP MLD.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Recognize additional not-Robust Action categories
Jouni Malinen [Mon, 5 Sep 2022 18:56:08 +0000 (21:56 +0300)] 
wlantest: Recognize additional not-Robust Action categories

Do not complain about unprotected Action frames for additional
categories that have been defined as not being Robust.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Use link BSS entry instead of AP MLD entry for EAPOL-Key frames
Jouni Malinen [Mon, 5 Sep 2022 18:47:49 +0000 (21:47 +0300)] 
wlantest: Use link BSS entry instead of AP MLD entry for EAPOL-Key frames

SA/DA in EAPOL-Key frames might not be the BSSID when MLO is used. Check
for these cases to avoid adding unexpected BSS entries for AP MLD
instead of the per-link BSS entry. This is needed to be able to find the
derived keys when decrypting protected frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Distinguish EAPOL-Key msg 4/4 from 2/4 based on Key Nonce
Jouni Malinen [Mon, 5 Sep 2022 18:16:44 +0000 (21:16 +0300)] 
wlantest: Distinguish EAPOL-Key msg 4/4 from 2/4 based on Key Nonce

IEEE P802.11be adds the MAC Address KDE into the EAPOL-Key msg 4/4 when
MLO is used and as such, the previously used check for Key Data Length
value 0 is not sufficient for recognizing the EAPOL-Key msg 4/4 anymore.
Also check for an all zero Key Nonce value since that field is supposed
to be zero in EAPOL-Key msg 4/4 and it has to be a random value in
EAPOL-Key msg 2/4.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Use MLD MAC addresses, if known, as AA/SA in PTK derivation
Jouni Malinen [Mon, 5 Sep 2022 18:10:35 +0000 (21:10 +0300)] 
wlantest: Use MLD MAC addresses, if known, as AA/SA in PTK derivation

When MLO is used, the MLD MAC addresses of the AP MLD and non-AP MLD are
used as the Authenticator and Supplicant addresses. Update PTK
derivation to use this information to work with MLO.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Learn MLD MAC address from EAPOL-Key msg 1/4 and 2/4
Jouni Malinen [Mon, 5 Sep 2022 18:08:24 +0000 (21:08 +0300)] 
wlantest: Learn MLD MAC address from EAPOL-Key msg 1/4 and 2/4

IEEE P802.11be indicates the MLD MAC addresses, i.e., the Authenticator
and Supplicant addresses, in the MAC Address KDE in EAPOL-Key msg 1/4
and 2/4. Learn those addresses so that wlantest can be extended to
support MLO.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoValidate MAC Address KDE length in the parser
Jouni Malinen [Mon, 5 Sep 2022 17:56:49 +0000 (20:56 +0300)] 
Validate MAC Address KDE length in the parser

Verify that the MAC Address KDE includes enough data to contain a MAC
address as a part of the parsing function so that each caller would not
need to verify this separately. None of the existing users of this
parser actually needed the MAC address value, so there was not any use
for the length field before. The updated design is more robust for
future uses and gets rid of that unused length field as well.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFix expiration logic for the first PTKSA cache entry
Vinay Gannevaram [Thu, 21 Jul 2022 14:47:26 +0000 (20:17 +0530)] 
Fix expiration logic for the first PTKSA cache entry

When an entry is added to the PTKSA cache, timer expiration is not set.
Check the list and set the timer expiration when the list is empty also.
When another entry is added to the list, it is placed before the relavant
entry in the order of expiry time of all entries present in the list.

Fixes: a4e36916168a ("WPA: Add PTKSA cache implementation")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Set secure ranging context to driver after association
Vinay Gannevaram [Thu, 7 Jul 2022 21:17:08 +0000 (02:47 +0530)] 
PASN: Set secure ranging context to driver after association

After the secure association and PTK derivation are completed, if the
device supports LTF keyseed, generate the LTF keyseed using KDK and set
the ranging context to the driver by using the command
QCA_NL80211_VENDOR_SUBCMD_SECURE_RANGING_CONTEXT.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Configure secure ranging context to the driver in AP mode
Vinay Gannevaram [Thu, 7 Jul 2022 20:14:54 +0000 (01:44 +0530)] 
PASN: Configure secure ranging context to the driver in AP mode

AP as a responder, on successful completion of PASN authentication
configures the required keys by using the command
QCA_NL80211_VENDOR_SUBCMD_SECURE_RANGING_CONTEXT to the driver.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Define vendor interface functions to offload PASN authentication
Vinay Gannevaram [Tue, 26 Jul 2022 10:56:25 +0000 (16:26 +0530)] 
nl80211: Define vendor interface functions to offload PASN authentication

This defines the QCA vendor interface functions to offload PASN
authentication from the driver.

The driver sends the QCA_NL80211_VENDOR_SUBCMD_PASN event requesting to
perform PASN authentication with a list of peers with which the driver
needs to do ranging. wpa_supplicant performs PASN handshake with all the
peer devices and sets the required keys using the command
QCA_NL80211_VENDOR_SUBCMD_SECURE_RANGING_CONTEXT to the driver. After
PASN handshake is completed with all requested peers, wpa_supplicant
sends consolidated status for all peers to the driver.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Set keys from PTKSA cache for a valid PTKSA entry
Vinay Gannevaram [Tue, 26 Jul 2022 08:26:03 +0000 (13:56 +0530)] 
PASN: Set keys from PTKSA cache for a valid PTKSA entry

Set secure ranging context to the driver for a valid PTKSA entry in the
PTKSA cache, if available. When the driver requests for PASN keys,
wpa_supplicant configures the keys from its cache if the keys for the
peer derived with the same own MAC address are available in the cache
instead of doing the full PASN handshake again.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Register PASN Authentication frames for SME-in-driver
Vinay Gannevaram [Tue, 26 Jul 2022 08:06:05 +0000 (13:36 +0530)] 
nl80211: Register PASN Authentication frames for SME-in-driver

This is needed to allow PASN processing offload from the driver to
wpa_supplicant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Allow PASN Authentication frames with random (foreign) MAC address
Vinay Gannevaram [Tue, 26 Jul 2022 08:06:05 +0000 (13:36 +0530)] 
nl80211: Allow PASN Authentication frames with random (foreign) MAC address

To support secure ranging with a random MAC address, PASN handshake is
performed with a different source MAC address from the device's own
interface address. Hence, allow PASN Authentication frames with any
foreign MAC address to further process the Authentication frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Deauthenticate on PTKSA cache entry expiration
Vinay Gannevaram [Fri, 8 Jul 2022 06:11:01 +0000 (11:41 +0530)] 
PASN: Deauthenticate on PTKSA cache entry expiration

Add an option for an alternative processing of PTKSA life time expiry.

Register a callback in wpa_supplicant to handle the life time expiry of
the keys in PTKSA cache. Send PASN deauthentication when a PTKSA cache
entry expires.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Offload handshake for multiple peers from the driver
Vinay Gannevaram [Tue, 26 Jul 2022 07:50:48 +0000 (13:20 +0530)] 
PASN: Offload handshake for multiple peers from the driver

This brings in the functionality to hold multiple peers and perform PASN
authentication with each peer at a time and send the PASN response to
the driver. PASN parameters such as AKMP and cipher suite are obtained
from the BSS information of the cached scan results. Also add
functionality to trigger deauthentication to the peer for which PASN
request with action PASN_ACTION_DELETE_SECURE_RANGING_CONTEXT is
received.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Add driver operation to set secure ranging context and PASN response
Vinay Gannevaram [Tue, 26 Jul 2022 07:09:17 +0000 (12:39 +0530)] 
PASN: Add driver operation to set secure ranging context and PASN response

This is used to set secure ranging context and send PASN response to the
driver.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Add interface to handle PASN request from the driver
Vinay Gannevaram [Tue, 26 Jul 2022 06:46:45 +0000 (12:16 +0530)] 
PASN: Add interface to handle PASN request from the driver

This brings in the function declarations and data structures that are
required for handling PASN request from the driver, sending secure
ranging context and PASN response to the driver.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Add function to compute LTF keyseed from KDK
Vinay Gannevaram [Tue, 26 Jul 2022 06:16:26 +0000 (11:46 +0530)] 
PASN: Add function to compute LTF keyseed from KDK

Add a function to derive the LTF keyseed from KDK. This function is
built only in case that CONFIG_PASN is enabled at build time.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd own MAC address in PASN supplicant start and deauthentication
Vinay Gannevaram [Sun, 20 Mar 2022 09:59:49 +0000 (15:29 +0530)] 
Add own MAC address in PASN supplicant start and deauthentication

The driver requests PASN authentication for a peer with a specified
source (own) MAC address. Use the specified own MAC address for PASN
operations. This is needed to allow random MAC addresses to be used.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd own MAC address used for key derivation to PTKSA cache
Vinay Gannevaram [Sun, 20 Mar 2022 09:26:00 +0000 (14:56 +0530)] 
Add own MAC address used for key derivation to PTKSA cache

On successful PASN handshake or 4-way handshake with a peer, PTK is
derived using the local and peer MAC addresses as input. Store the own
MAC address that is used for key derivation in PTKSA cache to maintain
that state over potential MAC addresses changes.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoStore secure ranging driver capabilities in WPA state machine
Vinay Gannevaram [Sun, 20 Mar 2022 13:56:02 +0000 (19:26 +0530)] 
Store secure ranging driver capabilities in WPA state machine

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoUse separate PASN capabilities for AP and STA modes
Vinay Gannevaram [Sun, 20 Mar 2022 13:56:02 +0000 (19:26 +0530)] 
Use separate PASN capabilities for AP and STA modes

Use separate capabilities for AP and STA modes for P802.11az security
parameters secure LTF support, secure RTT measurement exchange support,
and protection of range negotiation and measurement management frames
support.

P802.11az security parameters are considered to be supported for both
station and AP modes if the driver sets NL80211_EXT_FEATURE_SECURE_LTF,
NL80211_EXT_FEATURE_SECURE_RTT, and
NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE flags. The driver can
advertize capabilities specific to each mode using
QCA_WLAN_VENDOR_FEATURE_SECURE_LTF*,
QCA_WLAN_VENDOR_FEATURE_SECURE_RTT*, and
QCA_WLAN_VENDOR_FEATURE_PROT_RANGE_NEGO_AND_MEASURE* flags.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoEAPOL: Update PMK length in EAPOL callback to support longer keys
Vinayak Yadawad [Thu, 30 Jun 2022 04:08:14 +0000 (09:38 +0530)] 
EAPOL: Update PMK length in EAPOL callback to support longer keys

With introduction of newer AKMs, there is a need to update the PMK
length plumbed for the driver based 4-way handshake. To support this,
the current update the PMK length to 48, if the key management type uses
SHA-384. This is needed, e.g., for SUITE-B-192.

Signed-off-by: Vinayak Yadawad <vinayak.yadawad@broadcom.com>
2 years agoOpenSSL: Include rsa.h for all OpenSSL versions
Andre Heider [Wed, 22 Jun 2022 12:13:55 +0000 (14:13 +0200)] 
OpenSSL: Include rsa.h for all OpenSSL versions

This fixes the build with OpenSSL 1.1.1:
../src/crypto/crypto_openssl.c: In function 'crypto_rsa_oaep_sha256_decrypt':
../src/crypto/crypto_openssl.c:4404:49: error: 'RSA_PKCS1_OAEP_PADDING' undeclared (first use in this function)

Signed-off-by: Andre Heider <a.heider@gmail.com>
2 years agoP2P: Fix a typo in a comment about removing 6 GHz channels
Jouni Malinen [Wed, 31 Aug 2022 14:14:32 +0000 (17:14 +0300)] 
P2P: Fix a typo in a comment about removing 6 GHz channels

This was supposed to be talking about excluding 6 GHz channels, not 5
GHz.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoP2P: Skip 6 GHz band directly if 6 GHz P2P is disabled
Hector Jiang [Thu, 28 Apr 2022 10:56:33 +0000 (18:56 +0800)] 
P2P: Skip 6 GHz band directly if 6 GHz P2P is disabled

If 6 GHz is supported by the device but 6 GHz P2P is disabled, P2P
invitation would fail if the GO select an operating channel which is not
the preferred channel. The root cause is that the 5 GHz and 6 GHz bands
are both HOSTAPD_MODE_IEEE80211A so the 5 GHz channels would be added
twice for the P2P Client's following scanning frequency list. This will
cause scanning to fail with -EINVAL. Fix this by adding the 5 GHz
channels only once.

Signed-off-by: Hector Jiang <jianghaitao@zeku.com>
2 years agoFix wrong AKM priority for FILS
Seongsu Choi [Tue, 30 Aug 2022 04:21:16 +0000 (13:21 +0900)] 
Fix wrong AKM priority for FILS

According to the OCE specification, the STA shall select the AKM in
priority order from the list below.

1. FT Authentication over FILS (SHA-384) 00-0F-AC:17
2. FILS (SHA-384) 00-0F-AC:15
3. FT Authentication over FILS (SHA-256) 00-0F-AC:16
4. FILS (SHA-256) 00-0F-AC:14
5. FT Authentication using IEEE Std 802.1X (SHA-256) 00-0F-AC:3
6. Authentication using IEEE Std 802.1X (SHA-256) 00-0F-AC:5
7. Authentication using IEEE Std 802.1X 00-0F-AC:1

Move the FT-FILS-SHA256 check to be after the FILS-SHA384 one to match
this.

Signed-off-by: Seongsu Choi <seongsu.choi@samsung.com>
2 years agowlantest: Extend Management frame decryption to support GCMP and CCMP-256
Jouni Malinen [Mon, 29 Aug 2022 18:46:09 +0000 (21:46 +0300)] 
wlantest: Extend Management frame decryption to support GCMP and CCMP-256

Data frame processing had already been extended to support additional
cipher suites, but Robust Management frame processing was still using a
hardcoded cipher suite (CCMP-128). Extend it to support GCMP-128,
GCMP-256, and CCMP-256 as well.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowlantest: Extend protected Data frame checks for GCMP and CCMP-256
Jouni Malinen [Mon, 29 Aug 2022 18:31:52 +0000 (21:31 +0300)] 
wlantest: Extend protected Data frame checks for GCMP and CCMP-256

The same rules that apply to CCMP-128 apply also for GCMP-128, CCMP-256,
and GCMP-256 here.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: DPP push button and unsupported AP configuration
Jouni Malinen [Fri, 26 Aug 2022 21:51:25 +0000 (00:51 +0300)] 
tests: DPP push button and unsupported AP configuration

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoDPP3: Do not initiate PKEX for PB if no configuration is available
Jouni Malinen [Fri, 26 Aug 2022 21:50:05 +0000 (00:50 +0300)] 
DPP3: Do not initiate PKEX for PB if no configuration is available

Reorder PKEX initiation function to send out the PKEX Exchange Request
frame at the end after all possible error cases have been checked. This
prevents Enrollee from seeing a PKEX frame when the session is about to
fail.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd QCA vendor interface to get SAR capabilities to userspace
mukul sharma [Fri, 19 Aug 2022 18:24:47 +0000 (23:54 +0530)] 
Add QCA vendor interface to get SAR capabilities to userspace

Add QCA_NL80211_VENDOR_SUBCMD_GET_SAR_CAPABILITY to get various SAR
capabilities supported by the WLAN firmware to userspace. These
capabilites are usually reported by the firmware during the initial
bootup handshake with the driver. Based on these capabilities, user
space can choose proper SAR indexes.

Signed-off-by: Mukul Sharma <quic_mukul@quicinc.com>
2 years agoAdd support to send multi AKM connect request when driver's SME in use
Veerendranath Jakkam [Sun, 20 Feb 2022 01:51:56 +0000 (07:21 +0530)] 
Add support to send multi AKM connect request when driver's SME in use

Add support to configure SAE, PSK, and PSK-SHA256 AKMs in connect
request when driver's SME in use. This is needed for implementing
WPA3-Personal transition mode correctly with any driver that handles
roaming internally.

Send additional AKMs configured in network block to driver based on
the maximum number of AKMs allowed by driver in connect request. Keep
first AKM in the list AKMs in the connect request as AKM selected by
wpa_supplicant to maintain backwards compatibility.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agonl80211: Determine maximum number of supported AKMs
Veerendranath Jakkam [Sun, 20 Feb 2022 01:51:56 +0000 (07:21 +0530)] 
nl80211: Determine maximum number of supported AKMs

Use the recently added attribute to determine whether the kernel
supports a larger number of AKM suites in various commands.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoUpdate PSK after cross AKM roaming to WPA-PSK when driver's SME in use
Veerendranath Jakkam [Sun, 20 Feb 2022 03:29:13 +0000 (08:59 +0530)] 
Update PSK after cross AKM roaming to WPA-PSK when driver's SME in use

4-way handshake was failing after the driver roam from SAE to WPA-PSK
due to wpa_sm having an old PMK which was generated during previous SAE
connection.

To fix this update PSK to wpa_sm when AKM changes from SAE to WPA-PSK
for the target AP to have a correct PMK for 4-way handshake. Also,
update PSK to the driver when key management offload is enabled.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoSync with wireless-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Sat, 30 Jul 2022 08:12:00 +0000 (11:12 +0300)] 
Sync with wireless-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2022-07-22. In addition, update
nl80211_command_to_string() to cover the new defined commands.

Signed-off-by: Jouni Malinen <j@w1.fi>
2 years agoDPP: Fix DPP_RELAY_ADD_CONTROLLER command parsing
Jouni Malinen [Thu, 25 Aug 2022 21:25:17 +0000 (00:25 +0300)] 
DPP: Fix DPP_RELAY_ADD_CONTROLLER command parsing

hostapd_dpp_add_controller() ended up trying to parse the IP address
without nul terminating it. This might work with some C libraries, but
not all. And anyway, this was already supposed to nul terminate the
string since a temporary copy is created of the constant string. Fix
this by adding the missed replacement of the space with nul.

Fixes: bfe3cfc382d6 ("DPP: Allow Relay connections to Controllers to be added and removed")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Skip sigma_dut_dpp_tcp_configurator_init_mutual_unsupported_curve if needed
Jouni Malinen [Thu, 25 Aug 2022 17:19:15 +0000 (20:19 +0300)] 
tests: Skip sigma_dut_dpp_tcp_configurator_init_mutual_unsupported_curve if needed

The part about checking the supported curves from the peer depends on
CONFIG_DPP3 and this test case needs to be skipped without that.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Silence a compiler warning on printf in 32-bit builds
Jouni Malinen [Thu, 25 Aug 2022 15:52:46 +0000 (18:52 +0300)] 
nl80211: Silence a compiler warning on printf in 32-bit builds

u64 needs "long long unsigned int" on 32-bit, so print this using a
typecase value so that both 32 and 64-bit builds work fine.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoDPP3: Use chirping channel list in PB discovery
Jouni Malinen [Thu, 25 Aug 2022 09:47:53 +0000 (12:47 +0300)] 
DPP3: Use chirping channel list in PB discovery

This design was changed in the draft specification, so update
implementation to match the new design. Instead of including all
supported 2.4 and 5 GHz channels, generate the channel list using the
same mechanism that was already used for chirping.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: DPP PB channel changes
Jouni Malinen [Thu, 25 Aug 2022 09:46:17 +0000 (12:46 +0300)] 
tests: DPP PB channel changes

Prepare for an implementation change for the PB discovery channel list.
Move the standlone (not an AP) PB Configurators to a preferred channel
and enable Configurator connectivity indication in APs that act as PB
Configurators.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoDPP: Channel list generation for presence announcement to helper funcion
Jouni Malinen [Thu, 25 Aug 2022 09:19:58 +0000 (12:19 +0300)] 
DPP: Channel list generation for presence announcement to helper funcion

This procedure will be used for PB discovery as well, so move the
frequency array generation into a helper function.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoOpenSSL: Fix HPKE in some corner cases
Jouni Malinen [Wed, 24 Aug 2022 20:28:20 +0000 (23:28 +0300)] 
OpenSSL: Fix HPKE in some corner cases

EVP_PKEY_derive() might report a larger maximum size of the output than
HPKE_MAX_SHARED_SECRET_LEN under some conditions. That should be allowed
as long as the real final length is within the maximum limit.
Furthermore, since we are using a fixed length buffer for this, there is
no need to call EVP_PKEY_derive() twice to first learn the maximum
length. Use a bit longer buffer and allow OpenSSL to take care of the
update to the final length internally with than single call.

This showed up using the following test case sequence:
dbus_pkcs11 dpp_private_peer_introduction

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>