]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
3 years agohostapd: Add the missing CONFIG_SAE option to the defconfig
Yegor Yefremov [Wed, 30 Mar 2022 08:11:16 +0000 (10:11 +0200)] 
hostapd: Add the missing CONFIG_SAE option to the defconfig

CONFIG_SAE was added to wpa_supplicant's defconfig but wasn't
added to the hostapd's defconfig file.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
3 years agoFix SIGSEGV of eapol_test
Masashi Honma [Fri, 1 Apr 2022 23:13:49 +0000 (08:13 +0900)] 
Fix SIGSEGV of eapol_test

Running eapol_test to FreeRADIUS 3.0.25 causes trailing SIGSEGV.

WPA_TRACE: eloop SIGSEGV - START
[1]: ./eapol_test(+0x67de6) [0x55b84fa4ade6]
     eloop_sigsegv_handler() ../src/utils/eloop.c:123
[2]: /lib/x86_64-linux-gnu/libc.so.6(+0x430c0) [0x7fec94ad20c0]
[3]: ./eapol_test(dpp_tcp_conn_status_requested+0x4) [0x55b84fa7e674]
     dpp_tcp_conn_status_requested() ../src/common/dpp_tcp.c:2246
[4]: ./eapol_test(wpas_dpp_connected+0x3c) [0x55b84fa816dc]
     wpas_dpp_connected() dpp_supplicant.c:437
[5]: ./eapol_test(wpa_supplicant_set_state+0x48d) [0x55b84fc12c9d]
     wpa_supplicant_set_state() wpa_supplicant.c:1067
[6]: ./eapol_test(eapol_sm_step+0x4b4) [0x55b84fb3b994]
     sm_SUPP_PAE_Step() ../src/eapol_supp/eapol_supp_sm.c:419
     eapol_sm_step() ../src/eapol_supp/eapol_supp_sm.c:989
[7]: ./eapol_test(eapol_sm_rx_eapol+0x190) [0x55b84fb3c060]
     eapol_sm_rx_eapol() ../src/eapol_supp/eapol_supp_sm.c:1293
[8]: ./eapol_test(+0x24760f) [0x55b84fc2a60f]
     ieee802_1x_decapsulate_radius() eapol_test.c:834
     ieee802_1x_receive_auth() eapol_test.c:945
[9]: ./eapol_test(+0x248d46) [0x55b84fc2bd46]
     radius_client_receive() ../src/radius/radius_client.c:937
[10]: ./eapol_test(+0x68323) [0x55b84fa4b323]
     eloop_sock_table_dispatch() ../src/utils/eloop.c:606
[11]: ./eapol_test(eloop_run+0x251) [0x55b84fa4be51]
     eloop_sock_table_dispatch() ../src/utils/eloop.c:597
     eloop_run() ../src/utils/eloop.c:1234
[12]: ./eapol_test(main+0x8cf) [0x55b84fa30d6f]
     main() eapol_test.c:1517
WPA_TRACE: eloop SIGSEGV - END
Aborted (core dumped)

Fixes: 33cb47cf0191 ("DPP: Fix connection result reporting when using TCP")
Reported-by: Alexander Clouter <alex+hostapd@coremem.com>
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
3 years agoieee802_11_auth: Coding style cleanup - NULL comparison
Jouni Malinen [Sat, 2 Apr 2022 13:29:31 +0000 (16:29 +0300)] 
ieee802_11_auth: Coding style cleanup - NULL comparison

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoieee802_11_auth: Coding style cleanup - no string constant splitting
Jouni Malinen [Sat, 2 Apr 2022 13:28:12 +0000 (16:28 +0300)] 
ieee802_11_auth: Coding style cleanup - no string constant splitting

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agotests: wpa_psk_radius=3
Jouni Malinen [Sat, 2 Apr 2022 10:12:34 +0000 (13:12 +0300)] 
tests: wpa_psk_radius=3

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoRADIUS ACL/PSK check during 4-way handshake
Jouni Malinen [Sat, 2 Apr 2022 10:12:43 +0000 (13:12 +0300)] 
RADIUS ACL/PSK check during 4-way handshake

Add an alternative sequence for performing the RADIUS ACL check and PSK
fetch. The previously used (macaddr_acl=2, wpa_psk_radius=2) combination
does this during IEEE 802.11 Authentication frame exchange while the new
option (wpa_psk_radius=3) does this during the 4-way handshake. This
allows some more information to be provided to the RADIUS authentication
server.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoFix AP config check to recognize all PSK AKMs
Jouni Malinen [Sat, 2 Apr 2022 10:16:18 +0000 (13:16 +0300)] 
Fix AP config check to recognize all PSK AKMs

The check for PSK/passphrase not being present was considering only the
WPA-PSK AKM, but the same check should be applied for all other AKMs
that can use a PSK.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoQCA vendor attribute to indicate NDP interface managemtn using nl80211
Kiran Kumar Lokere [Thu, 24 Mar 2022 23:57:22 +0000 (16:57 -0700)] 
QCA vendor attribute to indicate NDP interface managemtn using nl80211

Add a QCA_WLAN_VENDOR_FEATURE_USE_ADD_DEL_VIRTUAL_INTF_FOR_NDI
flag to indicate that the driver requires add/del virtual interface
path using the generic nl80211 commands for NDP interface create/delete
and to register/unregister of netdev instead of creating/deleting
the NDP interface using vendor commands.

With the latest Linux kernel (5.12 version onward), interface
creation/deletion is not allowed using vendor commands as it leads to a
deadlock while acquiring the RTNL_LOCK during the register/unregister of
netdev. Create and delete NDP interface using NL80211_CMD_NEW_INTERFACE
and NL80211_CMD_DEL_INTERFACE commands respectively if the driver
advertises this capability.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoFT: Update current_bss to target AP before check for SME-in-driver
Xin Deng [Thu, 10 Feb 2022 08:29:19 +0000 (16:29 +0800)] 
FT: Update current_bss to target AP before check for SME-in-driver

STA needs to check AP's information after receive reassociation
response. STA uses connected AP's Beacon/Probe Response frame to compare
with Reassociation Response frame of the target AP currently. However,
if one AP supports OCV and the other AP doesn't support OCV, STA will
fail to verify RSN capability, then disconnect. Update current_bss to
the target AP before check, so that STA can compare correct AP's RSN
information in Reassociation Response frame.

Signed-off-by: Xin Deng <quic_deng@quicinc.com>
3 years agoDebug print on CONFIG_NO_TKIP=y prevent RSNE with TKIP as group cipher
Jouni Malinen [Fri, 1 Apr 2022 08:12:09 +0000 (11:12 +0300)] 
Debug print on CONFIG_NO_TKIP=y prevent RSNE with TKIP as group cipher

This makes the debug log clearer for one of the more likely cases of
"invalid group cipher" preventing RSNE parsing.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoP2P: Copy only valid opclasses while filtering out 6 GHz channels
Sreeramya Soratkal [Fri, 11 Feb 2022 13:44:04 +0000 (19:14 +0530)] 
P2P: Copy only valid opclasses while filtering out 6 GHz channels

Copy channels from only valid operating classes in the source channel
list while preparing a non-6 GHz channel/op-classes list when the 6 GHz
band is not used for P2P GO negotiation.

Earlier, during preparation of P2P channels for GO negotiation, a union
of the GO channels and the P2P Client channels is used. While generating
the union in p2p_channels_union_inplace() as the first list itself has
P2P_MAX_REG_CLASSES number of entries, the operating classes from the
second list which are not in the first list were not getting considered.

Fix this by not setting the dst->reg_classes to too large a value.

Fixes: f7d4f1cbec34 ("P2P: Add a mechanism for allowing 6 GHz channels in channel lists")
Signed-off-by: Sreeramya Soratkal <quic_ssramya@quicinc.com>
3 years agoSync with wireless-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Mon, 28 Mar 2022 14:18:08 +0000 (17:18 +0300)] 
Sync with wireless-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2022-03-11.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agotests: wpa_supplicant AP mode - ACL management
Jouni Malinen [Thu, 24 Mar 2022 21:22:42 +0000 (23:22 +0200)] 
tests: wpa_supplicant AP mode - ACL management

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agowpa_cli: Add ACL and BTM control commands
Chaoli Zhou [Thu, 24 Feb 2022 08:27:58 +0000 (16:27 +0800)] 
wpa_cli: Add ACL and BTM control commands

Add AP mode commands for ACL and BTM into wpa_cli similarly to the way
these were already available in hostapd_cli.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoExtend ACL to install allow/deny list to the driver dynamically
Chaoli Zhou [Thu, 24 Mar 2022 07:19:25 +0000 (15:19 +0800)] 
Extend ACL to install allow/deny list to the driver dynamically

Support installing the updated allow/deny list to the driver if it
supports ACL offload. Previously, only the not-offloaded cases were
updated dynamically.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoSet drv_max_acl_mac_addrs in wpa_supplicant AP mode
Chaoli Zhou [Thu, 24 Mar 2022 07:19:25 +0000 (15:19 +0800)] 
Set drv_max_acl_mac_addrs in wpa_supplicant AP mode

hostapd code will need this for offloading ACL to the driver.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoSupport ACL operations in wpa_supplicant AP mode
Chaoli Zhou [Thu, 24 Mar 2022 06:34:18 +0000 (14:34 +0800)] 
Support ACL operations in wpa_supplicant AP mode

Extend AP mode ACL control interface commands to work from
wpa_supplicant in addition to the previously supported hostapd case.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoAdd return value to ACL functions
Chaoli Zhou [Thu, 24 Mar 2022 07:19:25 +0000 (15:19 +0800)] 
Add return value to ACL functions

While these do not return error code within the current hostapd
implementation, matching functions in wpa_supplicant AP functionality
will have an error case and using consistent return type will make the
control interface code more consistent.

In addition, export hostapd_set_acl() in preparation for the
wpa_supplicant control interface implementation extension.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoMove ACL control interface commands into shared files
Chaoli Zhou [Thu, 24 Mar 2022 05:48:57 +0000 (13:48 +0800)] 
Move ACL control interface commands into shared files

This is a step towards allowing these commands to be used from
wpa_supplicant.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoAdd BSS-TM-QUERY event to indicate reception of BSS TM Query
Chaoli Zhou [Tue, 22 Mar 2022 20:47:12 +0000 (22:47 +0200)] 
Add BSS-TM-QUERY event to indicate reception of BSS TM Query

This allows upper layers to learn about associated stations requesting
BSS transition management from the AP.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoSupport BTM operations in wpa_supplicant AP mode
Chaoli Zhou [Tue, 22 Mar 2022 20:47:12 +0000 (22:47 +0200)] 
Support BTM operations in wpa_supplicant AP mode

Extend AP mode BTM control interface commands to work from
wpa_supplicant in additiona to the previously support hostapd case.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoMove BTM control interface commands into shared file
Chaoli Zhou [Tue, 22 Mar 2022 20:47:12 +0000 (22:47 +0200)] 
Move BTM control interface commands into shared file

This is a step towards allowing these commands to be used from
wpa_supplicant.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoUpdate the Extended Capability element to struct sta_info
Chaoli Zhou [Tue, 22 Mar 2022 09:53:21 +0000 (11:53 +0200)] 
Update the Extended Capability element to struct sta_info

Only the SME-in-hostapd case updated sta->ext_capability while the
SME-in-the-driver case updated sta->qos_map_enabled, but not other items
related to the extended capabilities. This resulted in reduced
information being available through the control interface.

Use the shared helper function for both cases to get matching
information available regardless of the SME architecture.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoEnable BSS Transition Management in wpa_supplicant AP mode
Chaoli Zhou [Mon, 21 Mar 2022 05:38:45 +0000 (13:38 +0800)] 
Enable BSS Transition Management in wpa_supplicant AP mode

Enable BTM capability for AP mode only and do not affect P2P GO mode.
This can be used for AP band steering when using wpa_supplicant to
control AP mode operations.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
3 years agoDPP: Update Controller parameters when it was already started
Jouni Malinen [Tue, 15 Mar 2022 19:10:31 +0000 (21:10 +0200)] 
DPP: Update Controller parameters when it was already started

dpp_configurator_params changes were taken into use in the
non-TCP/Controller case immediately on change, but that was not the case
for the Controller where this was updated only when explicitly starting
it. Change this to update dpp_configurator_params for the Controller as
well even if it is already running.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Fix msg_ctx for PKEX over TCP as Controller/Responder
Jouni Malinen [Tue, 15 Mar 2022 08:39:09 +0000 (10:39 +0200)] 
DPP: Fix msg_ctx for PKEX over TCP as Controller/Responder

PKEX Exchange Request handling in Controller used incorrect msg_ctx
pointer and that could result in event messages causing unexpected
behavior. Fix this by registering the correct msg_ctx pointer for these
cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agohs20-osu-client: dNSName values from OSU server certificate for PPS MO
Jouni Malinen [Mon, 14 Mar 2022 08:42:11 +0000 (10:42 +0200)] 
hs20-osu-client: dNSName values from OSU server certificate for PPS MO

The previous change to allow EST server to use a different host name
ended up overriding the OSU server certificate information and the
incorrect server certificate was used when comparing the SP FQDN from
the PPS MO if the OSU and EST servers where different. Fix this by
keeping the dNSName from the SPP interaction and not storing the values
from the EST interaction.

Fixes: 0ce8d55a2e1b ("hs20-osu-client: Allow EST server to use different host name")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDFS: Remove unnecessary variable
Jouni Malinen [Sun, 13 Mar 2022 19:23:54 +0000 (21:23 +0200)] 
DFS: Remove unnecessary variable

This was not used for anything else than checking the value returned by
the called function.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoDFS: Switch to background radar channel if available
Lorenzo Bianconi [Sun, 6 Mar 2022 19:34:14 +0000 (20:34 +0100)] 
DFS: Switch to background radar channel if available

On radar detection on the main chain switch to the channel monitored
by the background chain if we have already performed the CAC there.
If a radar pattern is reported on the background chain, just select a
new random channel according to the regulations for monitoring.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agoDFS: Enable CSA for background radar detection
Lorenzo Bianconi [Sun, 6 Mar 2022 19:34:13 +0000 (20:34 +0100)] 
DFS: Enable CSA for background radar detection

Rely on hostapd_dfs_request_channel_switch() to enable CSA for
background radar detection switching back to the selected channel.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agoDFS: Introduce hostapd_dfs_request_channel_switch()
Lorenzo Bianconi [Sun, 6 Mar 2022 19:34:12 +0000 (20:34 +0100)] 
DFS: Introduce hostapd_dfs_request_channel_switch()

This is a preliminary patch to add Channel Switch Announcement for
background radar detection.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agoDFS: Configure background radar/CAC detection
Lorenzo Bianconi [Sun, 6 Mar 2022 19:34:11 +0000 (20:34 +0100)] 
DFS: Configure background radar/CAC detection

Introduce the capability to perform radar/CAC detection on an offchannel
radar chain available on some hardware (e.g., mt7915). This feature
allows to avoid CAC downtime switching on a different channel during CAC
detection on the selected radar channel.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agonl80211: Radar background flag setting
Lorenzo Bianconi [Sun, 6 Mar 2022 19:34:11 +0000 (20:34 +0100)] 
nl80211: Radar background flag setting

Allow background radar detection flag to be set when specifying a
channel. This is a preliminary change to introduce radar/CAC background
detection support.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agoDFS: Rely on channel_type in dfs_downgrade_bandwidth()
Lorenzo Bianconi [Sun, 6 Mar 2022 19:34:10 +0000 (20:34 +0100)] 
DFS: Rely on channel_type in dfs_downgrade_bandwidth()

Add the capability to specify all 3 channel type possibilities in
dfs_downgrade_bandwidth(). This is a preliminary change to introduce
radar/CAC background detection support.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agotests: Clear country configuration at the end of wpas_ap_async_fail
Jouni Malinen [Sun, 13 Mar 2022 16:26:08 +0000 (18:26 +0200)] 
tests: Clear country configuration at the end of wpas_ap_async_fail

This was causing a failure in the following sequence:
wpas_ap_async_fail wpas_ctrl_country

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agotests: Make DPP relay tests more robust
Jouni Malinen [Sun, 13 Mar 2022 16:18:28 +0000 (18:18 +0200)] 
tests: Make DPP relay tests more robust

Flush scan results to avoid failure caused by incorrect channel
selection based on an old result for the same BSSID. This was found with
the following test sequence:
ap_track_sta_no_auth dpp_network_intro_version_missing_req dpp_controller_relay_pkex

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoOpenSSL 3.0: Set SSL groups using SSL_set1_groups()
Jouni Malinen [Sun, 13 Mar 2022 09:25:04 +0000 (11:25 +0200)] 
OpenSSL 3.0: Set SSL groups using SSL_set1_groups()

The mechanism using SSL_set_tmp_ecdh() has been obsoleted and
SSL_set1_groups() takes care of it instead.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoOpenSSL: Determine RSA key size without low-level routines
Jouni Malinen [Sun, 13 Mar 2022 09:21:00 +0000 (11:21 +0200)] 
OpenSSL: Determine RSA key size without low-level routines

RSA low-level routines were deprecated in OpenSSL 3.0.
EVP_PKEY_get_bits(), or its older and more backwards compatible name
EVP_PKEY_bits() can be used here instead.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoOpenSSL 3.0: Determine the prime length for an EC key group using EVP_PKEY
Jouni Malinen [Sun, 13 Mar 2022 08:40:06 +0000 (10:40 +0200)] 
OpenSSL 3.0: Determine the prime length for an EC key group using EVP_PKEY

EVP_PKEY_get0_EC_KEY() and EC_KEY_get0_group() were deprecated in
OpenSSL 3.0. Add a version of this by determining the group without
fetching the EC_KEY itself from an EVP_PKEY.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoOpenSSL: Replace EC_GROUP_get_curve_GFp() calls with EC_GROUP_get_curve()
Jouni Malinen [Sat, 12 Mar 2022 20:35:32 +0000 (22:35 +0200)] 
OpenSSL: Replace EC_GROUP_get_curve_GFp() calls with EC_GROUP_get_curve()

EC_GROUP_get_curve_GFp() was deprecated in OpenSSL 3.0.
EC_GROUP_get_curve() can be used to do the exact same thing. Add a
backwards compatibility wrapper for older OpenSSL versions to be able to
use this newer function.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoOpenSSL 3.0: Implement crypto_ec_key_group() with new API
Jouni Malinen [Sat, 12 Mar 2022 20:27:16 +0000 (22:27 +0200)] 
OpenSSL 3.0: Implement crypto_ec_key_group() with new API

Get rid of the now deprecated EVP_PKEY_get0_EC_KEY() and
EC_KEY_get0_group() calls.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agotests: Fix sigma_dut_cmd() processing for the return value
Jouni Malinen [Sat, 12 Mar 2022 17:00:36 +0000 (19:00 +0200)] 
tests: Fix sigma_dut_cmd() processing for the return value

The first sock.recv() may return both the status,RUNNING and the
following status line if the sigma_dut process ends up being faster in
writing the result than the test script is in reading the result. This
resulted in unexpected behavior and odd error messages when parsing the
result in the test cases. Fix this by dropping the status,RUNNING line
from the result in case the buffer includes multiple lines.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoOpenSSL: Replace EVP_PKEY_cmp() with EVP_PKEY_eq() when available
Jouni Malinen [Sat, 12 Mar 2022 08:54:48 +0000 (10:54 +0200)] 
OpenSSL: Replace EVP_PKEY_cmp() with EVP_PKEY_eq() when available

OpenSSL 3.0 deprecated EVP_PKEY_cmp() and replaced it with EVP_PKEY_eq()
which is not available in older versions.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years agoD-Bus: Add 'wep_disabled' capability
Lubomir Rintel [Mon, 7 Mar 2022 08:54:46 +0000 (09:54 +0100)] 
D-Bus: Add 'wep_disabled' capability

Since commit 200c7693c9a1 ('Make WEP functionality an optional build
parameter'), WEP support is optional and, indeed, off by default.

The distributions are now catching up and disabling WEP in their builds.
Unfortunately, there's no indication prior to an attempt to connect to a
WEP network that it's not going to work. Add a capability to communicate
that.

Unlike other capabilities, this one is negative. That is, it indicates
lack of a WEP support as opposed to its presence. This is necessary
because historically there has been no capability to indicate presence
of WEP support and therefore NetworkManager (and probably others) just
assumes it's there.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Davide Caratti <davide.caratti@gmail.com>
3 years agoDFS: Don't let cac_time_left_seconds overflow
Nicolas Escande [Tue, 8 Mar 2022 10:22:18 +0000 (11:22 +0100)] 
DFS: Don't let cac_time_left_seconds overflow

There can be some discrepancy between the theorical dfs cac end (as
computed with the cac duration and cac start) and the actual cac end as
reported by the driver. During that window, the value of remaining time
outputed by the status command on the socket control interface will
display an overflowed, invalid value.
To mitigate this lets compute the remaining time as signed and display
it only when positive, otherwise defaulting it to 0.

Status command shows something like that when polling every seconds:

state=DFS
cac_time_seconds=60
cac_time_left_seconds=1
...
state=DFS
cac_time_seconds=60
cac_time_left_seconds=0
...
state=DFS
cac_time_seconds=60
cac_time_left_seconds=4294967294
...
state=DFS
cac_time_seconds=60
cac_time_left_seconds=4294967293
...
state=DFS
cac_time_seconds=60
cac_time_left_seconds=4294967292
...
state=ENABLED
cac_time_seconds=60
cac_time_left_seconds=N/A

Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
3 years agoDPP: Fix uninitialised variable on error path
Alasdair Mackintosh [Wed, 9 Mar 2022 21:24:49 +0000 (13:24 -0800)] 
DPP: Fix uninitialised variable on error path

The current code generates a warning when compiled by Clang, because if
we goto 'fail:', password_len can be uninitialised when we pass it in to
bin_clear_free().

Note that the actual usage is safe, because bin_clear_free() ignores
the second argument if the first argument is NULL, but it still seems
worth cleaning up.

Signed-off-by: Alasdair Mackintosh <alasdair at google.com>
3 years agodbus: Set CurrentAuthMode to INACTIVE only if network is not selected
ArisAachen [Fri, 11 Mar 2022 07:02:58 +0000 (15:02 +0800)] 
dbus: Set CurrentAuthMode to INACTIVE only if network is not selected

CurrentAuthMode should be set as a real auth type when authentication is
in progress. wpa_supplicant has a property "State" which indicates the
authentication stage already. I think setting auth mode as "INACTIVE" in
all auth progress stages is not a good idea, because sometimes we need
to handle this connection according to the auth type even when
authentication is not complete. For example, NetworkManager may recall
ask-password-dialog when auth mode is "wpa-psk" and "sae", try next
access point when auth mode is "EAP-xx" when password is incorrect.
Since "CurrentAuthMode" is set as "INACTIVE" in all not fully completed
situations, we do not know how to handle it.

Signed-off-by: Aris Aachen <chenyunxiong@unionitech.com>
Signed-off-by: ArisAachen <chenyunxiong@uniontech.com>
3 years agohs20-osu-client: Allow EST server to use different host name
Jouni Malinen [Fri, 11 Mar 2022 17:47:30 +0000 (19:47 +0200)] 
hs20-osu-client: Allow EST server to use different host name

The EST server does not have to be sharing the same host name with the
OSU server. Use the host name from the EST URL instead of the SPP server
URL when validating the EST server certificate.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoHTTP: Make URL available to the cert_cb
Jouni Malinen [Fri, 11 Mar 2022 17:46:23 +0000 (19:46 +0200)] 
HTTP: Make URL available to the cert_cb

This makes it easier for non-SOAP cases to validate HTTP server name
(from the URL) match against the certificate.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoHS 2.0 server: Event log entry on missing configuration for the realm
Jouni Malinen [Fri, 11 Mar 2022 17:44:58 +0000 (19:44 +0200)] 
HS 2.0 server: Event log entry on missing configuration for the realm

Make the error reason clearer in the event log for the case where the
requested realm has not been configured.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoAndroid: Compile hs20-osu-client to /vendor/bin in test builds
Purushottam Kushwaha [Fri, 18 Jan 2019 12:48:33 +0000 (18:18 +0530)] 
Android: Compile hs20-osu-client to /vendor/bin in test builds

hs20-osu-client compilation fails on Android O onwards because of
undefined reference for __android_log_print/__android_log_vprint.

Modify hs20-osu-client's Android.mk to include liblog library and use
tag 'hs20-osu-client' in logcat logs. Additionally, compile
hs20-osu-client to /vendor/bin in non-production builds.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoEnhance QCA vendor interface to indicate TWT required capability of AP
Sumit Agre [Tue, 8 Mar 2022 05:05:37 +0000 (10:35 +0530)] 
Enhance QCA vendor interface to indicate TWT required capability of AP

Add QCA_WLAN_TWT_NOTIFY command type to send event to userspace when AP
changes TWT required bit field in its capabilities.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoAdd QCA vendor attributes for AFC support in external ACS
Jhalak Naik [Mon, 28 Feb 2022 08:06:36 +0000 (13:36 +0530)] 
Add QCA vendor attributes for AFC support in external ACS

Add support for new QCA nested attributes to pass the AFC channel
information as part of the external ACS request command,
EXTERNAL_ACS_EVENT_CHAN_INFO.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: sigma_dut DPP Configurator (MUD URL, NAK change)
Jouni Malinen [Thu, 10 Mar 2022 16:29:34 +0000 (18:29 +0200)] 
tests: sigma_dut DPP Configurator (MUD URL, NAK change)

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: DPP PKEX with netAccessKey curve change
Jouni Malinen [Wed, 9 Mar 2022 21:10:02 +0000 (23:10 +0200)] 
tests: DPP PKEX with netAccessKey curve change

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Fix dpp_own_config_curve_mismatch to match implementation
Jouni Malinen [Wed, 9 Mar 2022 23:28:51 +0000 (01:28 +0200)] 
tests: Fix dpp_own_config_curve_mismatch to match implementation

This test case was assuming the Configurator would change the
netAccessKey curve every time based on the protocol keys, but that is
not the case anymore, so force that change here for a negative test.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Fix dpp_intro_mismatch to match implementation
Jouni Malinen [Wed, 9 Mar 2022 23:16:29 +0000 (01:16 +0200)] 
tests: Fix dpp_intro_mismatch to match implementation

This test case was assuming the Configurator would change the
netAccessKey curve every time based on the protocol keys, but that is
not the case anymore, so force that change here for a negative test.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Allow Configurator net_access_key_curve to be changed
Jouni Malinen [Wed, 9 Mar 2022 22:55:05 +0000 (00:55 +0200)] 
DPP: Allow Configurator net_access_key_curve to be changed

This is mainly for testing purposes to allow a Configurator to the curve
between provisioning cases. This would not work for real deployement
cases unless every Enrollee were reconfigured.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Update Configurator to require same netAccessKey curve to be used
Jouni Malinen [Wed, 9 Mar 2022 21:08:06 +0000 (23:08 +0200)] 
DPP: Update Configurator to require same netAccessKey curve to be used

DPP network introduction requires all devices to use the same curve for
netAccessKey. Enforce that this happens based on hardcoding the curve
based on the first successful configuration object generation if no
explicit configuration of the curve was used.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Check DPP3 support in the build for netAccessKey curve changes
Jouni Malinen [Wed, 9 Mar 2022 19:26:28 +0000 (21:26 +0200)] 
tests: Check DPP3 support in the build for netAccessKey curve changes

These test cases need to be skipped if CONFIG_DPP3=y is not defined in
the build.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Update Auth-I derivation operations
Jouni Malinen [Wed, 9 Mar 2022 18:49:17 +0000 (20:49 +0200)] 
DPP: Update Auth-I derivation operations

This is not properly defined in the technical specification and will
need to be clarified there. Change the implementation to use a design
that is more likely to be used in the cleaned up tech spec.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: sigma_dut and DPP netAccessKey curve change
Jouni Malinen [Tue, 8 Mar 2022 23:20:49 +0000 (01:20 +0200)] 
tests: sigma_dut and DPP netAccessKey curve change

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: DPP curve change for netAccessKey
Jouni Malinen [Tue, 8 Mar 2022 23:05:17 +0000 (01:05 +0200)] 
tests: DPP curve change for netAccessKey

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Curve change for netAccessKey
Jouni Malinen [Tue, 8 Mar 2022 23:06:01 +0000 (01:06 +0200)] 
DPP: Curve change for netAccessKey

Allow the Configurator to be configured to use a specific curve for the
netAccessKey so that it can request the Enrollee to generate a new key
during the configuration exchange to allow a compatible Connector to be
generated when the network uses a different curve than the protocol keys
used during the authentication exchange.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Fix a memory leak on error path
Jouni Malinen [Mon, 7 Mar 2022 22:28:10 +0000 (00:28 +0200)] 
DPP: Fix a memory leak on error path

The encoded CSR could have been leaked if another memory allocation were
to fail in this function. Use a shared return path to free the allocated
temporary buffers to avoid this.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: sigma_dut and DPP Reconfig Auth Req error cases
Jouni Malinen [Mon, 7 Mar 2022 22:06:00 +0000 (00:06 +0200)] 
tests: sigma_dut and DPP Reconfig Auth Req error cases

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Missing/invalid Protocol Version in Reconfig Auth Req
Jouni Malinen [Mon, 7 Mar 2022 21:40:27 +0000 (23:40 +0200)] 
DPP: Missing/invalid Protocol Version in Reconfig Auth Req

Extend dpp_test testing functionality to allow the Protocol Version
attribute to be removed or modified to invalid value in Reconfig
Authentication Request.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: sigma_dut and DPP PKEXv1 responder
Jouni Malinen [Mon, 7 Mar 2022 19:38:25 +0000 (21:38 +0200)] 
tests: sigma_dut and DPP PKEXv1 responder

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Extend DPP_PKEX_ADD ver=<1/2> to cover Responder role
Jouni Malinen [Mon, 7 Mar 2022 19:37:40 +0000 (21:37 +0200)] 
DPP: Extend DPP_PKEX_ADD ver=<1/2> to cover Responder role

Allow PKEX v1-only or v2-only behavior to be specific for the Responder
role. This is mainly for testing purposes.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoAdd QCA vendor attribute to enable Spectral FFT recapture
Jhalak Naik [Mon, 28 Feb 2022 07:41:59 +0000 (13:11 +0530)] 
Add QCA vendor attribute to enable Spectral FFT recapture

Add a QCA vendor attribute to enable FFT recapture on user trigger.
Enable FFT recapture only when spectral scan period is greater than 52
us.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: WPA3 with SAE password from RADIUS
Jouni Malinen [Fri, 4 Mar 2022 10:25:47 +0000 (12:25 +0200)] 
tests: WPA3 with SAE password from RADIUS

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoSAE: Add support for RADIUS passphrase as the SAE password
Mario Hros [Sat, 19 Feb 2022 20:25:30 +0000 (21:25 +0100)] 
SAE: Add support for RADIUS passphrase as the SAE password

Allow the first Tunnel-Password RADIUS entry to be used for SAE in
addition to the sae_password entries and wpa_passphrase parameters from
the static configuration file.

Signed-off-by: Mario Hros <git@reversity.org>
3 years agocleanup: Remove unreachable code
Baligh Gasmi [Fri, 18 Feb 2022 16:22:23 +0000 (17:22 +0100)] 
cleanup: Remove unreachable code

There is no need for unreachable code in these places, so remove it.

Signed-off-by: Baligh Gasmi <gasmibal@gmail.com>
3 years agoqca-vendor: Fix typos
Yegor Yefremov [Tue, 1 Feb 2022 10:33:29 +0000 (11:33 +0100)] 
qca-vendor: Fix typos

Fix typos found with codespell utility.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
3 years agobrcm_vendor: Fix typos
Yegor Yefremov [Tue, 1 Feb 2022 10:33:29 +0000 (11:33 +0100)] 
brcm_vendor: Fix typos

Fix typos found with codespell utility.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
3 years agosrc/drivers: Fix typos
Yegor Yefremov [Tue, 1 Feb 2022 08:31:44 +0000 (09:31 +0100)] 
src/drivers: Fix typos

Fix typos found with codespell utility.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
3 years agonl80211: Report background radar/CAC detection capability
Lorenzo Bianconi [Mon, 20 Dec 2021 15:48:19 +0000 (16:48 +0100)] 
nl80211: Report background radar/CAC detection capability

Report background radar/CAC detection capability if supported
by the underlying driver/hardware.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agoDFS: Add capability to select radar-only channels
Lorenzo Bianconi [Mon, 20 Dec 2021 15:48:18 +0000 (16:48 +0100)] 
DFS: Add capability to select radar-only channels

Introduce type parameter to dfs_get_valid_channel() routine to allow
selection of a radar-only channel where the CAC detection has not been
performed yet. This is a preliminary patch to enable background
radar/CAC detection.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agoDFS: Introduce dfs_set_valid_channel() utility routine
Lorenzo Bianconi [Mon, 20 Dec 2021 15:48:17 +0000 (16:48 +0100)] 
DFS: Introduce dfs_set_valid_channel() utility routine

This is a preliminary change to introduce radar/CAC background detection
support.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
3 years agoFix removal of wpa_passphrase on 'make clean'
Jouni Malinen [Thu, 3 Mar 2022 11:26:42 +0000 (13:26 +0200)] 
Fix removal of wpa_passphrase on 'make clean'

Fixes: 0430bc8267b4 ("build: Add a common-clean target")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agobuild: Re-enable options for libwpa_client.so and wpa_passphrase
Sergey Matyukevich [Tue, 22 Feb 2022 08:52:19 +0000 (11:52 +0300)] 
build: Re-enable options for libwpa_client.so and wpa_passphrase

Commit a41a29192e5d ("build: Pull common fragments into a build.rules
file") introduced a regression into wpa_supplicant build process. The
build target libwpa_client.so is not built regardless of whether the
option CONFIG_BUILD_WPA_CLIENT_SO is set or not. This happens because
this config option is used before it is imported from the configuration
file. Moving its use after including build.rules does not help: the
variable ALL is processed by build.rules and further changes are not
applied. Similarly, option CONFIG_NO_WPA_PASSPHRASE also does not work
as expected: wpa_passphrase is always built regardless of whether the
option is set or not.

Re-enable these options by adding both build targets to _all
dependencies.

Fixes: a41a29192e5d ("build: Pull common fragments into a build.rules file")
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
3 years agotests: HE AP and capability parsing
Jouni Malinen [Wed, 2 Mar 2022 23:22:44 +0000 (01:22 +0200)] 
tests: HE AP and capability parsing

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoHE: Fix invalid length checking for HE Capability element
Jouni Malinen [Wed, 2 Mar 2022 23:24:02 +0000 (01:24 +0200)] 
HE: Fix invalid length checking for HE Capability element

Do not use the first octet of the PPE Thresholds field without
explicitly confirming that that octet was included in the element.
Furthermore, allow the received element to have additional octets in the
end since IEEE Std 802.11ax-2021 defines this to be an extensible
element and new fields could be added to the end of it in the future.

Fixes: 0497e4148197 ("HE: Fix HE Capabilities element size")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoHE: Fix calculation of the PPE Threshold field length
Shiva Sankar Gajula [Fri, 4 Feb 2022 17:43:30 +0000 (23:13 +0530)] 
HE: Fix calculation of the PPE Threshold field length

The previously used calculation was not correct for the cases where the
extra padding field was needed. Fix this by properly calculating the
number of full octets in the field.

Fixes: 0497e4148197 ("HE: Fix HE Capabilities element size")
Signed-off-by: Shiva Sankar Gajula <quic_sgajula@quicinc.com>
3 years agotests: Fetch all event messages in wpas_ctrl_many_networks
Jouni Malinen [Sat, 26 Feb 2022 17:07:10 +0000 (19:07 +0200)] 
tests: Fetch all event messages in wpas_ctrl_many_networks

Do not leave a large number of network added/removed events remaining
for the following test case to handle. This removes some possible
failure test case sequences like the following one:
wpas_ctrl_many_networks dbus_ap_scan_2_ap_mode_scan

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: wpa_supplicant AP mode and PSK/PTK lifetime in memory"
Jouni Malinen [Fri, 25 Feb 2022 23:15:16 +0000 (01:15 +0200)] 
tests: wpa_supplicant AP mode and PSK/PTK lifetime in memory"

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoClear PSK explicitly from memory in couple more cases on deinit
Jouni Malinen [Sat, 26 Feb 2022 11:39:35 +0000 (13:39 +0200)] 
Clear PSK explicitly from memory in couple more cases on deinit

Couple of the WPS/P2P/RADIUS-PSK cases were freeing heap memory
allocations without explicitly clearing the PSK value. Add such clearing
for these to avoid leaving the PSK in memory after it is not needed
anymore.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoClear PMK explicitly even without FT support in AP build
Jouni Malinen [Sat, 26 Feb 2022 11:38:34 +0000 (13:38 +0200)] 
Clear PMK explicitly even without FT support in AP build

Unlike the other keys that were cleared here, the PMK is available
without FT support built into hostapd and as such, should be cleared in
all cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoRemove duplicated pointer check
Jouni Malinen [Sat, 26 Feb 2022 09:22:04 +0000 (11:22 +0200)] 
Remove duplicated pointer check

The following if statement verifies the exact same thing here.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoClear temporary results from stack in PBKDF2-SHA1
Jouni Malinen [Sat, 26 Feb 2022 08:58:15 +0000 (10:58 +0200)] 
Clear temporary results from stack in PBKDF2-SHA1

Force stack memory to be cleared of temporary values that might contain
keying material.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoRemove GTK/IGTK/BIGTK from memory explicitly in AP mode
Jouni Malinen [Fri, 25 Feb 2022 23:14:25 +0000 (01:14 +0200)] 
Remove GTK/IGTK/BIGTK from memory explicitly in AP mode

Make sure these keys do not remain in memory beyond the time they are
needed.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoClear last set keys (for testing purposes) from memory explicitly
Jouni Malinen [Fri, 25 Feb 2022 23:10:32 +0000 (01:10 +0200)] 
Clear last set keys (for testing purposes) from memory explicitly

This makes it easier to scan process memory for key information that is
not supposed to remain there after the last use.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agonl80211: Clear bss->freq when stopping AP mode
Jouni Malinen [Fri, 25 Feb 2022 20:39:54 +0000 (22:39 +0200)] 
nl80211: Clear bss->freq when stopping AP mode

The current operating frequency information was already cleared when
stopping other modes, but the cases for stopping AP mode were not
covered. Clear bss->freq in wpa_driver_nl80211_del_beacon() to cover
these cases. In addition, move clearing of bss->beacon_set there to
avoid having to clear that in all callers separately.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Make test cases more robust by clearing scan cache explicitly
Jouni Malinen [Fri, 25 Feb 2022 18:04:50 +0000 (20:04 +0200)] 
tests: Make test cases more robust by clearing scan cache explicitly

This test cases can fail if previously executed tests leave older scan
results in cfg80211 scan table. Clear that scan table explicitly to
avoid such issues.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDefine a vendor specific NDP attribute for NAN service id
Ajit Vaishya [Tue, 15 Feb 2022 16:24:31 +0000 (21:54 +0530)] 
Define a vendor specific NDP attribute for NAN service id

Add a NAN NDP attribute QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID which
indicates service id with 6 bytes of length and it's derived from the
SHA-256 hash of the NAN service name. As per Wi-Fi Aware Specfication
version 3.2, this service ID is used to calculate the NAN PMK.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Make OCV test cases more robust by clearing scan results on AP
Jouni Malinen [Wed, 23 Feb 2022 22:13:52 +0000 (00:13 +0200)] 
tests: Make OCV test cases more robust by clearing scan results on AP

This is needed to avoid pri/sec channel switching based on potential
scan results from the previous test cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agoDPP: Clear SCANNING state when starting network introduction
Jouni Malinen [Wed, 23 Feb 2022 22:07:07 +0000 (00:07 +0200)] 
DPP: Clear SCANNING state when starting network introduction

This is needed to avoid leaving wpa_state to SCANNING if network
introduction fails and a new association is not started.

This was found with the following test case sequence:
dpp_conn_status_connector_mismatch scan_trigger_failure

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
3 years agoDPP: Clear netrole on starting chirping or reconfiguration
Jouni Malinen [Wed, 23 Feb 2022 19:58:07 +0000 (21:58 +0200)] 
DPP: Clear netrole on starting chirping or reconfiguration

A previously set netrole (e.g., from DPP_LISTEN or DPP_AUTH_INIT) could
have been used in a following DPP_CHIRP or DPP_RECONFIG operation. This
could result in trying to request incorrect configuration and likely
rejection from the Configurator. Fix this by clearing the netrole when
starting these operations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
3 years agoClear wpa_s->last/current_ssid in more cases
Jouni Malinen [Wed, 23 Feb 2022 19:47:10 +0000 (21:47 +0200)] 
Clear wpa_s->last/current_ssid in more cases

It was possible for at least the wpa_s->last_ssid to be left pointing to
a removed network which could result in processing the following
association as a reassociation-within-an-ESS even when it was moving to
a different ESS. This could result in unexpected behavior. This was
found with the following test case sequence:
sigma_dut_ap_psk_sae_ft sae_h2e_password_id ap_wps_pk_oom sigma_dut_client_privacy

Move clearing of wpa_s->last_ssid and wpa_s->current_ssid into
wpas_notify_network_removed() to catch all cases similarily to the way
wpa_s->next_ssid was already cleared.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
3 years agotests: Add a script for find a minimal failing test sequence
Jouni Malinen [Wed, 23 Feb 2022 09:16:40 +0000 (11:16 +0200)] 
tests: Add a script for find a minimal failing test sequence

min-seq.py can be used to find a minimal test sequence that can be used
to reproduce test failures. This is meant for being able to process the
recently added "Failure sequence:" entries from parallel-vm.log to
reduce manual work needed to debug commonly failing test case sequences.

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