]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
4 years agotests: Fix ap-mgmt-fuzzer build configuration to match libap.a
Jouni Malinen [Wed, 29 May 2019 10:49:21 +0000 (13:49 +0300)] 
tests: Fix ap-mgmt-fuzzer build configuration to match libap.a

Missing CONFIG_AIRTIME_POLICY=y made the offset of struct
hostapd_iface::prev_wmm different between libap.a and ap-mgmt-fuzzer.o
which resulted in odd fuzzing failures due to a memcpy to
ctx.iface->prev_wmm ending up writing on top of the ctx.hapd and in
particular, on top of ctx.hapd.iface pointer.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15013
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15014
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15015
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15017
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15019
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15020
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Add more wait around tcpdump capture processes for proxyarp
Jouni Malinen [Tue, 28 May 2019 17:06:55 +0000 (20:06 +0300)] 
tests: Add more wait around tcpdump capture processes for proxyarp

It looks like the previously used sleep time was not sufficient to allow
capturing the frames from wlan0/wlan1/wlan2 to start and complete so
that all the necessary frames can be checked. This was the case
especially with UML time-travel=inf-cpu.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoAP: Consider regulatory limitation when filling WMM element
Haim Dreyfuss [Wed, 3 Apr 2019 16:07:53 +0000 (19:07 +0300)] 
AP: Consider regulatory limitation when filling WMM element

In case the current channel has regulatory WMM limitations, take them
into account when filling the WMM element. Also check if the new WMM
element is different from the previous one and if so change the
parameter_set_count to imply stations to look into it.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
4 years agonl80211: Add regulatory wmm_limit to hostapd_channel_data
Haim Dreyfuss [Wed, 3 Apr 2019 16:07:51 +0000 (19:07 +0300)] 
nl80211: Add regulatory wmm_limit to hostapd_channel_data

ETSI EN 301 893 v2.1.1 (2017-05) standard defines a new channel access
mechanism that all devices (WLAN and LAA) need to comply with.
In previous versions the device was allowed by ETSI to implement
802.11 channel access mechanism based on a set of priority classes
which are taken from 802.11. According of the new standard there
might be some exceptions which require ETSI countries to follow
more restrictive rules. In such a case the AP's wmm IE need to
comply with ETSI limitation. To be able to do so the regulatory
domain passes the new limitation values if needed.
Implement this, by storing it and use it to calculate the new
WMM parameters.

This commit adds determination of regulator limitations to
NL80211_CMD_GET_WIPHY processing so that the information is available
for upper layer implementation to use later when constructing WMM
element.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
4 years agotests: Update regulatory for FI to allow new regdb rules
Andrei Otcheretianski [Wed, 3 Apr 2019 15:17:18 +0000 (18:17 +0300)] 
tests: Update regulatory for FI to allow new regdb rules

Recent regdb enabled UNII 3 in Finland. Change the
mbo_supp_oper_classes_fi test accordingly to accept either the previous
or the current value to be reported.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agotests: Make pmksa_cache_preauth_auto more robust
Jouni Malinen [Tue, 28 May 2019 14:14:33 +0000 (17:14 +0300)] 
tests: Make pmksa_cache_preauth_auto more robust

It is fine for the station to associate with either AP in this test
case, so do not force AP side connection check with apdev[0].

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Mesh link probing
Jouni Malinen [Tue, 28 May 2019 12:29:58 +0000 (15:29 +0300)] 
tests: Mesh link probing

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agowpa_supplicant: Add support to probe mesh link to given peer
Pradeep Kumar Chitrapu [Mon, 29 Apr 2019 18:42:58 +0000 (11:42 -0700)] 
wpa_supplicant: Add support to probe mesh link to given peer

Inject an Ethernet frame to a given peer bypassing next_hop lookup in
mpath table. Optional payload is expected to be hexdump without 0x.

usage:
wpa_cli -i <dev> mesh_link_probe <peer MAC> [payload=<hexdump of payload>]

example:
wpa_cli -i wlan0 mesh_link_probe aa:bb:cc:dd:ee:ff payload=aabb
wpa_cli -i wlan0 mesh_link_probe aa:bb:cc:dd:ee:ff

Signed-off-by: Pradeep Kumar chitrapu <pradeepc@codeaurora.org>
4 years agonl80211: Add support to probe specific mesh link by injecting frames
Pradeep Kumar Chitrapu [Mon, 29 Apr 2019 18:42:57 +0000 (11:42 -0700)] 
nl80211: Add support to probe specific mesh link by injecting frames

Add support for injecting frames to a given mesh peer, bypassing the
mpath table lookup using PROBE_MESH_LINK command. This helps to send
data frames over unexercised direct mesh path, which is not selected as
next_hop node. This can be helpful in measuring link metrics.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
4 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Tue, 28 May 2019 11:30:04 +0000 (14:30 +0300)] 
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2019-04-26.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agonl80211: Update freq only when CSA completes
Johannes Berg [Wed, 8 May 2019 05:30:38 +0000 (07:30 +0200)] 
nl80211: Update freq only when CSA completes

In the case of the ap_csa_disable test, I frequently see
failures due to the kernel *not* having switched, but the
CSA-STARTED event having been processed, and thus the
frequency having been updated already.

This is wrong at least for AP mode, the frequency we store
for this case internally in nl80211 should only be updated
when the channel switch completes, otherwise we end up in
a situation where the switch is aborted and the kernel is
thus on the old channel, but the internal information has
been updated and every subsequent mgmt-frame TX fails due
to being tagged with the wrong channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agotests: PEM encoded ca_cert blob
Jouni Malinen [Tue, 28 May 2019 10:47:15 +0000 (13:47 +0300)] 
tests: PEM encoded ca_cert blob

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoOpenSSL: Allow ca_cert_blob in PEM format
Santtu Lakkala [Mon, 27 May 2019 07:06:28 +0000 (10:06 +0300)] 
OpenSSL: Allow ca_cert_blob in PEM format

GnuTLS backend already accepts CA cert blobs in both DER and PEM
formats. Implement similar trial-and-error handling in OpenSSL backend.

Signed-off-by: Santtu Lakkala <santtu.lakkala@jolla.com>
4 years agotests: uml: Request non-raw serial ports
Johannes Berg [Sun, 26 May 2019 20:16:20 +0000 (22:16 +0200)] 
tests: uml: Request non-raw serial ports

When the serial ports are set into raw mode on stdio (fd:0,fd:1)
then Ctrl-C is sort of passed through, but not effective. Request
non-raw mode to avoid that and let us cancel test execution with
Ctrl-C properly (both in parallel-vm.py and vm-run.sh cases).

Note that this requires a currently out-of-tree patch, but so
does the virtual time. If the patch is not applied, the command
line argument is ignored.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoAP: add station with basic rates configuration
Johannes Berg [Tue, 28 May 2019 09:14:07 +0000 (11:14 +0200)] 
AP: add station with basic rates configuration

When a new station is added, let it have some supported rates
(they're empty without this change), using the basic rates
that it must support to connect.

This, together with the kernel-side changes for client-side,
lets us finish the complete auth/assoc handshake with higher
rates than the mandatory ones, without any further config.

However, the downside to this is that a broken station that
doesn't check the basic rates are supported before it tries
to connect will possibly not get any response to its auth
frame.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agotests: Fix status fetching loop in macsec_psk_ns with UML
Jouni Malinen [Mon, 27 May 2019 21:02:14 +0000 (00:02 +0300)] 
tests: Fix status fetching loop in macsec_psk_ns with UML

time-travel=inf-cpu needs bit more wait before being able to fetch the
STATUS* items after initial connection request.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix EAP-FAST protocol testing with newer OpenSSL and pyOpenSSL
Jouni Malinen [Mon, 27 May 2019 21:01:01 +0000 (00:01 +0300)] 
tests: Fix EAP-FAST protocol testing with newer OpenSSL and pyOpenSSL

Need to drop OpenSSL security level to 0 for ADH-AES128-SHA to work with
the latest library version.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix sae_anti_clogging_during_attack with UML time-travel=inf-cpu
Jouni Malinen [Mon, 27 May 2019 20:00:20 +0000 (23:00 +0300)] 
tests: Fix sae_anti_clogging_during_attack with UML time-travel=inf-cpu

Need to add short break to allow time-travel=inf-cpu case to allow the
connection events to be processed.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Give more time in ap_wpa2_psk_ext_delayed_ptk_rekey for UML
Jouni Malinen [Mon, 27 May 2019 19:53:53 +0000 (22:53 +0300)] 
tests: Give more time in ap_wpa2_psk_ext_delayed_ptk_rekey for UML

Waiting for exactly one second for a one second timeout with
time-travel=inf-cpu is not exactly robust, so increase that wait to be
able to see the last EAPOL-Key TX attempt from hostapd.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix ap_wpa2_eap_status loop with UML time-travel=inf-cpu
Jouni Malinen [Mon, 27 May 2019 19:22:07 +0000 (22:22 +0300)] 
tests: Fix ap_wpa2_eap_status loop with UML time-travel=inf-cpu

Busy loop for waiting is not going to work with time-travel=inf-cpu, so
need to something a bit more explicit to wait for the wpa_supplicant
process to proceed while not fully breaking the idea of this test case
to iteration through large number of STATUS-VERBOSE commands to hit
different states.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Use time-travel=inf-cpu with UML
Jouni Malinen [Mon, 27 May 2019 19:21:25 +0000 (22:21 +0300)] 
tests: Use time-travel=inf-cpu with UML

This is the current proposed way of configuring virtual time.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoHE: Make the basic NSS/MCS configurable
John Crispin [Mon, 20 May 2019 07:55:04 +0000 (09:55 +0200)] 
HE: Make the basic NSS/MCS configurable

Add a config option to allow setting a custom Basic NSS/MCS set. As a
default we use single stream HE-MCS 0-7.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Verify supported capabilities
John Crispin [Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)] 
HE: Verify supported capabilities

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Enable channel switch similarly to VHT
John Crispin [Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)] 
HE: Enable channel switch similarly to VHT

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Enable DFS similarly to VHT
John Crispin [Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)] 
HE: Enable DFS similarly to VHT

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Enable ACS similarly to VHT
John Crispin [Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)] 
HE: Enable ACS similarly to VHT

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Disable HE on channel 14
John Crispin [Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)] 
HE: Disable HE on channel 14

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Handle HE capability in neighbor DB
John Crispin [Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)] 
HE: Handle HE capability in neighbor DB

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Pass in HE information into hostapd_set_freq_params()
John Crispin [Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)] 
HE: Pass in HE information into hostapd_set_freq_params()

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agonl80211: Share VHT channel configuration for HE
John Crispin [Mon, 20 May 2019 07:55:09 +0000 (09:55 +0200)] 
nl80211: Share VHT channel configuration for HE

Set operating channel bandwidth and center frequencies using the same
attributes for VHT and HE.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Add AP mode MLME/SME handling for HE stations
John Crispin [Mon, 20 May 2019 07:55:05 +0000 (09:55 +0200)] 
HE: Add AP mode MLME/SME handling for HE stations

Process HE information in (Re)Association Request frames and add HE
elements into (Re)Association Response frames when HE is enabled in the
BSS.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Fix HE Capabilities element variable length encoding
John Crispin [Mon, 20 May 2019 07:55:10 +0000 (09:55 +0200)] 
HE: Fix HE Capabilities element variable length encoding

The HE Capibilities element has dynamic size due to the variable length
and optional fields at the end. Mask out the channel width capabilities
that are less than the configured. Only add the MCS/NSS sets for the
announced channel widths and also add the PPET elements.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Fix HE Capabilities indication from driver
John Crispin [Mon, 20 May 2019 07:55:10 +0000 (09:55 +0200)] 
HE: Fix HE Capabilities indication from driver

The PPE Thresholds information in the end of the HE Capabilities element
is optional and of variable length. struct he_ppe_threshold was not
really used correctly for encoding this, so remove it and just reserve
enough space for the information.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Add HE channel management configuration options
John Crispin [Mon, 20 May 2019 07:55:08 +0000 (09:55 +0200)] 
HE: Add HE channel management configuration options

These are symmetric with the VHT ones.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Add helpers for getting the channel width parameters
John Crispin [Mon, 20 May 2019 07:55:07 +0000 (09:55 +0200)] 
HE: Add helpers for getting the channel width parameters

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Remove vht_ prefix from acs_adjust_vht_center_freq()
John Crispin [Mon, 20 May 2019 07:55:07 +0000 (09:55 +0200)] 
HE: Remove vht_ prefix from acs_adjust_vht_center_freq()

This is used for both VHT and HE, so remove the misleading prefix.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Remove vht_ prefix from seg0/seg1_idx in DFS
John Crispin [Mon, 20 May 2019 07:55:07 +0000 (09:55 +0200)] 
HE: Remove vht_ prefix from seg0/seg1_idx in DFS

These are used for both VHT and HE, so remove the misleading prefix.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Remove vht_ prefix from bw/seg0/seg1_idx in CSA fallback
John Crispin [Mon, 20 May 2019 07:55:07 +0000 (09:55 +0200)] 
HE: Remove vht_ prefix from bw/seg0/seg1_idx in CSA fallback

These are used for both VHT and HE, so remove the misleading prefix.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Remove vht_ prefix from CSA/bandwidth
John Crispin [Mon, 20 May 2019 07:55:07 +0000 (09:55 +0200)] 
HE: Remove vht_ prefix from CSA/bandwidth

Bandwidth is used for both VHT and HE here.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Remove vht_ prefix from shared set_freq argument
John Crispin [Mon, 20 May 2019 07:55:07 +0000 (09:55 +0200)] 
HE: Remove vht_ prefix from shared set_freq argument

oper_chwidth is used for both VHT and HE here.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Remove VHT_ prefix from CHANWITDH_* define
John Crispin [Mon, 20 May 2019 07:55:06 +0000 (09:55 +0200)] 
HE: Remove VHT_ prefix from CHANWITDH_* define

The bandwidth values are shared between VHT and HE mode so remove the
VHT specific prefix.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Mask out the beamforming capabilities if they are not configured
John Crispin [Mon, 20 May 2019 07:55:11 +0000 (09:55 +0200)] 
HE: Mask out the beamforming capabilities if they are not configured

These bits might be set by the capabilities read from the kernel, so
mask them out if beamforming is not enabled in the local configuration.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agonl80211: Allow HE Capability to be set for a STA
John Crispin [Mon, 20 May 2019 07:55:05 +0000 (09:55 +0200)] 
nl80211: Allow HE Capability to be set for a STA

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Add HE Operation element to element parser
John Crispin [Mon, 20 May 2019 07:55:05 +0000 (09:55 +0200)] 
HE: Add HE Operation element to element parser

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoVHT: Remove copying of VHT Operation element from (Re)Assoc Req
Jouni Malinen [Sun, 26 May 2019 15:02:08 +0000 (18:02 +0300)] 
VHT: Remove copying of VHT Operation element from (Re)Assoc Req

This copying attempt was added incorrectly since that element is never
actually present in (Re)Association Request frames. It is only valid to
copy that element from the mesh peering frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoFILS: Explicitly clear plaintext buffer for Assoc Resp
Jouni Malinen [Sun, 26 May 2019 12:53:25 +0000 (15:53 +0300)] 
FILS: Explicitly clear plaintext buffer for Assoc Resp

This buffer may contain GTK and IGTK, so better clear it explicitly from
heap memory before freeing the buffer.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoMore forceful clearing of stack memory with keys
Jouni Malinen [Sat, 25 May 2019 21:47:17 +0000 (00:47 +0300)] 
More forceful clearing of stack memory with keys

gcc 8.3.0 was apparently clever enough to optimize away the previously
used os_memset() to explicitly clear a stack buffer that contains keys
when that clearing happened just before returning from the function.
Since memset_s() is not exactly portable (or commonly available yet..),
use a less robust mechanism that is still pretty likely to prevent
current compilers from optimizing the explicit clearing of the memory
away.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Skip ap_ft_eap_sha384_reassoc without CONFIG_SUITEB192=y
Jouni Malinen [Sat, 25 May 2019 19:24:30 +0000 (22:24 +0300)] 
tests: Skip ap_ft_eap_sha384_reassoc without CONFIG_SUITEB192=y

This test case required Suite B 192-bit support to be enabled in the
build, so skip it if that is not the case.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agohs20-osu-client: Check snprintf result to avoid compiler warnings
Masashi Honma [Mon, 6 May 2019 08:07:53 +0000 (17:07 +0900)] 
hs20-osu-client: Check snprintf result to avoid compiler warnings

Fix false positive warnings by gcc 8.3.0.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
4 years agomesh: Fix RSN initialization failure handling
Jouni Malinen [Sat, 25 May 2019 18:48:45 +0000 (21:48 +0300)] 
mesh: Fix RSN initialization failure handling

The driver was left in mesh mode (joined to the group) if RSN
authenticator initialization failed. This could result in next
operations failing due to unexpected driver state.

This was found with the following hwsim test case sequence:
mesh_wpa_auth_init_oom dpp_config_no_discovery

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agonl80211: Write event name in debug log for ignored events
Jouni Malinen [Sat, 25 May 2019 18:37:23 +0000 (21:37 +0300)] 
nl80211: Write event name in debug log for ignored events

This makes it easier to understand debug logs from systems that have
multiple interfaces.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix robustness issue in DPP test cases with SAE
Jouni Malinen [Sat, 25 May 2019 18:18:24 +0000 (21:18 +0300)] 
tests: Fix robustness issue in DPP test cases with SAE

The sae_groups parameter needs to be cleared before attempt a SAE
connection in a test case to avoid issues with this parameter having
been left to something else than the default one by a previous test
case. This was found with the following sequence:
sae_pwe_failure dpp_auto_connect_legacy_psk_sae_1

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoRADIUS server: Do not close fd=0 in error cases
Jouni Malinen [Sat, 25 May 2019 16:10:08 +0000 (19:10 +0300)] 
RADIUS server: Do not close fd=0 in error cases

Initialize auth_sock and acct_sock to -1 to avoid radius_server_deinit()
attempting to close fd=0 if anything fails in setting up the RADIUS
server.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix ERP test cases to close separate AS (ifname=as-erp)
Jouni Malinen [Sat, 25 May 2019 16:07:11 +0000 (19:07 +0300)] 
tests: Fix ERP test cases to close separate AS (ifname=as-erp)

The earlier change from using apdev[1] to using a no-interface
ifname=as-erp in the ERP related test cases ended up leaving the
separate authentication server interface running after the end of the
test case. This left UDP port 18128 open and any consecutive test case
needing this port failed to start another authentication server.

This can be reproduced with following test case sequence:
fils_auth_gtk_rekey authsrv_unknown_user

Fixes: e374def207c1 ("tests: Start ERP authentication server without AP")
Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: ERP with EAP-SIM/AKA/AKA' fast reauthentication
Jouni Malinen [Sat, 25 May 2019 14:18:39 +0000 (17:18 +0300)] 
tests: ERP with EAP-SIM/AKA/AKA' fast reauthentication

Verify Session-Id derivation when using EAP-SIM/AKA/AKA' fast
reauthentication.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoEAP-AKA: Add Session-Id derivation during fast-reauth
Mohit Sethi [Fri, 17 May 2019 19:06:12 +0000 (22:06 +0300)] 
EAP-AKA: Add Session-Id derivation during fast-reauth

The Session-Id derivation for EAP-AKA in RFC 5247 only explained how the
Session-Id is derived for regular authentication. Jouni reported it as
an errata with text explaining how to derive it during fast
reauthentication.

This patch now exports the Session-Id for EAP-AKA during fast
reauthentication based on this Session-Id = 0x17 || NONCE_S || MAC
construction.

Also documented by Alan Dekok in draft-dekok-emu-eap-session-id.

Signed-off-by: Mohit Sethi <mohit.sethi@aalto.fi>
4 years agoEAP-SIM: Add Session-Id derivation during fast-reauth
Mohit Sethi [Fri, 17 May 2019 11:40:30 +0000 (14:40 +0300)] 
EAP-SIM: Add Session-Id derivation during fast-reauth

The Session-Id derivation for EAP-SIM in RFC 5247 only explained how the
Session-Id is derived for regular authentication. Jouni reported it as
an errata with text explaining how to derive it during fast
reauthentication.

This patch now exports the Session-Id for EAP-SIM during fast
reauthentication based on this Session-Id = 0x12 || NONCE_S || MAC
construction.

Signed-off-by: Mohit Sethi <mohit.sethi@aalto.fi>
4 years agodefconfig: Add config parameter for SIM simulator for EAP-SIM
Mohit Sethi [Fri, 17 May 2019 11:26:10 +0000 (14:26 +0300)] 
defconfig: Add config parameter for SIM simulator for EAP-SIM

Allow compilation of internal GSM-Milenage implementation for EAP-SIM
testing with eapol_test.

Signed-off-by: Mohit Sethi <mohit.sethi@aalto.fi>
4 years agohostapd_cli: Add update_beacon command
Alona Solntseva [Thu, 23 May 2019 09:12:27 +0000 (12:12 +0300)] 
hostapd_cli: Add update_beacon command

Add ability to use UPDATE_BEACON with hostapd_cli. The option has been
exposed in ctrl_iface already.

Signed-off-by: Alona Solntseva <alona.solntseva@tandemg.com>
Signed-off-by: Simon Dinkin <simon.dinkin@tandemg.com>
4 years agoUBSan: Avoid dependency on undefined behavior in internal AES operation
Jouni Malinen [Fri, 24 May 2019 22:51:12 +0000 (01:51 +0300)] 
UBSan: Avoid dependency on undefined behavior in internal AES operation

The rcons[] and Td4s[] array values need to be type cast explicitly to
u32 for the left shift 24 operation to be defined due to the implicit
conversion to int not handling the case where MSB would become 1 without
depending on UB.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14929
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix ap-mgmt-fuzzer exit to free memory
Jouni Malinen [Fri, 24 May 2019 22:34:58 +0000 (01:34 +0300)] 
tests: Fix ap-mgmt-fuzzer exit to free memory

This fuzzing wrapper does not go through full hostapd_clean_iface() call
to free memory, so call ap_list_deinit() to avoid reporting memory leaks
from added AP list entries. This case could not be hit with
hostapd/wpa_supplicant since they perform full interface deinit on
interface removal.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14928
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoWNM: Fix bounds checking in SSID List element matching
Jouni Malinen [Fri, 24 May 2019 22:29:47 +0000 (01:29 +0300)] 
WNM: Fix bounds checking in SSID List element matching

The IE header length check was off-by-one and that could allow the loop
to read one octet beyond the end of the buffer before breaking out in
the second check.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14927
Fixes: 0a66ce3c49db ("WNM: Add support for SSID List element matching")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix p2p-fuzzer callbacks
Jouni Malinen [Fri, 24 May 2019 22:14:46 +0000 (01:14 +0300)] 
tests: Fix p2p-fuzzer callbacks

Couple of the callback functions had changed their prototypes and
p2p-fuzzer compilation resulted in a warning and not returning
*scheduled from the send_action() callback. This was reported as
use-of-uninitialized-value which was not really possible with
wpa_supplicant since the issue was only in the fuzzing wrapper.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14924
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Preferred Candidate List with truncated BSS Termination Duration
Jouni Malinen [Fri, 24 May 2019 14:06:44 +0000 (17:06 +0300)] 
tests: Preferred Candidate List with truncated BSS Termination Duration

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoWNM: Fix BSS Termination Duration subelement length validation
Jouni Malinen [Fri, 24 May 2019 13:59:25 +0000 (16:59 +0300)] 
WNM: Fix BSS Termination Duration subelement length validation

The length check for the BSS Termination Duration subelement was
accidentally removed and this could result in reading up to 10 bytes
beyond the end of a received frame. The actual read bytes would be
stored locally, but they were not used for anything, so other than
reading beyond the end of an allocated heap memory buffer, this did not
result in any behavior difference or exposure of the bytes.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14922
Fixes: 093226783dc7 ("WNM: Simplify how candidate subelements are stored")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Free WNM allocations cleanly in wnm-fuzzer
Jouni Malinen [Fri, 24 May 2019 13:30:19 +0000 (16:30 +0300)] 
tests: Free WNM allocations cleanly in wnm-fuzzer

Avoid a memory leak in fuzzer tests by calling wnm_deallocate_memory()
before exiting since this fuzzing wrapper does not use full
wpa_supplicant_cleanup().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: DPP channel-list with multiple channels in opclass
Jouni Malinen [Wed, 22 May 2019 22:37:16 +0000 (01:37 +0300)] 
tests: DPP channel-list with multiple channels in opclass

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP: Fix bootstrapping URI parser to handle channel list for an opclass
Jouni Malinen [Wed, 22 May 2019 22:34:24 +0000 (01:34 +0300)] 
DPP: Fix bootstrapping URI parser to handle channel list for an opclass

The bootstrapping URI format for DPP was extended during protocol design
to allow a list of channels without having to repeat the same operating
class information for each channel. That change was not included in the
initial implementation of the parser and a channel-list like
"C:81/1,6,11" would not be understood correctly (i.e., only the longer
"C:81/1,81/6,81/11" form would have been parsed correctly).

Fix this by extending the parser to accept both the shorter and longer
form for a list of channels within a single operating class.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoFILS: Verify RSNE match between Beacon/Probe Response and (Re)AssocResp
Jouni Malinen [Wed, 22 May 2019 14:42:53 +0000 (17:42 +0300)] 
FILS: Verify RSNE match between Beacon/Probe Response and (Re)AssocResp

IEEE Std 802.11ai-2016 requires the FILS STA to do this check, but this
was missing from the initial implementation. The AP side behavior was
not described properly in 802.11ai due to a missing change in the
(Re)Association Response frame format tables which has resulted in some
deployed devices not including the RSNE.

For now, use an interoperability workaround to ignore the missing RSNE
and only check the payload of the element if it is present in the
protected frame. In other words, enforce this validation step only with
an AP that implements FILS authentication as described in REVmd while
allowing older implementations to skip this check (and the protection
against downgrade attacks). This workaround may be removed in the future
if it is determined that most deployed APs can be upgraded to add RSNE
into the (Re)Association Response frames.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoFILS: Add RSNE into (Re)Association Response frame
Jouni Malinen [Wed, 22 May 2019 14:26:55 +0000 (17:26 +0300)] 
FILS: Add RSNE into (Re)Association Response frame

This AP behavior was missing from IEEE Std 802.11ai-2016, but it is
needed for the RSNE validation to work correctly and for a FILS STA to
be able to perform the mandatory check for RSNE matching when processing
the (Re)Association Response frame (as described in 802.11ai). REVmd
will be updating the standard to cover this AP case, so prepare the
implementation to match that. Without this, a FILS STA might reject
association whenever using FILS authentication.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agodbus: Fix some memory leaks on error paths
Jouni Malinen [Wed, 8 May 2019 19:06:46 +0000 (22:06 +0300)] 
dbus: Fix some memory leaks on error paths

wpa_dbus_dict_close_write() was not called if
fill_dict_with_properties() fails and that could result in leaking
memory. Fix this in two cases. There might be other missing calls to
jouni@codeaurora.org() on error paths, but those will need to be handled
separately with more complex changes.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoOpenSSL: Fix a memory leak in OCSP handling
Jouni Malinen [Wed, 8 May 2019 18:08:53 +0000 (21:08 +0300)] 
OpenSSL: Fix a memory leak in OCSP handling

If OCSP_resp_find_status() fails with the first OCSP_CERTID, the
generation of the second OCSP_CERTID ended up leaking memory. Fix this
by freeing the previously allocated OCSP_CERTID on that code path.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP: Fix a memory leak in testing sequence
Jouni Malinen [Wed, 8 May 2019 17:38:10 +0000 (20:38 +0300)] 
DPP: Fix a memory leak in testing sequence

Do not allow auth->own_protocol_key to be overridden without having
freed the previously stored key in case a test sequence in
dpp_proto_auth_conf_replaced_by_resp is used.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP: Fix a memory leak on duplicate Authentication Response
Jouni Malinen [Wed, 8 May 2019 17:25:10 +0000 (20:25 +0300)] 
DPP: Fix a memory leak on duplicate Authentication Response

Do not allow auth->peer_protocol_key to be overridden without having
freed the previously stored key in case two Authentication Response
messages are received.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP: Fix a memory leak in PKEX Qi/Qr derivation
Jouni Malinen [Wed, 8 May 2019 16:59:21 +0000 (19:59 +0300)] 
DPP: Fix a memory leak in PKEX Qi/Qr derivation

The result of EC_GROUP_dup() needs to be freed, so do so within the
derivation functions for all error cases and in the callers for success
cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoEAP-PAX server: Avoid debug prints of uninitialized memory in error cases
Jouni Malinen [Wed, 8 May 2019 16:02:19 +0000 (19:02 +0300)] 
EAP-PAX server: Avoid debug prints of uninitialized memory in error cases

Use a separate error case handler for eap_pax_mac() failures and memcmp
to avoid wpa_hexdump() calls for the (mainly theoretical) local error
cases in deriving the MAC.

Fixes: b3c2b5d9f7d8 ("EAP-PAX server: Check hash function results")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agodragonfly: Fix a memory leak on error path
Jouni Malinen [Wed, 8 May 2019 15:55:57 +0000 (18:55 +0300)] 
dragonfly: Fix a memory leak on error path

This is mostly a theoretical case, but since crypto_bignum_rand() could
fail, need to free the allocated struct crypto_bignum *tmp in such a
case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoOpenSSL: Fix memory leak in crypto_dh_derive_secret()
Jouni Malinen [Wed, 8 May 2019 15:53:32 +0000 (18:53 +0300)] 
OpenSSL: Fix memory leak in crypto_dh_derive_secret()

BN_clear() does not free the BIGNUM; it only clears its value. Fix this
memory leak by using the appropriate BN_clear_free() function instead.

Fixes: b11fa98bcb8a ("Add explicit checks for peer's DH public key")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP: Fix memory leak in EC_GROUP handling
Jouni Malinen [Wed, 8 May 2019 15:32:29 +0000 (18:32 +0300)] 
DPP: Fix memory leak in EC_GROUP handling

EC_GROUP_new_by_curve_name() allocates memory for the returned pointer,
so need to free this with EC_GROUP_free() before leaving the calling
functions. This was leaking memory when parsing JWK and when performing
PKEX.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP: Fix a memory leak in key pair generation
Jouni Malinen [Wed, 8 May 2019 15:27:06 +0000 (18:27 +0300)] 
DPP: Fix a memory leak in key pair generation

ec_params needs to be free within dpp_gen_keypair() to avoid leaking the
allocated memory.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Enable full memory leak reporting in valgrind
Jouni Malinen [Wed, 8 May 2019 10:07:50 +0000 (13:07 +0300)] 
tests: Enable full memory leak reporting in valgrind

This has heavier CPU and memory requirements, but is needed to report
memory leaks in libraries.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoOpenSSL: Fix memory leak in crypto_ecdh_init()
Jouni Malinen [Wed, 8 May 2019 09:16:03 +0000 (12:16 +0300)] 
OpenSSL: Fix memory leak in crypto_ecdh_init()

ec_params needs to be freed before returning from the function.
Extension of this function to support BoringSSL introduced this memory
leak and that was later extended to be the only variant and apply to
OpenSSL and LibreSSL cases as well in commit c23e87d0d12d ("OpenSSL:
Replace EVP_PKEY_paramgen() with EC_KEY_new_by_curve_name()").

Fixes: f29761297b84 ("BoringSSL: Implement crypto_ecdh_init()")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd subcmd QCA_NL80211_VENDOR_SUBCMD_INTEROP_ISSUES_AP
Paul Zhang [Tue, 7 May 2019 09:02:47 +0000 (17:02 +0800)] 
Add subcmd QCA_NL80211_VENDOR_SUBCMD_INTEROP_ISSUES_AP

In practice, some APs have interop issues with the DUT. This sub command
is used to transfer the AP info between the driver and user space. This
works both as a command and event. As a command, it configures the
stored list of APs from user space to firmware; as an event, it
indicates the AP info detected by the firmware to user space for
persistent storage. The attributes defined in enum
qca_vendor_attr_interop_issues_ap are used to deliver the parameters.

Signed-off-by: Paul Zhang <paulz@codeaurora.org>
4 years agotests: FILS SK using ERP and SHA256/SHA384 change in roam
Jouni Malinen [Mon, 6 May 2019 20:43:33 +0000 (23:43 +0300)] 
tests: FILS SK using ERP and SHA256/SHA384 change in roam

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Start ERP authentication server without AP
Jouni Malinen [Mon, 6 May 2019 20:36:30 +0000 (23:36 +0300)] 
tests: Start ERP authentication server without AP

There is no actual need for running the authentication server with
driver=nl80211, so simplify this by using driver=none instead. This
frees up apdev[1] for actual AP needs in the test cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Enable virtual time in UML
Jouni Malinen [Mon, 6 May 2019 17:29:16 +0000 (20:29 +0300)] 
tests: Enable virtual time in UML

This speeds up test execution significantly by removing unnecessary
waiting for things to happen since the kernel log is allowed to jump
forward whenever there is nothing to do.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoHE: Fix typo srp -> spr in hostapd configuration parameters
John Crispin [Fri, 3 May 2019 13:13:47 +0000 (15:13 +0200)] 
HE: Fix typo srp -> spr in hostapd configuration parameters

The initial commit used srp instead of spr for the spatial reuse
configuration prefix.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agoHE: Do not add SPR IE if sr_control is set to 0
John Crispin [Fri, 3 May 2019 13:13:46 +0000 (15:13 +0200)] 
HE: Do not add SPR IE if sr_control is set to 0

If none of the sr_control bits are set, we do not neet to add the IE to
the Beacon frame.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
4 years agotests: Make ap_csa_disable more robust
Jouni Malinen [Sat, 4 May 2019 21:40:57 +0000 (00:40 +0300)] 
tests: Make ap_csa_disable more robust

This test case was failing frequently due to the station not being able
to connect back to the AP if the interrupted channel switch ended up
moving the AP to the new channel anyway on restart. Scan both possible
channels to allow the AP to be found in either case.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Add forgotten CONFIG_IEEE80211AX=y to the defaults
Jouni Malinen [Sat, 4 May 2019 21:36:59 +0000 (00:36 +0300)] 
tests: Add forgotten CONFIG_IEEE80211AX=y to the defaults

This was supposed to be added when test_he.py was added.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoEnforce that IEEE 802.1X EAPOL-Key Replay Counter increases
Jouni Malinen [Sat, 4 May 2019 16:17:45 +0000 (19:17 +0300)] 
Enforce that IEEE 802.1X EAPOL-Key Replay Counter increases

While this should not happen in practical use cases,
wpa_get_ntp_timestamp() could return the same value when called twice in
a row quickly. Work around that case by enforcing a new Replay Counter
value based on stored last value.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Support UML kernel as a replacement for KVM
Jouni Malinen [Sat, 4 May 2019 09:42:02 +0000 (12:42 +0300)] 
tests: Support UML kernel as a replacement for KVM

This allows UML builds to be used in running user mode without having to
run the full x86 kernel in virtual machine.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: sigma_dut and TLS server certificate constraints
Jouni Malinen [Fri, 3 May 2019 10:06:44 +0000 (13:06 +0300)] 
tests: sigma_dut and TLS server certificate constraints

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoAdd QCA_WLAN_VENDOR_ATTR_WIFI_INFO_RADIO_INDEX
Jeff Johnson [Thu, 11 Apr 2019 18:46:29 +0000 (11:46 -0700)] 
Add QCA_WLAN_VENDOR_ATTR_WIFI_INFO_RADIO_INDEX

Update enum qca_wlan_vendor_attr_get_wifi_info to add support for
attribute QCA_WLAN_VENDOR_ATTR_WIFI_INFO_RADIO_INDEX. In addition
update the documentation for qca_wlan_vendor_attr_get_wifi_info and
QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_INFO to fully describe the
operation of the command and the format of the attributes.

Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
5 years agoAdd QCA vendor command to support beacon reporting feature
Vamsi Krishna [Wed, 3 Apr 2019 19:23:05 +0000 (00:53 +0530)] 
Add QCA vendor command to support beacon reporting feature

Add a QCA vendor sub command QCA_NL80211_VENDOR_SUBCMD_BEACON_REPORTING
to implement beacon reporting feature. Different operations required to
implement this feature can be specified in
QCA_WLAN_VENDOR_ATTR_BEACON_REPORTING_OP_TYPE.

Userspace requests the driver/firmware to periodically report received
Beacon frames whose BSSID matches the current connected BSS's MAC
address. If userspace requests the driver/firmware to send beacon
reports actively, the driver encapsulates the details of the beacon in
an event and sends it to userspace asynchronously. Otherwise, the driver
will only update the beacon in cfg80211 scan cache but will not send any
event to userspace.

If this command is not issued, the current behavior of the
driver/firmware is to update the cfg80211 scan cache only when there is
a scan issued by the host in progress or whenever there is a change in
IEs of the Beacon frames from the current connected BSS.

The userspace requests the driver/firmware to stop reporting beacons
when reporting is not required anymore. If the driver/firmware is not
able to receive Beacon frames because of other Wi-Fi operations such as
off-channel activities, etc., the driver/firmware sends a pause event to
userspace and stops reporting Beacon frames. The driver/firmware
indicates whether the beacon reporting automatically resumes later by
using the QCA_WLAN_VENDOR_ATTR_BEACON_REPORTING_AUTO_RESUMES flag. If
userspace doesn't want the beacon reporting to be resumed automatically,
userspace can send QCA_WLAN_VENDOR_BEACON_REPORTING_OP_STOP command to
the driver to stop beacon reporting.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agohostapd: Add airtime policy configuration support
Toke Høiland-Jørgensen [Wed, 20 Mar 2019 14:58:52 +0000 (15:58 +0100)] 
hostapd: Add airtime policy configuration support

This adds support to hostapd for configuring airtime policy settings for
stations as they connect to the access point. This is the userspace
component of the airtime policy enforcement system PoliFi described in
this paper: https://arxiv.org/abs/1902.03439

The Linux kernel part has been merged into mac80211 for the 5.1 dev
cycle.

The configuration mechanism has three modes: Static, dynamic and limit.
In static mode, weights can be set in the configuration file for
individual MAC addresses, which will be applied when the configured
stations connect.

In dynamic mode, weights are instead set per BSS, which will be scaled
by the number of active stations on that BSS, achieving the desired
aggregate weighing between the configured BSSes. Limit mode works like
dynamic mode, except that any BSS *not* marked as 'limited' is allowed
to exceed its configured share if a per-station fairness share would
assign more airtime to that BSS. See the paper for details on these
modes.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
5 years agonl80211: Station airtime weight configuration
Toke Høiland-Jørgensen [Wed, 20 Mar 2019 14:58:52 +0000 (15:58 +0100)] 
nl80211: Station airtime weight configuration

This provides a mechanism for configuring per-STA airtime weight for
airtime policy configuration.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
5 years agonl80211: Fetch STA TX/RX duration statistics
Toke Høiland-Jørgensen [Wed, 20 Mar 2019 14:58:52 +0000 (15:58 +0100)] 
nl80211: Fetch STA TX/RX duration statistics

This makes per-STA TX/RX duration statistics available for airtime policy
configuration.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
5 years agonl80211: Fetch STA TXQ backlog statistics
Toke Høiland-Jørgensen [Wed, 20 Mar 2019 14:58:52 +0000 (15:58 +0100)] 
nl80211: Fetch STA TXQ backlog statistics

This makes per-STA TXQ backlog statistics available for airtime policy
configuration.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
5 years agoFix ENGINE support with OpenSSL 1.1+
David Woodhouse [Sun, 28 Apr 2019 18:56:34 +0000 (21:56 +0300)] 
Fix ENGINE support with OpenSSL 1.1+

Commit 373c7969485 ("OpenSSL: Fix compile with OpenSSL 1.1.0 and
deprecated APIs") removed a call to ENGINE_load_dynamic() for newer
versions of OpenSSL, asserting that it should happen automatically.

That appears not to be the case, and loading engines now fails because
the dynamic engine isn't present.

Fix it by calling ENGINE_load_builtin_engines(), which works for all
versions of OpenSSL. Also remove the call to ERR_load_ENGINE_strings()
because that should have happened when SSL_load_error_strings() is
called anyway.

Fixes: 373c79694859 ("OpenSSL: Fix compile with OpenSSL 1.1.0 and deprecated APIs")
Signed-off-by: David Woodhouse <dwmw2@infradead.org>