]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
5 years agonl80211: Simplify if_indices tracking
Jouni Malinen [Sun, 28 Apr 2019 18:05:54 +0000 (21:05 +0300)] 
nl80211: Simplify if_indices tracking

Maintain a single array (of struct with two int variables) instead of
two independent arrays (of int) for tracking know ifindexes and reasons
for having added them. The previous implementation tried to maintain two
independent arrays even though they were always required to be of
exactly same length and order. That had resulted in a bug earlier and
the code was not exactly easy to understand either, so replace this with
a single array.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agonl80211: Fix handling of if_indices reallocation failure
Jouni Malinen [Sun, 28 Apr 2019 17:52:10 +0000 (20:52 +0300)] 
nl80211: Fix handling of if_indices reallocation failure

Addition of a separate if_indices_reason array broke reallocation
failure checking. drv->if_indices or drv->if_indices_reason could not be
NULL in the place where this check was moved to. Fix that by maintaining
knowledge of reallocation failure in a separate local variable.

Fixes: 732b1d20ec06 ("nl80211: Clean up ifidx properly if interface in a bridge is removed")
Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoDPP2: Check conn->ctrl more consistently
Jouni Malinen [Sun, 28 Apr 2019 17:28:46 +0000 (20:28 +0300)] 
DPP2: Check conn->ctrl more consistently

There is no point in checking this pointer against NULL after it has
been dereferenced. Move the check to the beginning of the function.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agoFix a regression in storing of external_auth SSID/BSSID
Jouni Malinen [Sun, 28 Apr 2019 13:24:32 +0000 (16:24 +0300)] 
Fix a regression in storing of external_auth SSID/BSSID

An earlier change in drivers_ops API for struct external_auth broke the
way SSID and BSSID for an external authentication request were stored.
The implementation depended on the memory array being available in the
API struct with a use of memcpy() to copy the full structure even though
when only SSID and BSSID was needed. Fix this by replacing that
easy-to-break storing mechanism with explicit arrays for the exact set
of needed information.

Fixes: dd1a8cef4c05 ("Remove unnecessary copying of SSID and BSSID for external_auth")
Signed-off-by: Jouni Malinen <j@w1.fi>
5 years agotests: FT-EAP and PMKSA caching for initial mobility domain association
Jouni Malinen [Sun, 28 Apr 2019 13:03:03 +0000 (16:03 +0300)] 
tests: FT-EAP and PMKSA caching for initial mobility domain association

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFT: Allow PMKSA caching to be enabled with FT-EAP
Jouni Malinen [Sun, 28 Apr 2019 13:01:45 +0000 (16:01 +0300)] 
FT: Allow PMKSA caching to be enabled with FT-EAP

The new wpa_supplicant network profile configuration parameter
ft_eap_pmksa_caching=1 can be used to enable use of PMKSA caching with
FT-EAP for FT initial mobility domain association. This is still
disabled by default (i.e., maintaining previous behavior) to avoid
likely interoperability issues.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFT: Allow cached XXKey/MPMK to be used if new XXKey is not available
Jouni Malinen [Sun, 28 Apr 2019 12:52:43 +0000 (15:52 +0300)] 
FT: Allow cached XXKey/MPMK to be used if new XXKey is not available

This allows authenticator side to complete FT initial mobility domain
association using FT-EAP with PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFT: Store XXKey/MPMK in PMKSA cache instead of MSK (authenticator)
Jouni Malinen [Sun, 28 Apr 2019 12:52:08 +0000 (15:52 +0300)] 
FT: Store XXKey/MPMK in PMKSA cache instead of MSK (authenticator)

When completing FT initial mobility domain association with EAP, store
XXKey/MPMK in the PMKSA cache instead of MSK. The previously stored MSK
was of no use since it could not be used as the XXKey for another FT
initial mobility domain association using PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFT: Allow cached XXKey/MPMK to be used if new XXKey is not available
Jouni Malinen [Sun, 28 Apr 2019 12:50:51 +0000 (15:50 +0300)] 
FT: Allow cached XXKey/MPMK to be used if new XXKey is not available

This allows supplicant side to complete FT initial mobility domain
association using FT-EAP with PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoFT: Store XXKey/MPMK in PMKSA cache instead of MSK (supplicant)
Jouni Malinen [Sun, 28 Apr 2019 12:48:58 +0000 (15:48 +0300)] 
FT: Store XXKey/MPMK in PMKSA cache instead of MSK (supplicant)

When completing FT initial mobility domain association with EAP, store
XXKey/MPMK in the PMKSA cache instead of MSK. The previously stored MSK
was of no use since it could not be used as the XXKey for another FT
initial mobility domain association using PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoRemove unused crypto_bignum_bits()
Jouni Malinen [Fri, 26 Apr 2019 14:43:45 +0000 (17:43 +0300)] 
Remove unused crypto_bignum_bits()

This wrapper function is not needed anymore.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Update SAE local error tests to match implementation
Jouni Malinen [Fri, 26 Apr 2019 14:36:27 +0000 (17:36 +0300)] 
tests: Update SAE local error tests to match implementation

The change to use a shared dragonfly_generate_scalar() helper function
resulted in failures in sae_no_random and sae_bignum_failure test cases
due to renamed functions and removed uses.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoShare common SAE and EAP-pwd functionality: own scalar generation
Jouni Malinen [Fri, 26 Apr 2019 14:33:44 +0000 (17:33 +0300)] 
Share common SAE and EAP-pwd functionality: own scalar generation

Use a shared helper function for deriving rand, mask, and own scalar.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoIgnore channel switch event if AP interface is not yet ready
Jouni Malinen [Fri, 26 Apr 2019 13:24:31 +0000 (16:24 +0300)] 
Ignore channel switch event if AP interface is not yet ready

It is apparently possible to somehow trigger the driver to report a
channel switch event during ACS operation when the interface information
is not yet complete. hapd->iface->current_mode could be NULL in that
case and that would result in process termination due to NULL pointer
dereference.

It should not really be possible to trigger a channel switch during ACS
is running (i.e., before the AP mode operation has been started), but
since that has been seen in an arbitrary test sequence with interface
start/stop operations with various parameters (both valid and invalid),
better prevent a crash here by ignoring the unexpected event instead of
trying to process it.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoVerify that channel info is available in hostapd_hw_get_channel()
Jouni Malinen [Fri, 26 Apr 2019 13:17:59 +0000 (16:17 +0300)] 
Verify that channel info is available in hostapd_hw_get_channel()

Unexpected CHAN_SWITCH command could get this function using a NULL
pointer if the channel switch was requested while the interface was
already disabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoClear cached extended_capa pointers on hapd_deinit() call
Jouni Malinen [Fri, 26 Apr 2019 13:15:15 +0000 (16:15 +0300)] 
Clear cached extended_capa pointers on hapd_deinit() call

driver->hapd_deinit() is going to free the memory that the cached
pointers are pointing to, so clear the pointers to avoid possibility of
dereferencing used memory. It seemed to be possible to hit a code path
using those fields by issuing a CHAN_SWITCH command on disabled hostapd
interface in some cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: ieee80211ax=1 in hostapd STATUS
Jouni Malinen [Fri, 26 Apr 2019 12:08:10 +0000 (15:08 +0300)] 
tests: ieee80211ax=1 in hostapd STATUS

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoIndicate ieee80211ax configuration in hostapd STATUS output
Hu Wang [Mon, 22 Apr 2019 07:39:48 +0000 (15:39 +0800)] 
Indicate ieee80211ax configuration in hostapd STATUS output

This adds a ieee80211ax=0/1 line to the STATUS output to indicate
the configuration of ieee80211ax, which similar to ieee80211n and
ieee80211ac.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agotests: Initial and still very minimal HE testing
Jouni Malinen [Thu, 25 Apr 2019 21:18:52 +0000 (00:18 +0300)] 
tests: Initial and still very minimal HE testing

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHE: Fix he_bss_color documentation
Jouni Malinen [Thu, 25 Apr 2019 21:12:53 +0000 (00:12 +0300)] 
HE: Fix he_bss_color documentation

This field needs to be set to a value within 1-63 range, i.e., 0 is not
a valid value and does not indicate that BSS color is disabled. B7 of
the BSS Color octet is used to indicate that the BSS Color is
_temporarily_ disabled, but that is something that would happen
automatically based on detecting a collision in the used BSS colors and
not something that would be configured.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
5 years agoHE: Fix HE Operation element byte order on bigendian CPUs
Jouni Malinen [Thu, 25 Apr 2019 20:57:47 +0000 (23:57 +0300)] 
HE: Fix HE Operation element byte order on bigendian CPUs

The first four octets of the element were used as a host byte order u32.
That is not correct on bigendian CPUs, so handle byte swapping needs
properly. Mark the he_oper_params field as le32 to explicitly indicate
the byte order and swap the generated params content based on CPU byte
order.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>