]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
6 years agoDPP: Clear dpp_listen_freq on remain-on-channel failure
Jouni Malinen [Wed, 30 Jan 2019 10:28:43 +0000 (12:28 +0200)] 
DPP: Clear dpp_listen_freq on remain-on-channel failure

If the DPP_LISTEN command failed due to the driver rejecting the
remain-on-channel request, wpa_s->dpp_listen_freq was left set to the
requested listen frequency and this resulted in the next DPP_LISTEN for
the same frequency reporting "DPP: Already listening on .." even when
the driver was not really listening on that frequency. Fix this by
clearing wpa_s->dpp_listen_freq in the error case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoP2P: Allow the avoid channels for P2P discovery/negotiation
Purushottam Kushwaha [Fri, 28 Dec 2018 12:42:00 +0000 (18:12 +0530)] 
P2P: Allow the avoid channels for P2P discovery/negotiation

The avoid channels are notified through
QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY allow minimal traffic, so
enhance the P2P behavior accordingly by considering these avoid
frequencies for P2P discovery/negotiation as long as they are not in
disallowed frequencies list.

Additionally, do not return failure when none of social channels are
available as operation channel, rather, mark the op_channel/op_reg_class
to 0 as this would anyway get selected during the group formation in
p2p_prepare_channel.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: WNM-Sleep Mode Request bounds checking for empty contents
Jouni Malinen [Mon, 29 Oct 2018 19:10:27 +0000 (21:10 +0200)] 
tests: WNM-Sleep Mode Request bounds checking for empty contents

The wnm_sleep_mode_proto test case was already covering number of
invalid WNM-Sleep Mode Request frame cases, but it was missing the
shortest possible case with a missing Dialog Token field. Add that as a
regression test case for bounds checking in
ieee802_11_rx_wnmsleep_req().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoWNM: Fix WNM-Sleep Mode Request bounds checking
Jouni Malinen [Mon, 29 Oct 2018 18:48:07 +0000 (20:48 +0200)] 
WNM: Fix WNM-Sleep Mode Request bounds checking

ieee802_11_rx_wnmsleep_req() might have been called for a short frame
that has no more payload after the Public Action field, i.e., with len
== 0. The bounds checking for the payload length was done only for the
information elements while the one octet Dialog Token field was read
unconditionally. In the original implementation, this could have
resulted in reading one octet beyond the end of the received frame data.

This case has not been reachable after the commit e0785ebbbd18 ("Use
more consistent Action frame RX handling in both AP mode paths"), but it
is better to address the specific issue in ieee802_11_rx_wnmsleep_req()
as well for additional protection against accidential removal of the
check and also to have something that can be merged into an older
version (pre-v2.7) if desired. The comments below apply for such older
versions where the case could have been reachable.

Depending on driver interface specific mechanism used for fetching the
frame, this could result in reading one octet beyond the end of a
stack/hash buffer or reading an uninitialized octet from within a
buffer. The actual value that was read as the Dialog Token field is not
used since the function returns immediately after having read this value
when there is no information elements following the field.

This issue was initially added in commit d32d94dbf47a ("WNM: Add
WNM-Sleep Mode implementation for AP") (with CONFIG_IEEE80211V=y build
option) and it remained in place during number of cleanup and fix
changes in this area and renaming of the build parameter to
CONFIG_WNM=y. The impacted function was not included in any default
build without one of the these optional build options being explicitly
enabled. CONFIG_WNM=y is still documented as "experimental and not
complete implementation" in hostapd/defconfig. In addition, commit
114f2830d2c2 ("WNM: Ignore WNM-Sleep Mode Request in wnm_sleep_mode=0
case") made this function exit before the impact read if WNM-Sleep Mode
support was not explicitly enabled in runtime configuration
(wnm_sleep_mode=1 in hostapd.conf). Commit e0785ebbbd18 ("Use more
consistent Action frame RX handling in both AP mode paths") made this
code unreachable in practice.

Add an explicit check that the frame has enough payload before reading
the Dialog Token field in ieee802_11_rx_wnmsleep_req().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: EAP-TLS and server reloading CRL from ca_cert
Jouni Malinen [Sun, 27 Jan 2019 16:48:16 +0000 (18:48 +0200)] 
tests: EAP-TLS and server reloading CRL from ca_cert

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agocrl_reload_interval: Add CRL reloading support
Jared Bents [Wed, 16 Jan 2019 15:15:01 +0000 (09:15 -0600)] 
crl_reload_interval: Add CRL reloading support

This patch adds a new flag 'crl_reload_interval' to reload CRL
periodically. This can be used to reload ca_cert file and the included
CRL information on every new TLS session if difference between the last
reload and the current time in seconds is greater than
crl_reload_interval.

This reloading is used for cases where check_crl is 1 or 2 and the CRL
is included in the ca_file.

Signed-off-by: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>
Signed-off-by: Jared Bents <jared.bents@rockwellcollins.com>
6 years agotests: WPA2-PSK AP with PSK from a file (keyid and reload)
Jouni Malinen [Sat, 26 Jan 2019 15:42:15 +0000 (17:42 +0200)] 
tests: WPA2-PSK AP with PSK from a file (keyid and reload)

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoAP: Add wpa_psk_file reloading in runtime
Michal Kazior [Wed, 16 Jan 2019 12:35:20 +0000 (13:35 +0100)] 
AP: Add wpa_psk_file reloading in runtime

The wpa_psk_file can now be modified and hostapd can be told to re-read
it with the control interface RELOAD_WPA_PSK command:

 $ hostapd_cli reload_wpa_psk

It must be noted special care must be taken if WPS is configured
(wps_state=2, eap_server=1) because WPS appends PMKs to the
wpa_psk_file.

Signed-off-by: Michal Kazior <michal@plume.com>
6 years agoAP: Allow identifying which passphrase station used with wpa_psk_file
Michal Kazior [Wed, 16 Jan 2019 12:35:19 +0000 (13:35 +0100)] 
AP: Allow identifying which passphrase station used with wpa_psk_file

It is now possible to optionally specify keyid for
each wpa_psk_file entry:

 keyid=something 00:00:00:00:00:00 secretpassphrase

When station connects and the passphrase it used
has an associated keyid it will be appended to the
AP-STA-CONNECTED event string:

 wlan0: AP-STA-CONNECTED 00:36:76:21:dc:7b keyid=something

It's also possible to retrieve it through the control interface:

 $ hostapd_cli all_sta
 Selected interface 'ap0'
 00:36:76:21:dc:7b
 ...
 keyid=something

New hostapd is able to read old wpa_psk_file. However, old hostapd will
not be able to read the new wpa_psk_file if it includes keyids.

Signed-off-by: Michal Kazior <michal@plume.com>
6 years agoAP: Expose PMK outside of wpa_auth module
Michal Kazior [Wed, 16 Jan 2019 12:35:18 +0000 (13:35 +0100)] 
AP: Expose PMK outside of wpa_auth module

This doesn't change any behavior on its own. It's going to be used to
expose per-station keyids and allow reloading passphrases in runtime.

Signed-off-by: Michal Kazior <michal@plume.com>
6 years agotests: Modify pmksa_cache test sets for python3
Masashi Honma [Thu, 24 Jan 2019 07:46:19 +0000 (16:46 +0900)] 
tests: Modify pmksa_cache test sets for python3

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Modify ocv test sets for python3
Masashi Honma [Thu, 24 Jan 2019 07:46:15 +0000 (16:46 +0900)] 
tests: Modify ocv test sets for python3

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: ap_eap test requires more memory in VM
Masashi Honma [Thu, 24 Jan 2019 07:45:54 +0000 (16:45 +0900)] 
tests: ap_eap test requires more memory in VM

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Python3 does not allow mixed indentation
Masashi Honma [Thu, 24 Jan 2019 07:45:49 +0000 (16:45 +0900)] 
tests: Python3 does not allow mixed indentation

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Remove deprecated statement for python3 compatibility
Masashi Honma [Thu, 24 Jan 2019 07:45:48 +0000 (16:45 +0900)] 
tests: Remove deprecated statement for python3 compatibility

This patch is made by using 2to3 command.

find . -name *.py | xargs 2to3 -f future -w -n

This was not really needed in this file for python2 compatibility.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Use int instead of long for python3 compatibility
Masashi Honma [Thu, 24 Jan 2019 07:45:47 +0000 (16:45 +0900)] 
tests: Use int instead of long for python3 compatibility

This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f long -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Use python3 compatible raise statement
Masashi Honma [Thu, 24 Jan 2019 07:45:46 +0000 (16:45 +0900)] 
tests: Use python3 compatible raise statement

This patch is made by using 2to3 command.

find . -name *.py | xargs 2to3 -f raise -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Use python3 compatible function attribute
Masashi Honma [Thu, 24 Jan 2019 07:45:45 +0000 (16:45 +0900)] 
tests: Use python3 compatible function attribute

This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f funcattrs -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Use python3 compatible range operation
Masashi Honma [Thu, 24 Jan 2019 07:45:44 +0000 (16:45 +0900)] 
tests: Use python3 compatible range operation

This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f xrange -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Use python3 compatible dict operation
Masashi Honma [Thu, 24 Jan 2019 07:45:43 +0000 (16:45 +0900)] 
tests: Use python3 compatible dict operation

This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f dict -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Use python3 compatible print statement
Masashi Honma [Thu, 24 Jan 2019 07:45:42 +0000 (16:45 +0900)] 
tests: Use python3 compatible print statement

This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f print -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agotests: Use python3 compatible "except" statement
Masashi Honma [Thu, 24 Jan 2019 07:45:41 +0000 (16:45 +0900)] 
tests: Use python3 compatible "except" statement

This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f except -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agoWrite multi_ap_backhaul_sta to wpa_supplicant config
Daniel Golle [Wed, 23 Jan 2019 05:18:25 +0000 (06:18 +0100)] 
Write multi_ap_backhaul_sta to wpa_supplicant config

The network configration option multi_ap_backhaul_sta was added without
adding it to wpa_config_write_network(). Hence the value of this option
was not included when writing the configuration file. Fix this by
including it in wpa_config_write_network().

Fixes: 5abc7823b ("wpa_supplicant: Add Multi-AP backhaul STA support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agodbus: Document more possible BSS/RSA/KeyMgmt values
Lubomir Rintel [Wed, 23 Jan 2019 09:38:49 +0000 (10:38 +0100)] 
dbus: Document more possible BSS/RSA/KeyMgmt values

This is probably not ideal, since it would be better if it ended up
being autogenerated somehow, but at least it's somewhat of an
improvement.

Also added a comment that encourages keeping the docs in sync.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
6 years agoCheck supported types in wpas_mac_addr_rand_scan_set()
Lior David [Mon, 21 Jan 2019 16:28:42 +0000 (18:28 +0200)] 
Check supported types in wpas_mac_addr_rand_scan_set()

When setting scan with randomized MAC, check the requested scan type
against supported types, to ensure callers will not set an unsupported
type, since this can cause scan/connect failures later. It is better to
do this in wpas_mac_addr_rand_scan_set() instead of control interface
specific code to apply the constraint on all possible interfaces using
this setting.

Signed-off-by: Lior David <liord@codeaurora.org>
6 years agoFix test compilation error related to sme_event_unprot_disconnect()
Lior David [Tue, 22 Jan 2019 15:24:35 +0000 (17:24 +0200)] 
Fix test compilation error related to sme_event_unprot_disconnect()

sme_event_unprot_disconnect() is only defined with CONFIG_IEEE80211W, so
the CONFIG_TESTING_OPTIONS command UNPROT_DEAUTH can be defined only
with builds that enable IEEE 802.11w support.

Signed-off-by: Lior David <liord@codeaurora.org>
6 years agotests: SAE and password identifier (exclusively)
Jouni Malinen [Wed, 23 Jan 2019 22:01:17 +0000 (00:01 +0200)] 
tests: SAE and password identifier (exclusively)

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoSAE: Advertise Password Identifier use
Jouni Malinen [Wed, 23 Jan 2019 22:00:28 +0000 (00:00 +0200)] 
SAE: Advertise Password Identifier use

Support the new Extended Capabilities field bits 81 and 82 to indicate
whether SAe Password Identifiers are in use.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoHS 2.0 server: Command line option to fetch the version information
Jouni Malinen [Wed, 23 Jan 2019 10:34:57 +0000 (12:34 +0200)] 
HS 2.0 server: Command line option to fetch the version information

This can be used to report automatically generated version strings from
the SPP server.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoHS 2.0 server: Alternative subrem updateNode for certificate credentials
Jouni Malinen [Tue, 22 Jan 2019 23:03:46 +0000 (01:03 +0200)] 
HS 2.0 server: Alternative subrem updateNode for certificate credentials

The new subrem field in the users database can now be used to issue an
alternative subscription remediation updateNode for clients using
certificate credentials. The data file for this case is similar to the
policy update files, but it starts with the managementTreeURI value in
the first line.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoHS 2.0 server: Use noMOUpdate in client certificate subrem
Jouni Malinen [Tue, 22 Jan 2019 21:31:06 +0000 (23:31 +0200)] 
HS 2.0 server: Use noMOUpdate in client certificate subrem

There is no point in trying to update the Credential node with the
existing contents in case of subscription remediation using a client
certificate instead of a username/password credential, so use the
noMOUpdate in that case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoFILS: Remove notes about experimental implementation
Jouni Malinen [Tue, 22 Jan 2019 11:33:48 +0000 (13:33 +0200)] 
FILS: Remove notes about experimental implementation

The standard amendment has been published and there has been sufficient
amount of interoperability testing for FILS to expect the protocol not
to be changed anymore, so remove the notes claiming this to be
experimental and not suitable for production use.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Update README to refer to parallel-vm.py
Jouni Malinen [Tue, 22 Jan 2019 11:27:31 +0000 (13:27 +0200)] 
tests: Update README to refer to parallel-vm.py

parallel-vm.sh was removed earlier.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agodbus: Expose support of SAE key management in BSS properties
Lubomir Rintel [Tue, 22 Jan 2019 08:36:12 +0000 (09:36 +0100)] 
dbus: Expose support of SAE key management in BSS properties

This is going to be useful for NetworkManager and likely others.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
6 years agoRevert "mesh: Apply channel attributes before setup interface"
Masashi Honma [Tue, 15 Jan 2019 11:43:41 +0000 (20:43 +0900)] 
Revert "mesh: Apply channel attributes before setup interface"

This reverts commit 2564184440d9d6041d11a8c7d50b31368634c3bd.

Commit 2564184440d9 ("mesh: Apply channel attributes before setup
interface") triggers some channel configurations to result in leaking
memory. This seems to be caused by hapd->started not getting set when
going through a callback to start hostapd operation (e.g., when using
HT40 coex scan) due to hostapd_setup_bss() not getting called. This
results in hostapd_free_hapd_data() not clearing allocated
hapd->wpa_auth. This can be reproduced with the hwsim test case
mesh_secure_ocv_mix_legacy.

A more complete cleanup of the pending mesh patch for DFS support seems
to be needed to fix this properly, so the best approach for now is to
revert this patch and bring it back once rest of the mesh changes are
ready to be applied.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
6 years agohostapd: Add support for setting pbss option from config file
Ian Archer [Fri, 18 Jan 2019 12:40:15 +0000 (12:40 +0000)] 
hostapd: Add support for setting pbss option from config file

There is currently no support for setting hostapd_bss_config.pbss from a
config file, i.e., it was used only based on automatic logic in
wpa_supplicant. This patch adds a key naturally called "pbss" which can
be used to set it.

Cc: Antony King <antony.king@bluwirelesstechnology.com>
Signed-off-by: Brendan Jackman <brendan.jackman@bluwirelesstechnology.com>
6 years agoD-Bus: Fix P2P Flush method to clear pending Action frames
Amit Khatri [Wed, 16 Jan 2019 17:46:46 +0000 (23:16 +0530)] 
D-Bus: Fix P2P Flush method to clear pending Action frames

If we call p2p_flush from ctrl_iface, before calling p2p_flush() it
calls wpas_p2p_stop_find(). Add the same call to the matching D-Bus
method to clear all pending operations.

Signed-off-by: Amit Khatri <amit7861234@gmail.com>
6 years agoAdd a vendor attribution to transfer EVM information
stonez [Thu, 17 Jan 2019 05:50:26 +0000 (13:50 +0800)] 
Add a vendor attribution to transfer EVM information

This new QCA vendor attribute indicates the EVM value in netlink.

Signed-off-by: stonez <stonez@codeaurora.org>
:100644 100644 ad5dac2... ede4fc8... M src/common/qca-vendor.h

6 years agotests: wpa_supplicant config parsing and storing for new variables
Jouni Malinen [Sat, 12 Jan 2019 17:21:45 +0000 (19:21 +0200)] 
tests: wpa_supplicant config parsing and storing for new variables

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: P2P group formation with random interface addresses
Jouni Malinen [Sat, 12 Jan 2019 17:18:02 +0000 (19:18 +0200)] 
tests: P2P group formation with random interface addresses

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoP2P: support random interface address
Jimmy Chen [Thu, 29 Nov 2018 08:46:43 +0000 (16:46 +0800)] 
P2P: support random interface address

To enhance privacy, generate a random interface for each group.

There are two configurations are introduced:
* p2p_interface_random_mac_addr
  enable interface random MAC address feature, default disable.

Signed-off-by: Jimmy Chen <jimmycmchen@google.com>
6 years agoP2P: Support random device address
Jimmy Chen [Tue, 13 Nov 2018 07:19:57 +0000 (15:19 +0800)] 
P2P: Support random device address

To enhance privacy, generate a random device address for P2P interface.
If there is no saved persistent group, it generate a new random MAC
address on bringing up p2p0. If there is saved persistent group, it will
use last MAC address to avoid breaking group reinvoke behavior.

There are two configurations are introduced:
* p2p_device_random_mac_addr
  enable device random MAC address feature, default disable.
* p2p_device_persistent_mac_addr
  store last used random MAC address.

Signed-off-by: Jimmy Chen <jimmycmchen@google.com>
6 years agotests: start.sh: fix logs/current symlink creation
Arnout Vandecappelle (Essensium/Mind) [Wed, 9 Jan 2019 12:34:11 +0000 (13:34 +0100)] 
tests: start.sh: fix logs/current symlink creation

Since 3bdc651a624, start.sh creates the logs/current symlink even if
LOGDIR was set in the environment, as is the case when using run-all.sh.
However, run-all.sh and start.sh use a separate 'date' invocation so the
resulting string may be different. Usually it is the same because the
two invocations immediately follow each other, *except* if run-all.sh
also does a build. In addition, if the user sets LOGDIR to something
else, the symlink is completely bogus.

Fix this by not relying on the 'date' invocation for creating the
symlink. Instead, use the basename of LOGDIR. To keep things consistent
with current behavior, only create the symlink if LOGDIR points to a
subdirectory of DIR/logs.

The following use cases now work reliably:
* run-all.sh with or without the -B option;
* manually calling start.sh followed by run-tests.py without setting
  LOGDIR.
* manually calling start.sh with LOGDIR set to a subdirectory of logs
  and calling run-tests.py without --logdir option (which makes it
  default to logs/current).
* run-all.sh with LOGDIR set to a subdirectory of logs.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
6 years agotests: Build with various LibreSSL and OpenSSL versions
Jouni Malinen [Sat, 12 Jan 2019 15:32:15 +0000 (17:32 +0200)] 
tests: Build with various LibreSSL and OpenSSL versions

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoFix build with LibreSSL
Stefan Strogin [Wed, 9 Jan 2019 11:19:53 +0000 (13:19 +0200)] 
Fix build with LibreSSL

When using LibreSSL build fails with:

../src/crypto/tls_openssl.o: in function `tls_connection_client_cert':
../src/crypto/tls_openssl.c:2817: undefined reference to `SSL_use_certificate_chain_file'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1901: wpa_supplicant] Error 1

There is no such function in LibreSSL.

Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
6 years agoP2P: Add 802.11ax support for P2P GO
Peng Xu [Fri, 21 Dec 2018 18:20:28 +0000 (10:20 -0800)] 
P2P: Add 802.11ax support for P2P GO

An optional parameter "he" is added to p2p_connect, p2p_group_add, and
p2p_invite to enable 11ax HE support. The new p2p_go_he=1 configuration
parameter can be used to request this to be enabled by default.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoClarify documentation of avoid channels expectations
Sunil Dutt [Tue, 8 Jan 2019 12:21:23 +0000 (17:51 +0530)] 
Clarify documentation of avoid channels expectations

The vendor command QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY was defined
to carry the list of avoid frequencies that aim to avoid any
interference with other coexistencies. This recommendation was followed
strictly by trying to prevent WLAN traffic on the impacted channels.

This commit refines the expectation of the interface by defining this
avoid channel list to allow minimal traffic but not heavier one. For
example, P2P may still be able to use avoid list frequencies for P2P
discovery and GO negotiation if the actual group can be set up on a not
impact channel.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoHS 2.0 server: Log new username in eventlog for cert reenroll
Jouni Malinen [Wed, 9 Jan 2019 22:47:04 +0000 (00:47 +0200)] 
HS 2.0 server: Log new username in eventlog for cert reenroll

Make it easier to find the new username (and the new serial number from
it) when a user entry is renamed at the conclusion of client certificate
re-enrollment sequence.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoHE: Add MU EDCA Parameter Set element (AP)
Siva Mullati [Mon, 7 Jan 2019 09:26:24 +0000 (14:56 +0530)] 
HE: Add MU EDCA Parameter Set element (AP)

Add support for configuring parameters for the MU EDCA Parameter Set
element per IEEE P802.11ax/D3.0.

Signed-off-by: Siva Mullati <siva.mullati@intel.com>
6 years agoeapol_test: Start the identifier at an initial random value
Martin Stanislav [Mon, 1 Oct 2018 14:59:03 +0000 (16:59 +0200)] 
eapol_test: Start the identifier at an initial random value

Start the (EAP request) identifier at an initial random value
as recommended by RFC 3748 in section 4.1 Request and Response
on page 21.

Signed-off-by: Martin Stanislav <ms@uakom.sk>
6 years agodrivers: Set CONFIG_LIBNL32=y automatically based on pkg-config
Jouni Malinen [Tue, 8 Jan 2019 11:31:55 +0000 (13:31 +0200)] 
drivers: Set CONFIG_LIBNL32=y automatically based on pkg-config

If the libnl version is not specified explicitly with CONFIG_LIBNL*, try
to check for the most likely case today with pkg-config.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agodrivers: Move libnl related build flags to separate ifdef block
Andrey Kartashev [Fri, 14 Sep 2018 09:17:29 +0000 (11:17 +0200)] 
drivers: Move libnl related build flags to separate ifdef block

Fix compilation issue if we want to build wpa_supplicant without any
wireless connectivity but only with MACSec support via Linux kernel
driver.

Signed-off-by: Andrey Kartashev <a.s.kartashev@gmail.com>
6 years agomka: New MI should only be generated when peer's key is invalid
Mike Siedzik [Tue, 8 Jan 2019 03:49:54 +0000 (22:49 -0500)] 
mka: New MI should only be generated when peer's key is invalid

Two recent changes to MKA create a situation where a new MI is generated
every time a SAK Use parameter set is decoded.  The first change moved
invalid key detection from ieee802_1x_decode_basic_body() to
ieee802_1x_kay_decode_mpkdu():

  commit db9ca18bbff1 ("mka: Do not ignore MKPDU parameter set decoding failures")

The second change forces the KaY to generate a new MI when an invalid
key is detected:

  commit a8aeaf41df95 ("mka: Change MI if key invalid")

The fix is to move generation of a new MI from the old invalid key
detection location to the new location.

Fixes: a8aeaf41df95 ("mka: Change MI if key invalid")
Signed-off-by: Michael Siedzik <msiedzik@extremenetworks.com>
6 years agonl80211: Indicate 802.1X 4-way handshake offload in connect
Arend van Spriel [Mon, 7 Jan 2019 11:14:41 +0000 (12:14 +0100)] 
nl80211: Indicate 802.1X 4-way handshake offload in connect

Upon issuing a connect request we need to indicate that we want the
driver to offload the 802.1X 4-way handshake for us. Indicate it if
the driver capability supports the offload.

Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
6 years agodrivers: Add separate driver flags for 802.1X and PSK 4-way HS offloads
Arend van Spriel [Mon, 7 Jan 2019 11:14:40 +0000 (12:14 +0100)] 
drivers: Add separate driver flags for 802.1X and PSK 4-way HS offloads

Allow drivers to indicate support for offloading 4-way handshake for
either IEEE 802.1X (WPA2-Enterprise; EAP) and/or WPA/WPA2-PSK
(WPA2-Personal) by splitting the WPA_DRIVER_FLAGS_4WAY_HANDSHAKE flag
into two separate flags.

Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
6 years agotests: DFS CAC interrupted and restarted
Jouni Malinen [Mon, 7 Jan 2019 22:36:07 +0000 (00:36 +0200)] 
tests: DFS CAC interrupted and restarted

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoDFS: Restart pending CAC on interface enable
Zefir Kurtisi [Mon, 7 Jan 2019 10:58:08 +0000 (11:58 +0100)] 
DFS: Restart pending CAC on interface enable

When an interface is re-enabled after it was disabled during CAC, it
won't ever get active since hostapd is waiting for a CAC_FINISHED while
kernel side is waiting for a CMD_RADAR_DETECT to start a CAC.

This commit checks for a pending CAC when an interface is enabled and if
so restarts its DFS processing.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
6 years agotests: Supported operating classes with constraints
Jouni Malinen [Mon, 7 Jan 2019 22:17:32 +0000 (00:17 +0200)] 
tests: Supported operating classes with constraints

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoUse freq_list to constrain supported operating class information
Ben Greear [Fri, 24 Aug 2018 19:01:28 +0000 (12:01 -0700)] 
Use freq_list to constrain supported operating class information

If a station is configured to allow only a subset of frequencies for an
association, the supported operating classes may need to be more limited
than what the hardware supports.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agoUse disable_ht/vht to constrain supported operating class information
Ben Greear [Fri, 24 Aug 2018 20:27:44 +0000 (13:27 -0700)] 
Use disable_ht/vht to constrain supported operating class information

If user has disabled HT or VHT, those related operating classes
should not be advertised as supported.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agoRADIUS client: Cease endless retry for message for multiple servers
Bo Chen [Thu, 10 May 2018 07:48:41 +0000 (07:48 +0000)] 
RADIUS client: Cease endless retry for message for multiple servers

In the previous RADIUS client implementation, when there are multiple
RADIUS servers, we kept trying the next server when the current message
can not be acked. It leads to endless retry when all the RADIUS servers
are down.

Fix this by keeping a counter for the accumulated retransmit attempts
for the message, and guarantee that after all the servers failover
RADIUS_CLIENT_MAX_FAILOVER times the message will be dropped.

Another issue with the previous code was that the decision regarding
whether the server should fail over was made immediately after we send
out the message. This patch guarantees we consider whether a server
needs failover after pending ack times out.

Signed-off-by: Bo Chen<bochen@meraki.com>
6 years agotests: Remove MIB counter check from radius_auth_unreachable2
Jouni Malinen [Mon, 7 Jan 2019 21:37:15 +0000 (23:37 +0200)] 
tests: Remove MIB counter check from radius_auth_unreachable2

This is in preparation for an implementation change that results in this
unreachable server case not incrementing radiusAuthClientAccessRequests.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoQCA vendor commands to configure HE +HTC capability and OM control Tx
Kiran Kumar Lokere [Wed, 19 Dec 2018 00:23:28 +0000 (16:23 -0800)] 
QCA vendor commands to configure HE +HTC capability and OM control Tx

Define QCA vendor command attributes to configure HE +HTC support and
HE operating mode control transmission. This is used to configure the
testbed device.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agoAvoid forward references to enum types in ieee802_11_common.h
Jouni Malinen [Mon, 7 Jan 2019 15:26:40 +0000 (17:26 +0200)] 
Avoid forward references to enum types in ieee802_11_common.h

These are not allowed in ISO C++ (and well, not really in ISO C either,
but that does not result in compiler warning without pedantic
compilation).

Since ieee802_11_common.h may end up getting pulled into C++ code for
some external interfaces, it is more convenient to keep it free of these
cases. Pull in ieee802_11_defs.h to get enum phy_type defined and move
enum chan_width to common/defs.h (which was already pulled in into
src/drivers/driver.h and src/common/ieee802_11_common.h).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
6 years agotests: Reduce mesh result code duplication with helper functions
Jouni Malinen [Sun, 6 Jan 2019 22:25:08 +0000 (00:25 +0200)] 
tests: Reduce mesh result code duplication with helper functions

These checks were repeated in almost every test case, so use helper
functions to get rid of duplicated (copy-pasted) code.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Mesh with VHT20 and VHT40
Jouni Malinen [Sun, 6 Jan 2019 22:01:23 +0000 (00:01 +0200)] 
tests: Mesh with VHT20 and VHT40

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agomesh: Implement use of VHT20 config in mesh mode
Peter Oh [Wed, 18 Apr 2018 21:14:19 +0000 (14:14 -0700)] 
mesh: Implement use of VHT20 config in mesh mode

Mesh in VHT mode is supposed to be able to use any bandwidth that VHT
supports, but there was no way to set VHT20 although there are
parameters that are supposed to be used. This commit along then previous
commit for VHT_CHANWIDTH_USE_HT makes mesh configuration available to
use any bandwidth with combinations of existing parameters like shown
below.

VHT80:
  default
  do not set any parameters
VHT40:
  max_oper_chwidth = 0
VHT20:
  max_oper_chwidth = 0
  disable_ht40 = 1
HT40:
  disable_vht = 1
HT20:
  disable_ht40 = 1
disable HT:
  disable_ht = 1

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agomesh: Add VHT_CHANWIDTH_USE_HT to max_oper_chwidth
Peter Oh [Wed, 18 Apr 2018 21:14:18 +0000 (14:14 -0700)] 
mesh: Add VHT_CHANWIDTH_USE_HT to max_oper_chwidth

Channel width in VHT mode refers HT capability when the width goes down
to below 80 MHz, hence add checking HT channel width to its max
operation channel width. So that mesh has capability to select bandwidth
below 80 MHz.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
6 years agotests: WPA2-PSK+FT AP and workaround for incorrect STA behavior
Jouni Malinen [Sun, 6 Jan 2019 19:20:34 +0000 (21:20 +0200)] 
tests: WPA2-PSK+FT AP and workaround for incorrect STA behavior

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agohostapd: Work around an interop connection issue in FT-PSK + WPA-PSK
Janusz Dziedzic [Mon, 5 Mar 2018 14:37:10 +0000 (15:37 +0100)] 
hostapd: Work around an interop connection issue in FT-PSK + WPA-PSK

While the AP is configured to enable both FT-PSK and WPA-PSK, an HP
printer request both AKMs (copied from AP?) in Association Request
frame, but don't add MDIE and don't use FT. This results in the
connection failing.

Next in logs we see:

RSN: Trying to use FT, but MDIE not included
IE - hexdump(len=26): 30 18 01 00 00 0f ac 04 01 00 00 0f ac 04
                      02 00 00 0f ac 02 00 0f ac 04 00 00

This is seen with some HP and Epson printers. Work around this by
stripping FT AKM(s) when MDE is not present and there is still a non-FT
AKM available.

Signed-off-by: Janusz Dziedzic <janusz@plumewifi.com>
6 years agotests: disable_sgi with VHT
Jouni Malinen [Sun, 6 Jan 2019 18:51:32 +0000 (20:51 +0200)] 
tests: disable_sgi with VHT

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agowpa_supplicant: Allow disabling VHT SGI capability
Ben Greear [Wed, 28 Feb 2018 21:50:48 +0000 (13:50 -0800)] 
wpa_supplicant: Allow disabling VHT SGI capability

This provides similar features to what was already available for HT
overrides. Probe Request frames look correct, and VHT capabilities shown
in debugfs look as expected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years agoUse lchown() instead of chown() for self-created files
Jouni Malinen [Sun, 6 Jan 2019 18:28:04 +0000 (20:28 +0200)] 
Use lchown() instead of chown() for self-created files

There is no need to allow symlink dereferencing in these cases where a
file (including directories and sockets) are created by the same
process, so use the safer lchown() variant to avoid leaving potential
windows for something external to replace the file before the chown()
call. The particular locations used here should not have write
permissions enabled for processes with less privileges, so this may not
be needed, but anyway, it is better to make these more restrictive
should there be cases where directory permissions are not as expected
for a good deployment.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoAndroid: Harden wpa_ctrl_open2() against potential race conditions
Jouni Malinen [Sun, 6 Jan 2019 18:01:09 +0000 (20:01 +0200)] 
Android: Harden wpa_ctrl_open2() against potential race conditions

The Android-specific chmod and chown operations on the client socket
(for communication with wpa_supplicant) did not protect against file
replacement between the bind() and chmod()/chown() calls. If the
directory in which the client socket is created (depends a bit on the
version and platform, but /data/misc/wifi/sockets is commonly used)
allows write access to processes that are different (less privileged)
compared to the process calling wpa_ctrl_open2(), it might be possible
to delete the socket file and replace it with something else (mainly, a
symlink) before the chmod/chown operations occur. This could have
resulted in the owner or permissions of the target of that symlink being
modified.

In general, it would be safest to use a directory which has more limited
write privileges (/data/misc/wifi/sockets normally has 'wifi' group
(AID_WIFI) with write access), but if that cannot be easily changed due
to other constraints, it is better to make wpa_ctrl_open2() less likely
to enable this type of race condition between the operations.

Replace chown() with lchown() (i.e., a version that does not dereference
symlinks) and chmod() with fchmod() on the socket before the bind() call
which is also not going to dereference a symlink (whereas chmod()
would). lchown() is a standard operation, but the fchmod() on the socket
is less so (unspecified behavior in some systems). However, it seems to
work on Linux and in particular, on Android, where this code is
executed.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: More workarounds for cfg80211 regulatory state clearing (ap_open)
Jouni Malinen [Sun, 6 Jan 2019 11:21:19 +0000 (13:21 +0200)] 
tests: More workarounds for cfg80211 regulatory state clearing (ap_open)

Add even more workarounds for cfg80211 regulatory state clearing since
these DFS test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: More workarounds for cfg80211 regulatory state clearing (DFS)
Jouni Malinen [Sun, 6 Jan 2019 10:28:11 +0000 (12:28 +0200)] 
tests: More workarounds for cfg80211 regulatory state clearing (DFS)

Add even more workarounds for cfg80211 regulatory state clearing since
these DFS test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoDFS: Add supported channel bandwidth checking
Dmitry Lebed [Thu, 1 Mar 2018 11:49:29 +0000 (14:49 +0300)] 
DFS: Add supported channel bandwidth checking

While selecting a new channel as a reaction to radar event we need to
take into account supported bandwidth for each channel provided via
nl80211. Without this modification hostapd might select an unsupported
channel that would fail during AP startup.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
6 years agoACS: Add supported channel bandwidth checking
Dmitry Lebed [Thu, 1 Mar 2018 11:49:28 +0000 (14:49 +0300)] 
ACS: Add supported channel bandwidth checking

While doing automatic channel selection we need to take into account
supported bandwidth for each channel provided via nl80211. Without this
modification hostapd might select an unsupported channel which would
fail during AP startup.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
6 years agohostapd: Add supported channel bandwidth checking infrastructure
Dmitry Lebed [Thu, 1 Mar 2018 11:49:27 +0000 (14:49 +0300)] 
hostapd: Add supported channel bandwidth checking infrastructure

This adds checks to common code to verify supported bandwidth options
for each channel using nl80211-provided info. No support of additional
modes is added, just additional checks. Such checks are needed because
driver/hardware can declare more strict limitations than declared in the
IEEE 802.11 standard. Without this patch hostapd might select
unsupported channel and that will fail because Linux kernel does check
channel bandwidth limitations.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
6 years agonl80211: Add supported bandwidth parsing
Dmitry Lebed [Thu, 1 Mar 2018 11:49:26 +0000 (14:49 +0300)] 
nl80211: Add supported bandwidth parsing

Add NL80211_FREQUENCY_ATTR_NO_* channel attributes parsing. This is
needed for correct checking if channel is available in a particular
bandwidth.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
6 years agotests: ACS for 160 MHz channel
Jouni Malinen [Sat, 5 Jan 2019 23:45:26 +0000 (01:45 +0200)] 
tests: ACS for 160 MHz channel

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoACS: Add support for 160 MHz bandwidth
Dmitry Lebed [Tue, 27 Feb 2018 20:40:52 +0000 (23:40 +0300)] 
ACS: Add support for 160 MHz bandwidth

Add support for 160 MHz BW channels to automatic channel selection
algorithm. Only 36 and 100 channels are supported as 160 MHz channels.

Signed-off-by: Dmitry Lebed <lebed.dmitry@gmail.com>
6 years agotests: More workarounds for cfg80211 regulatory state clearing (WNM)
Jouni Malinen [Sat, 5 Jan 2019 20:06:03 +0000 (22:06 +0200)] 
tests: More workarounds for cfg80211 regulatory state clearing (WNM)

Add even more workarounds for cfg80211 regulatory state clearing since
these WNM test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agodbus: Fix build without CONFIG_WNM=y
Jouni Malinen [Sat, 5 Jan 2019 16:42:22 +0000 (18:42 +0200)] 
dbus: Fix build without CONFIG_WNM=y

wpa_s->bss_tm_status is within #ifdef CONFIG_WNM, so need to access it
through matching condition.

Fixes: 80d06d0ca9f3 ("dbus: Export BSS Transition Management status")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoEAP-TLS: Update Session-Id derivation with TLS v1.3
Jouni Malinen [Sat, 5 Jan 2019 16:00:26 +0000 (18:00 +0200)] 
EAP-TLS: Update Session-Id derivation with TLS v1.3

Move to the version used in draft-ietf-emu-eap-tls13-03.txt, i.e.,
include the 0x0D prefix and use a different TLS-Exporter() label string.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: OpenSSL systemwide policy and overrides
Jouni Malinen [Sat, 5 Jan 2019 15:02:04 +0000 (17:02 +0200)] 
tests: OpenSSL systemwide policy and overrides

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOpenSSL: Allow systemwide policies to be overridden
Jouni Malinen [Sat, 5 Jan 2019 15:02:33 +0000 (17:02 +0200)] 
OpenSSL: Allow systemwide policies to be overridden

Some distributions (e.g., Debian) have started introducting systemwide
OpenSSL policies to disable older protocol versions and ciphers
throughout all programs using OpenSSL. This can result in significant
number of interoperability issues with deployed EAP implementations.

Allow explicit wpa_supplicant (EAP peer) and hostapd (EAP server)
parameters to be used to request systemwide policies to be overridden if
older versions are needed to be able to interoperate with devices that
cannot be updated to support the newer protocol versions or keys. The
default behavior is not changed here, i.e., the systemwide policies will
be followed if no explicit override configuration is used. The overrides
should be used only if really needed since they can result in reduced
security.

In wpa_supplicant, tls_disable_tlsv1_?=0 value in the phase1 network
profile parameter can be used to explicitly enable TLS versions that are
disabled in the systemwide configuration. For example,
phase1="tls_disable_tlsv1_0=0 tls_disable_tlsv1_1=0" would request TLS
v1.0 and TLS v1.1 to be enabled even if the systemwide policy enforces
TLS v1.2 as the minimum version. Similarly, openssl_ciphers parameter
can be used to override systemwide policy, e.g., with
openssl_ciphers="DEFAULT@SECLEVEL=1" to drop from security level 2 to 1
in Debian to allow shorter keys to be used.

In hostapd, tls_flags parameter can be used to configure similar
options. E.g., tls_flags=[ENABLE-TLSv1.0][ENABLE-TLSv1.1]

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOSEN: Disable TLS v1.3 by default
Jouni Malinen [Sat, 5 Jan 2019 14:52:05 +0000 (16:52 +0200)] 
OSEN: Disable TLS v1.3 by default

TLS v1.3 was already disabled by default for EAP-FAST, EAP-TTLS,
EAP-PEAP, and EAP-TLS, but the unauthenticated client cases of EAP-TLS
-like functionality (e.g., the one used in OSEN) were missed. Address
those EAP types as well in the same way of disabling TLS v1.3 by default
for now to avoid functionality issues with TLS libraries that enable TLS
v1.3 by default.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoOpenSSL: Fix build with OpenSSL 1.0.2
Jouni Malinen [Sat, 5 Jan 2019 09:33:40 +0000 (11:33 +0200)] 
OpenSSL: Fix build with OpenSSL 1.0.2

SSL_use_certificate_chain_file() was added in OpenSSL 1.1.0, so need to
maintain the old version using SSL_use_certificate_file() for backwards
compatibility.

Fixes: 658c39809bf8 ("OpenSSL: Load chain certificates from client_cert file")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Split mbo_supp_oper_classes into multiple test cases
Jouni Malinen [Fri, 4 Jan 2019 22:21:41 +0000 (00:21 +0200)] 
tests: Split mbo_supp_oper_classes into multiple test cases

In addition, add even more workarounds for cfg80211 regulatory state
clearing since this test case seems to be the most likely one to fail
due to country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: WPA2-PSK-FT AP over DS and separate hostapd process
Jouni Malinen [Fri, 4 Jan 2019 18:35:47 +0000 (20:35 +0200)] 
tests: WPA2-PSK-FT AP over DS and separate hostapd process

This is a regression test case for FT-over-DS that got broken on
mac80211-based drivers when the extra key reinstallation checks were
added.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoFT: Allow STA entry to be removed/re-added with FT-over-the-DS
Jouni Malinen [Fri, 4 Jan 2019 20:58:56 +0000 (22:58 +0200)] 
FT: Allow STA entry to be removed/re-added with FT-over-the-DS

FT-over-the-DS has a special case where the STA entry (and as such, the
TK) has not yet been configured to the driver depending on which driver
interface is used. For that case, allow add-STA operation to be used
(instead of set-STA). This is needed to allow mac80211-based drivers to
accept the STA parameter configuration. Since this is after a new
FT-over-DS exchange, a new TK has been derived after the last STA entry
was added to the driver, so key reinstallation is not a concern for this
case.

Fixes: 0e3bd7ac684a ("hostapd: Avoid key reinstallation in FT handshake")
Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoFT: Do not try to use FT-over-air if reassociation cannot be used
Jouni Malinen [Fri, 4 Jan 2019 18:28:56 +0000 (20:28 +0200)] 
FT: Do not try to use FT-over-air if reassociation cannot be used

There is no point in going through FT authentication if the next step
would have to use association exchange which will be rejected by the AP
for FT, so only allow FT-over-air if previous BSSID is set, i.e., if
reassociation can be used.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Split ap_ft_oom into separate test cases
Jouni Malinen [Fri, 4 Jan 2019 21:19:30 +0000 (23:19 +0200)] 
tests: Split ap_ft_oom into separate test cases

ap_ft_oom seemed to depend on undesired wpa_supplicant behavior of
trying to do FT protocol even without being ready for reassociation.
This is going to be fixed in wpa_supplicant which would make this test
case fail, so split it into separate test cases for each failure item to
be able to avoid incorrect test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: Verify that roaming attempts do not get rejected
Jouni Malinen [Fri, 4 Jan 2019 18:27:40 +0000 (20:27 +0200)] 
tests: Verify that roaming attempts do not get rejected

The previous roam() and roam_over_ds() checks would have ignored failing
association rejection if a consecutive attempt to connect succeeds
within the initial time limit. This can miss incorrect behavior, so
check explicitly for association rejection.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agotests: P2PS stale group removal
Jouni Malinen [Fri, 4 Jan 2019 10:01:32 +0000 (12:01 +0200)] 
tests: P2PS stale group removal

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoP2PS: Notify D-Bus about removal of a stale/empty persistent group
Jouni Malinen [Fri, 4 Jan 2019 11:18:26 +0000 (13:18 +0200)] 
P2PS: Notify D-Bus about removal of a stale/empty persistent group

During P2PS PD Request processing wpa_supplicant removes stale and empty
persistent groups, but it did not notify D-Bus to unregister object. Fix
this by adding the missing notifications.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agoP2PS: Notify D-Bus about removal of a stale persistent group
Amit Khatri [Thu, 3 Jan 2019 15:47:26 +0000 (21:17 +0530)] 
P2PS: Notify D-Bus about removal of a stale persistent group

During P2PS PD Request processing wpa_supplicant removes stale
persistent groups, but it did not notify D-Bus to unregister object.
This can result in leaving behind objects pointing to freed memory and
memory leaks. Sometime it can cause a crash in wpa_config_get_all()
function and DBUS_ERROR_OBJECT_PATH_IN_USE errors.

Fix this by adding the missed notification to D-Bus code to unregister
the object.

Signed-off-by: Amit Khatri <amit7861234@gmail.com>
6 years agotests: Fix P2P-GROUP-STARTED event parsing for persistent groups
Jouni Malinen [Fri, 4 Jan 2019 09:44:48 +0000 (11:44 +0200)] 
tests: Fix P2P-GROUP-STARTED event parsing for persistent groups

Do not set the 'ip_addr' value from the "[PERSISTENT]" flag.

Signed-off-by: Jouni Malinen <j@w1.fi>
6 years agomesh: Consider mesh interface on DFS event handler
Peter Oh [Mon, 27 Aug 2018 21:28:44 +0000 (14:28 -0700)] 
mesh: Consider mesh interface on DFS event handler

Once mesh starts supporting DFS channels, it has to handle DFS related
events from drivers, hence add mesh interface to the check list.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>