]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
4 years agoAvoid use of C++ keyword in a header file
Jouni Malinen [Sun, 21 Feb 2021 10:48:13 +0000 (12:48 +0200)] 
Avoid use of C++ keyword in a header file

Don't use 'protected' as the name of the variable in bss.h since this
might be used in control interfaces that use C++.

Fixes: 1c77f3d3f9a3 ("Indicate whether additional ANQP elements were protected")
Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoradiotap: Fix compiler issues with packed structures
Jouni Malinen [Sun, 21 Feb 2021 10:07:38 +0000 (12:07 +0200)] 
radiotap: Fix compiler issues with packed structures

Replace the Radiotap parser platform.h file with use of helper functions
from utils/common.h to avoid compiler issues with the updated design and
getting pointers to members of packet structs.

Silence the warning about _next_bitmap assignment. This pointer is
dereferenced only with operations that are safe for unaligned access, so
the compiler warning is not helpful here.

__packed might not be defined in this context, so use STRUCT_PACKED from
utils/common.h.

Fixes: e6ac269433a3 ("radiotap: Update radiotap parser")
Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: EAP-TTLS and PEAP with TLS 1.3
Jouni Malinen [Sat, 20 Feb 2021 16:00:54 +0000 (18:00 +0200)] 
tests: EAP-TTLS and PEAP with TLS 1.3

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoEAP server: Extend EAP-TLS Commitment Message use to PEAP and EAP-TTLS
Alexander Clouter [Fri, 16 Oct 2020 08:49:38 +0000 (09:49 +0100)] 
EAP server: Extend EAP-TLS Commitment Message use to PEAP and EAP-TTLS

Use the explicit Commitment Message per draft-ietf-emu-eap-tls13-13
Section 2.5 and extend this functionality to PEAP and EAP-TTLS when
using TLS 1.3.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
4 years agoEAP-TTLS peer: Handle Commitment Message for TLS 1.3
Alexander Clouter [Fri, 16 Oct 2020 08:49:38 +0000 (09:49 +0100)] 
EAP-TTLS peer: Handle Commitment Message for TLS 1.3

Recognize the explicitly defined Commitment Message per
draft-ietf-emu-eap-tls13-13 at the conclusion of the EAP-TTLS with TLS
1.3.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
4 years agoEAP-TLS peer: Handle Commitment Message for TLS 1.3
Alexander Clouter [Fri, 16 Oct 2020 08:49:38 +0000 (09:49 +0100)] 
EAP-TLS peer: Handle Commitment Message for TLS 1.3

Recognize the explicitly defined Commitment Message per
draft-ietf-emu-eap-tls13-13 at the conclusion of the EAP-TLS with TLS
1.3.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
4 years agoEAP: Extend Session-Id derivation with TLS 1.3 to PEAP and EAP-TTLS
Alexander Clouter [Fri, 16 Oct 2020 08:49:38 +0000 (09:49 +0100)] 
EAP: Extend Session-Id derivation with TLS 1.3 to PEAP and EAP-TTLS

This newer Session-Id/Method-Id derivation is used with PEAP and
EAP-TTLS when using TLS 1.3 per draft-ietf-emu-tls-eap-types-00, so do
not limit this to only EAP-TLS.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
4 years agoEAP-TTLS: Key derivation per draft-ietf-emu-tls-eap-types-00
Alexander Clouter [Fri, 16 Oct 2020 08:49:38 +0000 (09:49 +0100)] 
EAP-TTLS: Key derivation per draft-ietf-emu-tls-eap-types-00

Use the TLS-Exporter with the label and context as defined in
draft-ietf-emu-tls-eap-types-00 when deriving keys for EAP-TTLS with TLS
1.3.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
4 years agoEAP-PEAP: Key derivation per draft-ietf-emu-tls-eap-types-00
Alexander Clouter [Fri, 16 Oct 2020 08:49:38 +0000 (09:49 +0100)] 
EAP-PEAP: Key derivation per draft-ietf-emu-tls-eap-types-00

Use the TLS-Exporter with the label and context as defined in
draft-ietf-emu-tls-eap-types-00 when deriving keys for PEAP with TLS
1.3.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
4 years agoEAP-TTLS/PEAP peer: Fix failure when using session tickets under TLS 1.3
Alexander Clouter [Fri, 16 Oct 2020 08:49:36 +0000 (09:49 +0100)] 
EAP-TTLS/PEAP peer: Fix failure when using session tickets under TLS 1.3

EAP peer does not expect data present when beginning the Phase 2 in
EAP-{TTLS,PEAP} but in TLS 1.3 session tickets are sent after the
handshake completes.

There are several strategies that can be used to handle this, but this
patch picks up from the discussion[1] and implements the proposed use of
SSL_MODE_AUTO_RETRY. SSL_MODE_AUTO_RETRY has already been enabled by
default in OpenSSL 1.1.1, but it needs to be enabled for older versions.

The main OpenSSL wrapper change in tls_connection_decrypt() takes care
of the new possible case with SSL_MODE_AUTO_RETRY for
SSL_ERROR_WANT_READ to indicate that a non-application_data was
processed. That is not really an error case with TLS 1.3, so allow it to
complete and return an empty decrypted application data buffer.
EAP-PEAP/TTLS processing can then use this to move ahead with starting
Phase 2.

[1] https://www.spinics.net/lists/hostap/msg05376.html

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
4 years agotests: Use a longer timeout for connection in sigma_dut DPP test cases
Jouni Malinen [Sat, 20 Feb 2021 14:10:47 +0000 (16:10 +0200)] 
tests: Use a longer timeout for connection in sigma_dut DPP test cases

It was possible for these test cases to fail if the first scan iteration
did not find the AP since the 10 second timeout was small enough to
terminate the second attempt before fetching the scan results. Increase
this timeout to allow at least two full scan iterations to be completed
before declaring failure.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Clear scan results at the end of scan-ssid-list tests
Jouni Malinen [Sat, 20 Feb 2021 14:01:32 +0000 (16:01 +0200)] 
tests: Clear scan results at the end of scan-ssid-list tests

These test cases use hidden SSIDs and left behind a BSS entry with no
SSID. That can cause issues for consecutive test cases where the BSSID
can be used as the key for finding a BSS entry. That could end up
picking the old hidden SSID BSS instead of the one that was meant to be
used in the test case.

Flush the scan cache at the end of the scan-ssid-list test cases to
reduce invalid test failures for the consecutive test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Make PASN tests more robust
Jouni Malinen [Sat, 20 Feb 2021 13:45:54 +0000 (15:45 +0200)] 
tests: Make PASN tests more robust

The PASN_START command can fail if there is an old BSS entry for the
same BSSID from an earlier test case. Try to avoid this by flushing the
scan results before running these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agonl80211: Unconditionally clear nl_msg
Andrei Otcheretianski [Wed, 17 Feb 2021 10:14:32 +0000 (12:14 +0200)] 
nl80211: Unconditionally clear nl_msg

Previously nl80211_nlmsg_clear() would be called under a special
condition when valid_handler is NULL and valid_data is -1. Such API is
not very convenient as it forces the handler to be NULL. Change the
send_and_recv() function to always clear the nl_msg, which will simplify
all this logic.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agoPASN: Correctly set RSNXE bits from AP
Ilan Peer [Tue, 16 Feb 2021 13:23:57 +0000 (15:23 +0200)] 
PASN: Correctly set RSNXE bits from AP

The capability bit index should not be shifted here as the shifting is
handled later below when building the RSNXE octets.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agoPASN: Correctly set RSNXE bits from STA
Ilan Peer [Tue, 16 Feb 2021 13:23:57 +0000 (15:23 +0200)] 
PASN: Correctly set RSNXE bits from STA

These defines are for the capability bit number, not the binary value
from the bit index. As such, need to use BIT() here to set the bitmap
appropriately.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agowpa_supplicant: Fix potential memleak on an error path
Andrei Otcheretianski [Tue, 16 Feb 2021 13:23:56 +0000 (15:23 +0200)] 
wpa_supplicant: Fix potential memleak on an error path

extra_buf allocation was missed in one of the error cases.

Fixes: 170775232d61 ("ANQP: Add support to specify frequency in ANQP_GET command")
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agotests: Replace deprecated thread isAlive function
Andrei Otcheretianski [Tue, 16 Feb 2021 13:45:07 +0000 (15:45 +0200)] 
tests: Replace deprecated thread isAlive function

The isAlive() function is deprecated in newer versions of Python
so replace it with the is_alive() instead.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agoCheck for message truncation in RADIUS client
Anusha Datar [Wed, 17 Feb 2021 22:32:58 +0000 (17:32 -0500)] 
Check for message truncation in RADIUS client

The RADIUS client currently determines if a radius message is longer
than the supported maximum length by checking whether the size of the
received buffer and the length of the buffer (as returned by recv()) is
equal. This method fails to detect if the buffer has actually been
truncated. This change modifies the RADIUS client to instead use the
recvmsg() call and then check the message header flags to determine
whether or not the received message has been truncated and drop the
message if that is the case.

Signed-off-by: Anusha Datar <anusha@meter.com>
Reviewed-by: Steve deRosier <derosier@cal-sierra.com>
Reviewed-by: Julian Squires <julian@cipht.net>
4 years agoSet RADIUS message length to reflect RFC 2865
Anusha Datar [Wed, 17 Feb 2021 22:32:57 +0000 (17:32 -0500)] 
Set RADIUS message length to reflect RFC 2865

The current RADIUS server message maximum length limits the length of
each RADIUS message to 3000 bytes. As specified in RFC 2865 section 3
("Packet Format"), the RADIUS standard's maximum message size is 4096
bytes, so this change increases the RADIUS server's maximum message
size from 3000 to 4096 to match the standard.

Signed-off-by: Anusha Datar <anusha@meter.com>
Reviewed-by: Steve deRosier <derosier@cal-sierra.com>
Reviewed-by: Julian Squires <julian@cipht.net>
4 years agoCreate RADIUS_MAX_MSG_LEN param in the shared radius.h
Anusha Datar [Wed, 17 Feb 2021 22:32:56 +0000 (17:32 -0500)] 
Create RADIUS_MAX_MSG_LEN param in the shared radius.h

The RADIUS client currently uses a hardcoded value of 3000 for the
maximum length of a RADIUS message, and the RADIUS server currently
defines a constant value for the maximum length of the RADIUS message
within its source. The client and the server should use the same
maximum length value, so this change creates a shared parameter
RADIUS_MAX_MSG_LEN within the header file radius.h and modifies
both the client and the server to use that parameter instead of
a locally set value.

Signed-off-by: Anusha Datar <anusha@meter.com>
Reviewed-by: Steve deRosier <derosier@cal-sierra.com>
Reviewed-by: Julian Squires <julian@cipht.net>
4 years agotests: P2P device discovery with invalid group client info
Jouni Malinen [Mon, 9 Nov 2020 10:19:39 +0000 (12:19 +0200)] 
tests: P2P device discovery with invalid group client info

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd new attributes in get_sta_info QCA vendor command
Sachin Ahuja [Mon, 1 Feb 2021 11:51:47 +0000 (17:21 +0530)] 
Add new attributes in get_sta_info QCA vendor command

Add additional attributes for the QCA vendor command
QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO to get finer details on roaming
behavior, TSF out of sync count, and the latest TX rate, Rate Index used
for the transmission.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoShow OCV and beacon protection capabilities in control interface
Veerendranath Jakkam [Fri, 22 Jan 2021 16:27:38 +0000 (21:57 +0530)] 
Show OCV and beacon protection capabilities in control interface

Indicate local support for Operating Channel Validation (OCV) and beacon
protection.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
4 years agoAP: Check driver's capability to enable OCV when driver SME is used
Veerendranath Jakkam [Thu, 4 Feb 2021 18:33:20 +0000 (00:03 +0530)] 
AP: Check driver's capability to enable OCV when driver SME is used

When the driver SME is used, offloaded handshakes which need Operating
Channel Validation (OCV) such as SA Query procedure, etc. would fail if
hostapd enables OCV based on configuration but the driver doesn't
support OCV. To avoid this when driver SME is used, enable OCV from
hostapd only when the driver indicates support for OCV.

This commit also adds a capability flag to indicate whether driver SME
is used in AP mode.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
4 years agoSTA: Check driver capability to enable OCV when driver SME is used
Veerendranath Jakkam [Thu, 3 Dec 2020 08:47:39 +0000 (14:17 +0530)] 
STA: Check driver capability to enable OCV when driver SME is used

When the driver SME is used, offloaded RSN handshakes like SA Query, GTK
rekeying, FT authentication, etc. would fail if wpa_supplicant enables
OCV in initial connection based on configuration but the driver doesn't
support OCV. To avoid such failures check the driver's capability for
enabling OCV when the driver SME used.

This commit also adds a capability flag for indicating OCV support
by the driver.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
4 years agoClean up RSN parameter setting for PASN
Jouni Malinen [Mon, 15 Feb 2021 21:48:04 +0000 (23:48 +0200)] 
Clean up RSN parameter setting for PASN

Set conf.force_kdk_derivation within the same if block as all the other
parameters. This is used only if ssid is not NULL, so no need to have
any special handling for this parameter.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoEnable beacon protection only when driver indicates support
Veerendranath Jakkam [Thu, 3 Dec 2020 07:47:33 +0000 (13:17 +0530)] 
Enable beacon protection only when driver indicates support

Enabling beacon protection will cause STA connection/AP setup failures
if the driver doesn't support beacon protection. To avoid this, check
the driver capability before enabling beacon protection.

This commit also adds a capability flag to indicate beacon protection
support in client mode only.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
4 years agoUpdate sgml to generate reproducible manpages
Hu Keping [Fri, 4 Sep 2020 14:04:55 +0000 (22:04 +0800)] 
Update sgml to generate reproducible manpages

Prior to this patch, we failed to recreate bit-by-bit identical
copies of wpa_supplicant because it doesn't generate reproducible manpages.

Since the latest version(0.6.14-3 or new) of docbook-utils have already
support getting the date from sgml file [1], it is possible to make some
progress on the "reproducible builds" effort [2].

[1]: https://sources.debian.org/patches/docbook-utils/0.6.14-3
[2]: https://reproducible-builds.org

Signed-off-by: Hu Keping <hukeping@huawei.com>
4 years agotests: EXT PW file backend
Jouni Malinen [Mon, 15 Feb 2021 21:26:32 +0000 (23:26 +0200)] 
tests: EXT PW file backend

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoext_password: Implement new file-based backend
Patrick Steinhardt [Sun, 14 Feb 2021 11:16:33 +0000 (12:16 +0100)] 
ext_password: Implement new file-based backend

It was not easily possible to separate configuration of an interface and
credentials when using the configuration file instead of the control
interface or D-Bus interface for setting up the network profiles. This
makes it hard to distribute configuration across a set of nodes which
use wpa_supplicant without also having to store credentials in the same
file. While this can be solved via scripting, having a native way to
achieve this would be preferable.

Turns out there already is a framework to have external password
storages. It only had a single "test" backend though, which is kind of
an in-memory store which gets initialized with all passwords up front
and is mainly for testing purposes. This isn't really suitable for the
above use case: the backend cannot be initialized as part of the central
configuration given that it needs the credentials, and we want to avoid
scripting.

This commit thus extends the infrastructure to implement a new backend,
which instead uses a simple configuration file containing key-value
pairs. The file follows the format which wpa_supplicant.conf(5) uses:
empty lines and comments are ignored, while passwords can be specified
with simple `password-name=password-value` assignments.

With this new backend, splitting up credentials and configuration
becomes trivial:

    # /etc/wpa_supplicant/wpa_supplicant.conf
    ext_password_backend=file:/etc/wpa_supplicant/psk.conf

    network={
        ssid="foobar"
        psk=ext:foobar
    }

    # /etc/wpa_supplicant/psk.conf
    foobar=ecdabff9c80632ec6fcffc4a8875e95d45cf93376d3b99da6881298853dc686b

Alternative approaches would be to support including other configuration
files in the main configuration, such that common configuration and
network declarations including credentials are split up into separate
files. But the implementation would probably have been more complex
compared to reusing the already-existing framework for external password
backends.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
4 years agowpa_supplicant: Move wpa_config_get_line() into utils
Patrick Steinhardt [Sun, 14 Feb 2021 11:16:28 +0000 (12:16 +0100)] 
wpa_supplicant: Move wpa_config_get_line() into utils

The function wpa_config_get_line() is used by the wpa_supplicant config
file parser to retrieve the next non-comment non-blank line. We'll need
the same kind of functionality to implement the file-based external
password backend, so as a preparatory step this commit extracts the
function into its own standalone file in the utils package.

No functional changes are expected from this commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
4 years agotests: ACS for HE 40 MHz channel in 2.4 GHz
Jouni Malinen [Mon, 15 Feb 2021 16:14:25 +0000 (18:14 +0200)] 
tests: ACS for HE 40 MHz channel in 2.4 GHz

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoHE: Fall back to 20 MHz on 2.4 GHz if 40 MHz is not supported
Jouni Malinen [Mon, 15 Feb 2021 16:24:37 +0000 (18:24 +0200)] 
HE: Fall back to 20 MHz on 2.4 GHz if 40 MHz is not supported

At least the ACS case of an attempt to pick a 40 MHz channel on the 2.4
GHz band could fail if HE was enabled and the driver did not include
support for 40 MHz channel bandwidth on the 2.4 GHz band in HE
capabilities. This resulted in "40 MHz channel width is not supported in
2.4 GHz" message when trying to configure the channel and failure to
start the AP.

Avoid this by automatically falling back to using 20 MHz bandwidth as
part of channel parameter determination at the end of the ACS procedure.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoACS: Allow downgrading to 20 MHz based on OBSS results
Aloka Dixit [Thu, 14 May 2020 23:18:38 +0000 (16:18 -0700)] 
ACS: Allow downgrading to 20 MHz based on OBSS results

When auto channel selection (ACS) is used for HE 40 MHz in the 2.4 GHz
band, AP sets center frequency after finding a 40 MHz channel and then
runs a scan for overlapping BSSes in neighboring channels. Upon OBSS
detection, AP should downgrade to 20 MHz bandwidth.

This was broken because allowed_ht40_channel_pair() returns true in this
case and the steps to reset center frequency are not executed causing
failure to bring interface up.

Fix the condition to allow rollback to 20 MHz.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
4 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Mon, 15 Feb 2021 15:36:20 +0000 (17:36 +0200)] 
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2021-02-12.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agonl80211: Unsolicited broadcast Probe Response configuration
Aloka Dixit [Fri, 11 Sep 2020 02:45:47 +0000 (02:45 +0000)] 
nl80211: Unsolicited broadcast Probe Response configuration

Unsolicited broadcast Probe Response transmission is used for in-band
discovery in the 6 GHz band (IEEE P802.11ax/D8.0 26.17.2.3.2, AP
behavior for fast passive scanning). Add support for configuring the
parameters for such frames.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
4 years agoAP: Unsolicited broadcast Probe Response configuration
Aloka Dixit [Fri, 11 Sep 2020 02:45:46 +0000 (02:45 +0000)] 
AP: Unsolicited broadcast Probe Response configuration

Add hostapd configuration options for unsolicited broadcast
Probe Response transmission for in-band discovery in 6 GHz.
Maximum allowed packet interval is 20 TUs (IEEE P802.11ax/D8.0
26.17.2.3.2, AP behavior for fast passive scanning).
Setting value to 0 disables the transmission.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
4 years agotests: Make ap_sae_tdls more robust
Jouni Malinen [Sun, 14 Feb 2021 18:16:18 +0000 (20:16 +0200)] 
tests: Make ap_sae_tdls more robust

Need to clear sae_groups parameter before using SAE in this test case to
avoid issues if previous test cases have left a specific group
configured.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Make multi_ap_backhaul_roam_with_bridge more robust
Jouni Malinen [Sun, 14 Feb 2021 18:12:48 +0000 (20:12 +0200)] 
tests: Make multi_ap_backhaul_roam_with_bridge more robust

Clear the scan cache and make sure the new AP gets discovered before
issuing the ROAM command.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoP2P: Clear unexpected HT40 configuration on 2.4 GHz band
Jouni Malinen [Sun, 14 Feb 2021 17:32:23 +0000 (19:32 +0200)] 
P2P: Clear unexpected HT40 configuration on 2.4 GHz band

Number of the P2P+NFC test cases have been failing every now and then
and those failures seemed to be because of having somehow managed to
select the GO's operating channel as HT40+ on the channel 11 in the 2.4
GHz band, i.e., something that is clearly incorrect. The P2P check for
HT40 secondary channel is supported only on the 5 GHz band, so drop HT40
configuration if it shows up unexpectedly on the 2.4 GHz band to avoid
issues in GO being able to start.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoInclude secondary channel config in no-hw-channel-found message
Jouni Malinen [Sun, 14 Feb 2021 17:31:14 +0000 (19:31 +0200)] 
Include secondary channel config in no-hw-channel-found message

This makes the error message easier to understand if the AP mode setup
failure is caused by invalid secondary channel configuration while the
primary channel is valid.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: FILS Discovery frame generation
Jouni Malinen [Sun, 14 Feb 2021 16:11:07 +0000 (18:11 +0200)] 
tests: FILS Discovery frame generation

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agonl80211: Add FILS Discovery frame configuration
Aloka Dixit [Tue, 15 Dec 2020 02:04:28 +0000 (18:04 -0800)] 
nl80211: Add FILS Discovery frame configuration

Add support for setting the parameters for FILS Discovery frame
transmission.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
4 years agoFILS: Add generation of FILS Discovery frame template
Aloka Dixit [Tue, 15 Dec 2020 02:04:27 +0000 (18:04 -0800)] 
FILS: Add generation of FILS Discovery frame template

Add hostapd configuration parameters for FILS Discovery frame
transmission interval and prepare a template for FILS Discovery frame
for the driver interface. The actual driver interface changes are not
included in this commit.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
4 years agoAdd a helper function for determining RSN capabilities field value
Jouni Malinen [Sun, 14 Feb 2021 16:02:38 +0000 (18:02 +0200)] 
Add a helper function for determining RSN capabilities field value

This information is needed in more than one place, so add a helper
function to avoid need to duplicate this code.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoDefine FILS Discovery frame subfields
Aloka Dixit [Tue, 15 Dec 2020 02:04:26 +0000 (18:04 -0800)] 
Define FILS Discovery frame subfields

Add definitions from IEEE Std 802.11ai-2016, 9.6.8.36 FILS discovery
frame format and extensions for the 6 GHz band from IEEE P802.11ax/D8.0.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
4 years agoDo not include VHT elements in Beacon frames on the 6 GHz band
Jouni Malinen [Sat, 13 Feb 2021 22:31:04 +0000 (00:31 +0200)] 
Do not include VHT elements in Beacon frames on the 6 GHz band

A similar change was previously done for Probe Response frames, but the
Beacon frame case was missed. Fix this to remove the VHT elements also
from Beacon frames on the 6 GHz since the relevant information is
included only in the HE elements on that band.

Fixes: 49e95ee1ee2c ("AP: Publish only HE capabilities and operation IEs on 6 GHz band")
Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoAdd Transmit Power Envelope also for 6 GHz HE AP
Shay Bar [Wed, 10 Feb 2021 11:07:19 +0000 (13:07 +0200)] 
Add Transmit Power Envelope also for 6 GHz HE AP

According to IEEE P802.11ax/D8.0, add Transmit Power Envelope element
into Beacon and Probe Response frames when operating HE AP on the 6 GHz
band.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
4 years agoUse hostapd_get_oper_chwidth() when build Transmit Power Envelope element
Shay Bar [Wed, 10 Feb 2021 11:07:18 +0000 (13:07 +0200)] 
Use hostapd_get_oper_chwidth() when build Transmit Power Envelope element

hostapd_get_oper_chwidth(iconf) instead of direct access to
iface->conf->vht_oper_chwidth is needed here to be able to use this with
HE in cases where VHT is not enabled.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
4 years agoMake VHT Transmit Power Envelope element helper more generic
Shay Bar [Wed, 10 Feb 2021 11:07:17 +0000 (13:07 +0200)] 
Make VHT Transmit Power Envelope element helper more generic

According to latest IEEE 802.11 standard, Transmit Power Envelope
element is also relevant to IEEE 802.11ax and is no longer called VHT
Transmit Power Envelope. Remove the VHT naming from the element and move
hostapd_eid_txpower_envelope() from ieee802_11_vht.c to ieee802_11.c in
preparation of using it with HE.

Signed-off-by: Shay Bar <shay.bar@celeno.com>
4 years agotests: Multi-AP backhaul BSS reassociation to another BSS with bridge
Jouni Malinen [Sat, 13 Feb 2021 22:01:29 +0000 (00:01 +0200)] 
tests: Multi-AP backhaul BSS reassociation to another BSS with bridge

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agonl80211: Ignore 4addr mode enabling error if it was already enabled
Jouni Malinen [Sat, 13 Feb 2021 21:59:28 +0000 (23:59 +0200)] 
nl80211: Ignore 4addr mode enabling error if it was already enabled

nl80211_set_4addr_mode() could fail when trying to enable 4addr mode on
an interface that is in a bridge and has 4addr mode already enabled.
This operation would not have been necessary in the first place and this
failure results in disconnecting, e.g., when roaming from one backhaul
BSS to another BSS with Multi AP.

Avoid this issue by ignoring the nl80211 command failure in the case
where 4addr mode is being enabled while it has already been enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agowpa_supplicant: Don't exit scanning state on config reload
Michal Kazior [Fri, 12 Feb 2021 13:27:54 +0000 (13:27 +0000)] 
wpa_supplicant: Don't exit scanning state on config reload

There's a chance that prior to config reload being requested a scan work
was started. As such forcing wpa_supplicant to WPA_DISCONNECTED was
removing any hints that the actual driver is busy with work. That led to
wpa_supplicant reporting "Failed to initialize AP scan" over and over
again for a few seconds (depending on driver/capabilities) until the
untracked scan finished.

Cancelling a scan isn't really a solution because there's a bunch of
scanning state bits sprinkled across wpa_supplicant structure and they
get updated as driver events actually flow in in async manner.

As far as I can tell this is only preventing unnecessary warning
messages. This doesn't seem like it was crippling any logic per se.

Signed-off-by: Michal Kazior <michal@plume.com>
4 years agoDPP2: Defer chirp scan if other scan is queued up
Michal Kazior [Fri, 12 Feb 2021 13:27:53 +0000 (13:27 +0000)] 
DPP2: Defer chirp scan if other scan is queued up

The chirp scan could override the scan_res_handler. This could lead to
wpa_supplicant getting stuck in a scanning state while not scanning at
all until forced to, e.g., via an explicit SCAN control command.

The condition for trigerring this problem in my testing was when
(interface_count % 3) == 2. This introduced a two second delay before
actual scan was triggered after starting the wpa_supplicant instance up.
If DPP chirping was requested fast enough, in between the queueing and
triggering, it would punt the scan request, never to be resumed again.
Chirp scan handler wouldn't resume it leaving wpa_supplicant
inadvertently idle.

Signed-off-by: Michal Kazior <michal@plume.com>
4 years agowlantest: Avoid unaligned iphdr pointers
Brian Norris [Sat, 13 Feb 2021 03:03:35 +0000 (19:03 -0800)] 
wlantest: Avoid unaligned iphdr pointers

Buffers passed to rx_data_ip() may not be naturally-aligned, and so we
get unpredictable behavior when we cast that to an IP header. In
particular, this code may crash on ARM.

Signed-off-by: Brian Norris <briannorris@chromium.org>
4 years agomesh: Assign channel in frequency params in all bands
Pradeep Kumar Chitrapu [Wed, 16 Sep 2020 01:01:48 +0000 (18:01 -0700)] 
mesh: Assign channel in frequency params in all bands

Previously, the channel number was set in hostapd_freq_params only with
the presence of HT capabilities. Set the channel number before the check
for HT mode to accommodate the 6 GHz band cases.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
4 years agonl80211: Send HE 6 GHz capability parameters to the driver
Pradeep Kumar Chitrapu [Wed, 16 Sep 2020 01:01:45 +0000 (18:01 -0700)] 
nl80211: Send HE 6 GHz capability parameters to the driver

The HE 6 GHz capability was not being sent to the kernel causing 6 GHz
support being unidentifiable in the kernel driver for added stations.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
4 years agowolfSSL: wolfSSL_use_PrivateKey_* correct return codes
Juliusz Sosinowicz [Mon, 8 Feb 2021 08:34:07 +0000 (09:34 +0100)] 
wolfSSL: wolfSSL_use_PrivateKey_* correct return codes

The wolfSSL_use_PrivateKey_* APIs return 1 on success. 0 is also an
error.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
4 years agoDPP: Expose config object PSK/passphrase in wpa_supplicant
Michal Kazior [Mon, 8 Feb 2021 15:32:06 +0000 (15:32 +0000)] 
DPP: Expose config object PSK/passphrase in wpa_supplicant

hostapd was already exposing this. There's no reason not to expose it in
wpa_supplicant. This allows 3rd party apps interacting with the control
interface to handle DPP events to get configs instead of needing to
dance around with update_config=1 and SAVE_CONFIG.

Signed-off-by: Michal Kazior <michal@plume.com>
4 years agoDPP: Expose config object AKM in wpa_supplicant control interface
Michal Kazior [Mon, 8 Feb 2021 15:32:05 +0000 (15:32 +0000)] 
DPP: Expose config object AKM in wpa_supplicant control interface

hostapd was already exposing this. There's no reason not to expose it in
wpa_supplicant. This allows 3rd party apps interacting with the control
interface to handle DPP events to get configs instead of needing to
dance around with update_config=1 and SAVE_CONFIG.

Signed-off-by: Michal Kazior <michal@plume.com>
4 years agotests: DPP Authentication Request destination address in chirp case
Jouni Malinen [Tue, 9 Feb 2021 18:43:33 +0000 (20:43 +0200)] 
tests: DPP Authentication Request destination address in chirp case

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP2: Fix Authentication Request destination in the chirping case
Jouni Malinen [Tue, 9 Feb 2021 18:41:08 +0000 (20:41 +0200)] 
DPP2: Fix Authentication Request destination in the chirping case

The Authentication Request frames triggered by the reception of a
Presence Announcement frame were sent to the broadcast address. This is
not correct behavior since the source MAC address of the Presence
Announcement frame was supposed to override the Responder MAC address.
Fix this by using that source MAC address to avoid unnecessary use of
broadcast frames.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoSAE: Avoid driver STA entry removal unnecessarily when using H2E/PK
Aloka Dixit [Mon, 8 Feb 2021 02:49:17 +0000 (18:49 -0800)] 
SAE: Avoid driver STA entry removal unnecessarily when using H2E/PK

The new status code values for SAE H2E and PK resulted in the
sta->added_unassoc cases incorrectly removing the STA entry after
successful SAE commit messages. Fix this by using sae_status_success()
instead of direct check for WLAN_STATUS_SUCCESS when processing SAE
commit messages before removing station entry.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
4 years agohw_feature: Correctly select mode in case of the 6 GHz band
Ilan Peer [Thu, 22 Oct 2020 11:00:25 +0000 (14:00 +0300)] 
hw_feature: Correctly select mode in case of the 6 GHz band

There are 2 HW modes with IEEE80211_MODE_A: one for the 5 GHz channels
and one for 6 GHz channels. Since hw_get_chan() checks all the
compatible hw modes, eventually, an incorrect hw mode is selected.

To fix this, add a function that checks if a specific mode supports
the requested frequency and if so use it as the current mode.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agotests: New HE configuration parameters
Jouni Malinen [Sun, 7 Feb 2021 22:45:42 +0000 (00:45 +0200)] 
tests: New HE configuration parameters

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoAP: Extend Spatial Reuse Parameter Set
Rajkumar Manoharan [Sat, 3 Oct 2020 09:31:16 +0000 (02:31 -0700)] 
AP: Extend Spatial Reuse Parameter Set

Extend SPR element to support following fields and pass all
information to kernel for driver use.
 * Non-SRG OBSS PD Max Offset
 * SRG BSS Color Bitmap
 * SRG Partial BSSID Bitmap

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
4 years agoAllow HE MCS rate selection for Beacon frames
Rajkumar Manoharan [Sat, 3 Oct 2020 09:31:15 +0000 (02:31 -0700)] 
Allow HE MCS rate selection for Beacon frames

Allow HE MCS rate to be used for beacon transmission when the driver
advertises the support. The rate is specified with a new beacon_rate
option "he:<HE MCS>" in hostapd configuration.

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
4 years agonl80211: Support the 6 GHz band for beacon rate configuration
Rajkumar Manoharan [Sat, 3 Oct 2020 09:31:15 +0000 (02:31 -0700)] 
nl80211: Support the 6 GHz band for beacon rate configuration

Use the correct enum nl80211_band value when configuring the beacon rate
for the 6 GHz band.

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
4 years agohostapd: Add HE 6 GHz band capability configuration
Rajkumar Manoharan [Sat, 3 Oct 2020 06:34:16 +0000 (23:34 -0700)] 
hostapd: Add HE 6 GHz band capability configuration

Enable user to configure Maximum MPDU Length, Maximum A-MPDU Length
Exponent, Rx Antenna Pattern Consistency, and Tx Antenna Pattern
Consistency of 6 GHz capability through config file.

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
4 years agoEAP-AKA: Check that ID message storing succeeds
Jouni Malinen [Sun, 7 Feb 2021 17:29:23 +0000 (19:29 +0200)] 
EAP-AKA: Check that ID message storing succeeds

This could fail in theory if running out of memory, so better check for
this explicitly instead of allowing the exchange to continue and fail
later due to checkcode mismatch.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoFix compiler warning on CONFIG_AP without CONFIG_P2P builds
Jouni Malinen [Sun, 7 Feb 2021 17:12:24 +0000 (19:12 +0200)] 
Fix compiler warning on CONFIG_AP without CONFIG_P2P builds

The static function is_chanwidth160_supported() is called only within
CONFIG_P2P block so the function itself needs to have matching condition
for build.

Fixes: ed24bad1d98d ("AP: Check driver support while auto-selecting bandwidth for AP/P2P GO")
Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoUpdate Visual Studio projects to match file renaming
Jouni Malinen [Sun, 7 Feb 2021 16:21:04 +0000 (18:21 +0200)] 
Update Visual Studio projects to match file renaming

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix fuzzing test build after file rename
Jouni Malinen [Sun, 7 Feb 2021 16:16:28 +0000 (18:16 +0200)] 
tests: Fix fuzzing test build after file rename

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoRename blacklist.[ch] to bssid_ignore.[ch]
Jouni Malinen [Sun, 7 Feb 2021 15:06:19 +0000 (17:06 +0200)] 
Rename blacklist.[ch] to bssid_ignore.[ch]

This completes renaming of this functionality for a list of temporarily
ignored BSSIDs.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoRename wpa_blacklist to wpa_bssid_ignore
Jouni Malinen [Sun, 7 Feb 2021 15:02:37 +0000 (17:02 +0200)] 
Rename wpa_blacklist to wpa_bssid_ignore

This is more accurate name for this functionality of temporarily
ignoring BSSIDs.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoRename INTERWORKING_BLACKLISTED define
Jouni Malinen [Sun, 7 Feb 2021 14:43:54 +0000 (16:43 +0200)] 
Rename INTERWORKING_BLACKLISTED define

Use more accurate INTERWORKING_EXCLUDED for this. The actual event
prefix is not changed to remains compatible with external components
using this control interface event message.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Use the new BSSID_IGNORE name for the command
Jouni Malinen [Sun, 7 Feb 2021 14:41:10 +0000 (16:41 +0200)] 
tests: Use the new BSSID_IGNORE name for the command

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoRename the control interface BLACKLIST command to BSSID_IGNORE
Jouni Malinen [Sun, 7 Feb 2021 14:29:53 +0000 (16:29 +0200)] 
Rename the control interface BLACKLIST command to BSSID_IGNORE

Use a more specific name for the control interface command used for
managing the list of BSSIDs that are temporarily ignored.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Use new names for network profile BSSID ignore/accept parameters
Jouni Malinen [Sun, 7 Feb 2021 14:19:09 +0000 (16:19 +0200)] 
tests: Use new names for network profile BSSID ignore/accept parameters

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoRename network profiles parameters for ignoring/accepted BSSIDs
Jouni Malinen [Sun, 7 Feb 2021 14:10:18 +0000 (16:10 +0200)] 
Rename network profiles parameters for ignoring/accepted BSSIDs

Rename the network profile parameters bssid_blacklist and
bssid_whitelist to bssid_ignore and bssid_accept to use more specific
names for the configuration of which BSSs are ignored/accepted during
BSS selection. The old parameter names are maintained as aliases for the
new names to avoid breaking compatibility with previously used
configurations.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agowlantest: Add new key_mgmt and rsn_capab values for BSS/STA debug prints
Jouni Malinen [Sun, 7 Feb 2021 11:52:59 +0000 (13:52 +0200)] 
wlantest: Add new key_mgmt and rsn_capab values for BSS/STA debug prints

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoradiotap: Update radiotap parser
Jouni Malinen [Sun, 7 Feb 2021 11:25:13 +0000 (13:25 +0200)] 
radiotap: Update radiotap parser

Update the radiotap parser to the latest version of the
http://git.sipsolutions.net/radiotap.git/ library.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agowlantest: Add more details about protected FTM frames
Jouni Malinen [Sun, 7 Feb 2021 11:11:34 +0000 (13:11 +0200)] 
wlantest: Add more details about protected FTM frames

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agowlantest: Recognize the FTM bit in the CCMP Key ID octet
Jouni Malinen [Sun, 7 Feb 2021 10:30:03 +0000 (12:30 +0200)] 
wlantest: Recognize the FTM bit in the CCMP Key ID octet

This previously reserved bit is now used in FTM to help select the
appropriate replay counter. Silence the warning about use of a reserved
bit for this. wlantest does not yet support the actual replay counter
processing for FTM.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agowlantest: Process Action No Ack frames like Action frames
Jouni Malinen [Sun, 7 Feb 2021 10:00:12 +0000 (12:00 +0200)] 
wlantest: Process Action No Ack frames like Action frames

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agowlantest: Support TK list for Management frame decryption
Jouni Malinen [Sun, 7 Feb 2021 09:37:58 +0000 (11:37 +0200)] 
wlantest: Support TK list for Management frame decryption

Use the TKs from the PTK file (-T command line argument) to try to
decrypt encrypted Management frames if no BSS/STA key can be found based
on addresses.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: DFS pre CAC tests
Janusz Dziedzic [Sun, 11 Oct 2020 19:01:53 +0000 (21:01 +0200)] 
tests: DFS pre CAC tests

Add test cases that check preCAC, which is available for EU regulatory
domain. Also confirm that preCAC is not used for US.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agoDFS: Allow switch to an available channel
Janusz Dziedzic [Sun, 11 Oct 2020 19:01:52 +0000 (21:01 +0200)] 
DFS: Allow switch to an available channel

For EU, where preCAC is allowed, we should allow switch to DFS available
channels, instead of restarting BSS.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agotests: MAC ACL accept list changes
Jouni Malinen [Sun, 7 Feb 2021 08:10:46 +0000 (10:10 +0200)] 
tests: MAC ACL accept list changes

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agohostapd: Report errors ACCEPT_ACL/DENY_ACL control interface commands
Masafumi Utsugi [Tue, 29 Sep 2020 06:12:01 +0000 (15:12 +0900)] 
hostapd: Report errors ACCEPT_ACL/DENY_ACL control interface commands

Return FAIL for couple of the operations that were previously ignoring
invalid addresses without reporting errors.

Signed-off-by: Masafumi Utsugi <mutsugi@allied-telesis.co.jp>
4 years agohostapd: Fix dynamic ACCEPT_ACL management over control interface
Masafumi Utsugi [Tue, 29 Sep 2020 06:12:01 +0000 (15:12 +0900)] 
hostapd: Fix dynamic ACCEPT_ACL management over control interface

hostapd_disassoc_accept_mac() was called after a new accept MAC address
was added (ACCEPT_ACL ADD_MAC), but this function should have been
called after an accept MAC address was removed and accept MAC list was
cleared to disconnect a STA which is not listed in the update accept MAC
address list. Fix this by moving the call to places where a connected
STA can actually end up losing its previously present accept entry.

Signed-off-by: Masafumi Utsugi <mutsugi@allied-telesis.co.jp>
4 years agotests: Extend Multi AP tests
Janusz Dziedzic [Tue, 13 Oct 2020 10:16:27 +0000 (12:16 +0200)] 
tests: Extend Multi AP tests

Add option to:
 - add a new AP on the same phy that the backhaul-sta uses
 - run CSA from the parent

Adding a new AP (backhaul/fronthaul) on the same phy we have for
backhaul-sta is closer to the real repeater implementation.

Add a test case for that and run CSA.

This is a common problem when we have on the same phy:
 - connected backhaul STA
 - we started fronthaul/backhaul AP
 - we receive (from parent) CSA on the STA interface

This is multi_ap_wps_shared_apdev_csa test case, which fails today with
both mac80211_hwsim and ath9k. To avoid always failing test cases,
ignore this failure for now. Full validation can be enabled once the
issue behind this is fixed.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agotests: Pass ful params_backhaul in Multi AP test cases
Janusz Dziedzic [Tue, 13 Oct 2020 10:16:26 +0000 (12:16 +0200)] 
tests: Pass ful params_backhaul in Multi AP test cases

Pass the backhaul parameters as a parameter. This is in preparation for
channel switch test for Multi AP.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agohostapd: Add multi_ap settings to get_config() output
Raphaël Mélotte [Wed, 2 Dec 2020 16:51:45 +0000 (17:51 +0100)] 
hostapd: Add multi_ap settings to get_config() output

Since a running hostapd is not necessarily using the settings that are
in the configuration file (if they were changed at runtime, or the file
was changed but not reloaded, etc.), being able to get their value at
runtime can be useful (to know if they have to be updated for example).

If multi_ap is set, also print the SSID and passphrase (or PSK).

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
4 years agotests: Add WPS test with dynamic update
Raphaël Mélotte [Fri, 18 Dec 2020 10:50:28 +0000 (11:50 +0100)] 
tests: Add WPS test with dynamic update

This test first configure hostapd with an initial SSID
('test-wpa2-psk-start'). Then a new SSID is configured
('test-wpa2-psk-new') using SET and RELOAD. Next, a station is
associated using WPS, and the test verifies that the new SSID was served
to the station.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
4 years agoWPS: Reconfigure credentials on hostapd config reload
Raphaël Mélotte [Thu, 4 Feb 2021 15:36:13 +0000 (16:36 +0100)] 
WPS: Reconfigure credentials on hostapd config reload

When new credentials are configured and hostapd is reconfigured using
SIGHUP (or RELOAD on the ctrl_iface), also update the WPS credentials.

Before these changes, when WPS is triggered the Registar always serves
the credentials that were configured when hostapd started.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
4 years agoWPS: Use helper variables to clean up code
Raphaël Mélotte [Thu, 4 Feb 2021 15:36:13 +0000 (16:36 +0100)] 
WPS: Use helper variables to clean up code

This is in preparation of larger changes in hostapd_update_wps() to keep
the commits more readable.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
4 years agowpa_supplicant: Configurable fast-associate timer threshold
Mikael Kanstrup [Wed, 4 Nov 2020 09:30:27 +0000 (10:30 +0100)] 
wpa_supplicant: Configurable fast-associate timer threshold

For Android the default value of 5 seconds is usually too short for
scan results from last scan initiated from settings app to be
considered for fast-associate. Make the fast-associate timer value
configurable so that a suitable value can be set based on a systems
regular scan interval.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sony.com>
4 years agowpa_supplicant: Notify freq change on CH_SWITCH
Arowa Suliman [Tue, 3 Nov 2020 19:20:01 +0000 (11:20 -0800)] 
wpa_supplicant: Notify freq change on CH_SWITCH

wpa_supplicant does not send a D-Bus notification of the BSS frequency
change when a CSA happens. Sending a PropertyChanged signal with the
updated frequency will notify the network manager quickly, instead of
waiting for the next scan results.

Signed-off-by: Arowa Suliman <arowa@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>