]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
8 years agotests: Skip ap_wpa2_eap_psk_oom and ap_ft_oom in FIPS mode
Jouni Malinen [Sat, 1 Aug 2015 18:37:24 +0000 (21:37 +0300)] 
tests: Skip ap_wpa2_eap_psk_oom and ap_ft_oom in FIPS mode

omac1_aes_128() implementation within crypto_openssl.c is used in this
case and that cannot fail the memory allocation similarly to the
non-FIPS case and aes-omac1.c.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Allow FIPS error case for openssl_cipher_suite_config_wpas
Jouni Malinen [Sat, 1 Aug 2015 18:22:43 +0000 (21:22 +0300)] 
tests: Allow FIPS error case for openssl_cipher_suite_config_wpas

OpenSSL rejects the cipher string 'EXPORT' in FIPS mode in a way that
results in the locally generated error showing up before the EAP method
has been accepted.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Skip EAP-pwd NTHash test in FIPS build
Jouni Malinen [Sat, 1 Aug 2015 18:11:20 +0000 (21:11 +0300)] 
tests: Skip EAP-pwd NTHash test in FIPS build

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Skip EAP-IKEV2 tests if not included in the build
Jouni Malinen [Sat, 1 Aug 2015 18:10:04 +0000 (21:10 +0300)] 
tests: Skip EAP-IKEV2 tests if not included in the build

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Remove md4_vector() from CONFIG_FIPS=y builds
Jouni Malinen [Sat, 1 Aug 2015 18:06:03 +0000 (21:06 +0300)] 
OpenSSL: Remove md4_vector() from CONFIG_FIPS=y builds

MD4 is not allowed in such builds, so comment out md4_vector() from the
build to force compile time failures for cases that cannot be supported
instead of failing the MD¤ operations at runtime. This makes it easier
to detect and fix accidental cases where MD4 could still be used in some
older protocols.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP-pwd peer: Comment out MS password hash if CONFIG_FIPS=y
Jouni Malinen [Sat, 1 Aug 2015 18:03:30 +0000 (21:03 +0300)] 
EAP-pwd peer: Comment out MS password hash if CONFIG_FIPS=y

The needed hash functions are not available in FIPS mode.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Skip ms_funcs module tests in CONFIG_FIPS=y builds
Jouni Malinen [Sat, 1 Aug 2015 18:03:04 +0000 (21:03 +0300)] 
tests: Skip ms_funcs module tests in CONFIG_FIPS=y builds

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Skip EAP-MD5 and EAP-MSCHAPV2 test cases in FIPS mode
Jouni Malinen [Sat, 1 Aug 2015 15:56:06 +0000 (18:56 +0300)] 
tests: Skip EAP-MD5 and EAP-MSCHAPV2 test cases in FIPS mode

These would require MD5 or MD4 which are not allowed in FIPS mode.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Skip EAP-TTLS/CHAP, MSCHAP, MSCHAPV2 test cases in FIPS mode
Jouni Malinen [Sat, 1 Aug 2015 15:48:49 +0000 (18:48 +0300)] 
tests: Skip EAP-TTLS/CHAP, MSCHAP, MSCHAPV2 test cases in FIPS mode

In addition, replace some of the CHAP cases with PAP since that enables
more coverage without breaking the main test focus.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Use openssl pkcs12 -descert workaround to allow FIPS mode
Jouni Malinen [Sat, 1 Aug 2015 15:43:12 +0000 (18:43 +0300)] 
tests: Use openssl pkcs12 -descert workaround to allow FIPS mode

The PKCS12 file with default openssl options cannot be used with OpenSSL
1.0.1 in FIPS mode. Replace this with -descert version as a workaround.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoRename tls_connection_get_keys() to tls_connection_get_random()
Jouni Malinen [Sat, 1 Aug 2015 15:17:14 +0000 (18:17 +0300)] 
Rename tls_connection_get_keys() to tls_connection_get_random()

Commit 94f1fe6f6384a2ef379ef5b8cdc32a2fa01f8d13 ('Remove master key
extraction from tls_connection_get_keys()') left only fetching of
server/client random, but did not rename the function and structure to
minimize code changes. The only name is quite confusing, so rename this
through the repository to match the new purpose.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoAdd 'GET_CAPABILITY fips' to enable runtime check for CONFIG_FIPS=y
Jouni Malinen [Sat, 1 Aug 2015 15:11:07 +0000 (18:11 +0300)] 
Add 'GET_CAPABILITY fips' to enable runtime check for CONFIG_FIPS=y

This can be used to check whether the running wpa_supplicant version was
built with CONFIG_FIPS=y.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Allow server/client random to be fetched in FIPS mode
Jouni Malinen [Sat, 1 Aug 2015 15:09:41 +0000 (18:09 +0300)] 
OpenSSL: Allow server/client random to be fetched in FIPS mode

tls_connection_get_keys() used to return TLS master secret, but that
part was removed in commit 94f1fe6f6384a2ef379ef5b8cdc32a2fa01f8d13
('Remove master key extraction from tls_connection_get_keys()'). Since
then, there is no real need for preventing this function from being used
in FIPS mode.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agorandom: Fix random_get_bytes() with CONFIG_FIPS=y
Jouni Malinen [Sat, 1 Aug 2015 14:40:25 +0000 (17:40 +0300)] 
random: Fix random_get_bytes() with CONFIG_FIPS=y

The bytes pointer was not reset back to the beginning of the buffer when
mixing in additional entropy from the crypto module. This resulted in
writing beyond the return buffer and not getting the required mixing of
the extra entropy for the actual return buffer.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoP2P: Silence bogus compiler warnings
Jouni Malinen [Sat, 1 Aug 2015 14:03:12 +0000 (17:03 +0300)] 
P2P: Silence bogus compiler warnings

It looks like the compiler version used in Android 5.0 warns about
potentially uninitialized oper_freq variable in these debug messages.
That is not really valid since this code path can be reached only if
found != 0 and in such a case, oper_freq is set. Anyway, it seems better
to avoid compiler warnings, so add an unnecessary initialization for
oper_freq for now.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Remove md5_vector() from CONFIG_FIPS=y builds
Jouni Malinen [Sat, 1 Aug 2015 13:53:55 +0000 (16:53 +0300)] 
OpenSSL: Remove md5_vector() from CONFIG_FIPS=y builds

MD5 is not allowed in such builds, so comment out md5_vector() from the
build to force compile time failures for cases that cannot be supported
instead of failing the MD5 operations at runtime. This makes it easier
to detect and fix accidental cases where MD5 could still be used in some
older protocols.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP-TTLS: Disable CHAP, MSCHAP, and MSCHAPV2 in CONFIG_FIPS=y builds
Jouni Malinen [Sat, 1 Aug 2015 13:53:16 +0000 (16:53 +0300)] 
EAP-TTLS: Disable CHAP, MSCHAP, and MSCHAPV2 in CONFIG_FIPS=y builds

FIPS builds do not include support for MD4/MD5, so disable
EAP-TTLS/CHAP, MSCHAP, and MSCHAPV2 when CONFIG_FIPS=y is used.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP peer: Replace MD5 with SHA1 in duplicate message workaround
Jouni Malinen [Sat, 1 Aug 2015 13:50:48 +0000 (16:50 +0300)] 
EAP peer: Replace MD5 with SHA1 in duplicate message workaround

MD5 is not available in CONFIG_FIPS=y builds, so use SHA1 for the EAP
peer workaround that tries to detect more robustly whether a duplicate
message was sent.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Skip MD5 module tests in CONFIG_FIPS=y builds
Jouni Malinen [Sat, 1 Aug 2015 13:50:05 +0000 (16:50 +0300)] 
tests: Skip MD5 module tests in CONFIG_FIPS=y builds

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Set FIPSLD_CC=gcc (if not set) to make CONFIG_FIPS=y use easier
Jouni Malinen [Sat, 1 Aug 2015 13:39:41 +0000 (16:39 +0300)] 
tests: Set FIPSLD_CC=gcc (if not set) to make CONFIG_FIPS=y use easier

This makes it easier to build wpa_supplicant for OpenSSL FIPS mode
testing. wpa_supplicant/.config needs following type of configuration
for this:
CONFIG_FIPS=y
CFLAGS += -I/usr/local/ssl/include
LIBS += -L/usr/local/ssl/lib
CC=/usr/local/ssl/fips-2.0/bin/fipsld

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Implement aes_wrap/aes_unwrap through EVP for CONFIG_FIPS=y
Jouni Malinen [Sat, 1 Aug 2015 13:31:45 +0000 (16:31 +0300)] 
OpenSSL: Implement aes_wrap/aes_unwrap through EVP for CONFIG_FIPS=y

The OpenSSL internal AES_wrap_key() and AES_unwrap_key() functions are
unfortunately not available in FIPS mode. Trying to use them results in
"aes_misc.c(83): OpenSSL internal error, assertion failed: Low level API
call to cipher AES forbidden in FIPS mode!" and process termination.
Work around this by reverting commit
f19c907822ad0dec3480b1435b615ae22c5533a1 ('OpenSSL: Implement aes_wrap()
and aes_unwrap()') changes for CONFIG_FIPS=y case. In practice, this
ends up using the internal AES key wrap/unwrap implementation through
the OpenSSL EVP API which is available in FIPS mode. When CONFIG_FIPS=y
is not used, the OpenSSL AES_wrap_key()/AES_unwrap_key() API continues
to be used to minimize code size.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Comment out openssl_get_keyblock_size() if CONFIG_FIPS=y
Jouni Malinen [Sat, 1 Aug 2015 12:52:35 +0000 (15:52 +0300)] 
OpenSSL: Comment out openssl_get_keyblock_size() if CONFIG_FIPS=y

This function is not used in CONFIG_FIPS=y builds.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Comment out TLS PRF test from CONFIG_FIPS=y build
Jouni Malinen [Sat, 1 Aug 2015 12:51:44 +0000 (15:51 +0300)] 
tests: Comment out TLS PRF test from CONFIG_FIPS=y build

This fixes CONFIG_FIPS=y build that may not include tls_prf_sha1_md5().

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoComment out EAPOL-Key WEP support in CONFIG_FIPS=y build
Jouni Malinen [Sat, 1 Aug 2015 12:49:34 +0000 (15:49 +0300)] 
Comment out EAPOL-Key WEP support in CONFIG_FIPS=y build

This avoids a call to hmac_md5() to fix the build. The EAPOL-Key frame
TX code is not applicable for any FIPS mode operation, so the simplest
approach is to remove this from the build.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoMake ieee802_1x_tx_key() static
Jouni Malinen [Sat, 1 Aug 2015 12:45:18 +0000 (15:45 +0300)] 
Make ieee802_1x_tx_key() static

This is used only within ieee802_1x.c.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Support non-social oper channel in persistent_group_per_sta_psk
Jouni Malinen [Thu, 30 Jul 2015 13:03:12 +0000 (16:03 +0300)] 
tests: Support non-social oper channel in persistent_group_per_sta_psk

This allows driver-based preference list to override default operating
channel selection mechanism by using a non-social P2P find if needed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Make wifi_display enforce social channel as operating channel
Jouni Malinen [Thu, 30 Jul 2015 12:57:05 +0000 (15:57 +0300)] 
tests: Make wifi_display enforce social channel as operating channel

Previously, this was assumed to be the case due to default channel
selection behavior. However, that may not be the case with driver-based
preference list processing. Enforce a social channel to be used as the
operating channel here since dev[2] uses social channel only device
discovery and needs to find the GO.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Process preferred frequency list as part of GO Neg Req/Resp
Ahmad Kholaif [Fri, 24 Jul 2015 08:23:24 +0000 (01:23 -0700)] 
P2P: Process preferred frequency list as part of GO Neg Req/Resp

When processing a GO Negotiation Request and Response, if local driver
supports the preferred channel list extension, then:

- Check if peer's preference for operating channel is already included
  in our preferred channel list and if so, take the oper_channel as is.

- If peer's preference for operating channel is not in local device's
  preferred channel list and peer device has provided its preferred
  frequency list in the GO Negotiation Request/Response, then find a
  channel that is common for both preferred channel lists and use it
  for oper_channel.

- If peer's preference for operating channel is not in local device's
  preferred channel list and peer device doesn't use preferred channel
  list extension, i.e., no preferred channel list in GO Negotiation
  Request/Response, then look for a channel that is common for local
  device's preferred channel list and peer's list of supported channels
  and use it for oper_channel.

- In case no common channel is found, use the peer's preference for
  oper_channel as is.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Expose driver preferred frequency list fetch to P2P
Ahmad Kholaif [Fri, 24 Jul 2015 08:23:24 +0000 (01:23 -0700)] 
P2P: Expose driver preferred frequency list fetch to P2P

This adds a callback function that can be used from the P2P module to
request the current preferred list of operating channels from the
driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Do not omit known operating channel preference from GO Neg Resp
Ahmad Kholaif [Fri, 24 Jul 2015 08:56:48 +0000 (01:56 -0700)] 
P2P: Do not omit known operating channel preference from GO Neg Resp

Add an extra condition to omit operating channel preference when
building GO Negotiation Response. If the local device supports the
preferred frequency list extension, then when sending a GO Negotiation
Response frame, advertise the preferred operating channel unless local
device is assuming the P2P Client role and has an empty preferred
frequency list, in which case local device can omit its preference for
the operating channel.

This change helps make use of the preferred frequency list and the
calculated best channel for both negotiating parties of the P2P
connection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Parse preferred frequency list extension
Ahmad Kholaif [Fri, 24 Jul 2015 00:39:45 +0000 (17:39 -0700)] 
P2P: Parse preferred frequency list extension

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Add preferred frequency list extension to GO Neg Req
Ahmad Kholaif [Fri, 24 Jul 2015 00:39:45 +0000 (17:39 -0700)] 
P2P: Add preferred frequency list extension to GO Neg Req

When sending a GO Negotiation Request, advertise the preferred frequency
list in a new vendor specific IE. This can be used to extend the
standard P2P behavior where a single preferred channel can be advertised
by allowing a priority list of channels to be indicated.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Use preferred frequency list from the local driver
Ahmad Kholaif [Fri, 24 Jul 2015 00:39:45 +0000 (17:39 -0700)] 
P2P: Use preferred frequency list from the local driver

If the driver supports the preferred frequency list extension, use this
information from the driver when no explicitly configured preference
list (p2p_pref_chan) is present for P2P operating channel selection.
This commit adds this for GO Negotiation and Invitation use cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoAdd parsing of preferred frequency list element
Ahmad Kholaif [Fri, 24 Jul 2015 00:39:45 +0000 (17:39 -0700)] 
Add parsing of preferred frequency list element

This adds parsing of QCA vendor specific elements and as the first such
element to be parsed, stores pointers to the preferred frequency list
element that can be used to enhance P2P channel negotiation behavior.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoDefine new registry for QCA vendor specific elements
Jouni Malinen [Wed, 17 Jun 2015 16:24:29 +0000 (19:24 +0300)] 
Define new registry for QCA vendor specific elements

The new enum qca_vendor_element_id registry is used to manage
assignments of vendor specific elements using the QCA OUI 00:13:74. The
initial assignment is for the purpose for extending P2P functionality
for cases where the wpa_supplicant implementation is used by both ends
of an exchange.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoReturn error from wpa_drv_get_pref_freq_list() if no driver support
Jouni Malinen [Thu, 30 Jul 2015 19:10:46 +0000 (22:10 +0300)] 
Return error from wpa_drv_get_pref_freq_list() if no driver support

Commit 983422088f0066068fd364013623d1e475031e6b ('nl80211: Add means to
query preferred channels') return success if no driver wrapper callback
was provided for fetching the preferred channel list. That is
problematic since the *num argument is not updated and uninitialized
freq_list could end up getting used with arbitrary frequency values. Fix
this by returning error in case the values were not available due to
driver wrapper not implementing the function. This matches the style
used in the driver_nl80211.c implementation for the case where the
driver does not support such fetch operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Add means to query preferred channels
Ahmad Kholaif [Thu, 23 Jul 2015 23:32:58 +0000 (16:32 -0700)] 
nl80211: Add means to query preferred channels

Extend the QCA vendor specific nl80211 interface to query the preferred
frequency list from driver and add a new wpa_cli command to query this
information.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Inform driver of the operating channel following group formation
Ahmad Kholaif [Fri, 24 Jul 2015 00:07:55 +0000 (17:07 -0700)] 
P2P: Inform driver of the operating channel following group formation

Upon GO Negotiation completion, if the remote peer becomes GO, send a
hint event over QCA vendor specific interface to inform the driver of
the likely operating channel of the P2P GO.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Add concurrency capabilities to driver status
Ahmad Kholaif [Fri, 24 Jul 2015 00:01:17 +0000 (17:01 -0700)] 
nl80211: Add concurrency capabilities to driver status

Extend the nl80211 interface command "driver status" to retrieve the
concurrency capabilities from the driver using the QCA vendor
extensions.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFix generating offloaded ACS channel list when hw_mode is set to any
Peng Xu [Sat, 20 Jun 2015 00:19:27 +0000 (17:19 -0700)] 
Fix generating offloaded ACS channel list when hw_mode is set to any

When ACS is offloaded to device driver and the hw_mode parameter is set
to any, the current_mode structure is NULL which fails the ACS command.
Fix this by populating the ACS channel list with channels from all bands
when current_mode is NULL.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoQCA vendor command support to set band to driver
Srinivas Dasari [Mon, 27 Jul 2015 10:14:22 +0000 (15:44 +0530)] 
QCA vendor command support to set band to driver

Add vendor command to pass SET setband command to the driver and read
the updated channel list from driver when this notification succeeds.
This allows the driver to update its internal channel lists based on
setband configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoOpenSSL: Remove EAP-FAST TLSv1.0 only workaround for OpenSSL 1.1.0
Jouni Malinen [Tue, 28 Jul 2015 08:53:13 +0000 (11:53 +0300)] 
OpenSSL: Remove EAP-FAST TLSv1.0 only workaround for OpenSSL 1.1.0

The issue with the special form of TLS session tickets has been fixed in
the OpenSSL 1.1.0 branch, so disable workaround for it. OpenSSL 1.0.1
and 1.0.2 workaround is still in place until a release with the fix has
been made.

This allows TLSv1.1 and TLSv1.2 to be negotiated for EAP-FAST with the
OpenSSL versions that support this.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Allow local disconnect in openssl_cipher_suite_config_wpas
Jouni Malinen [Tue, 28 Jul 2015 13:38:02 +0000 (16:38 +0300)] 
tests: Allow local disconnect in openssl_cipher_suite_config_wpas

The openssl_ciphers="EXPORT" case may result in locally generated
disconnection event if the OpenSSL version used in the build rejects
export ciphers in default configuration (which is what OpenSSL 1.1.0
will likely do). Don't report a test case failure in such a case.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP-TLS/TTLS/PEAP/FAST peer: Stop connection more quickly on local failure
Jouni Malinen [Tue, 28 Jul 2015 13:32:27 +0000 (16:32 +0300)] 
EAP-TLS/TTLS/PEAP/FAST peer: Stop connection more quickly on local failure

If there is only zero-length buffer of output data in error case, mark
that as an immediate failure instead of trying to report that
non-existing error report to the server. This allows faster connection
termination in cases where a non-recoverable error occurs in local TLS
processing, e.g., if none of the configured ciphers are available.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP-TTLS/PEAP/FAST peer: Stop immediately on local TLS processing failure
Jouni Malinen [Tue, 28 Jul 2015 13:30:41 +0000 (16:30 +0300)] 
EAP-TTLS/PEAP/FAST peer: Stop immediately on local TLS processing failure

EAP-TLS was already doing this, but the other TLS-based EAP methods did
not mark methodState DONE and decision FAIL on local TLS processing
errors (instead, they left the connection waiting for a longer timeout).

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Add CONFIG_TLS_ADD_DL=y build option for hostapd
Jouni Malinen [Tue, 28 Jul 2015 08:57:05 +0000 (11:57 +0300)] 
OpenSSL: Add CONFIG_TLS_ADD_DL=y build option for hostapd

This behaves similarly to the same option in wpa_supplicant, i.e., adds
-ldl when linking in libcrypto from OpenSSL.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Drop security level to 0 if needed for EAP-FAST
Jouni Malinen [Tue, 28 Jul 2015 08:51:55 +0000 (11:51 +0300)] 
OpenSSL: Drop security level to 0 if needed for EAP-FAST

OpenSSL 1.1.0 disables the anonymous ciphers by default, so need to
enable these for the special case of anonymous EAP-FAST provisioning.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Add SHA256 support in openssl_tls_prf() for TLSv1.2
Jouni Malinen [Tue, 28 Jul 2015 08:40:17 +0000 (11:40 +0300)] 
OpenSSL: Add SHA256 support in openssl_tls_prf() for TLSv1.2

This is needed when enabling TLSv1.2 support for EAP-FAST since the
SSL_export_keying_material() call does not support the needed parameters
for TLS PRF and the external-to-OpenSSL PRF needs to be used instead.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Implement openssl_tls_prf() for OpenSSL 1.1.0
Jouni Malinen [Tue, 28 Jul 2015 07:48:05 +0000 (10:48 +0300)] 
OpenSSL: Implement openssl_tls_prf() for OpenSSL 1.1.0

This needs to use the new accessor functions since the SSL session
details are not directly accessible anymore and there is now sufficient
helper functions to get to the needed information.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Implement SSL_set_session_secret_cb() callback for OpenSSL 1.1.0
Jouni Malinen [Mon, 27 Jul 2015 22:00:06 +0000 (01:00 +0300)] 
OpenSSL: Implement SSL_set_session_secret_cb() callback for OpenSSL 1.1.0

This needs to use the new accessor functions for client/server random
since the previously used direct access won't be available anymore.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Implement tls_connection_get_keys() for OpenSSL 1.1.0
Jouni Malinen [Mon, 27 Jul 2015 21:58:39 +0000 (00:58 +0300)] 
OpenSSL: Implement tls_connection_get_keys() for OpenSSL 1.1.0

This needs to use the new accessor functions since the SSL session
details are not directly accessible anymore.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Include openssl/engine.h and openssl/dsa.h explicitly
Jouni Malinen [Mon, 27 Jul 2015 21:57:36 +0000 (00:57 +0300)] 
OpenSSL: Include openssl/engine.h and openssl/dsa.h explicitly

This seems to be needed for OpenSSL 1.1.0.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoOpenSSL: Remove extra BIO_write() call on TLS client
Jouni Malinen [Mon, 27 Jul 2015 21:54:08 +0000 (00:54 +0300)] 
OpenSSL: Remove extra BIO_write() call on TLS client

openssl_handshake() was checking only that in_data is not NULL and not
its length when determining whether to call BIO_write(). Extend that to
check the buffer length as well. In practice, this removes an
unnecessary BIO_write() call at the beginning of a TLS handshake on the
client side. This did not cause issues with OpenSSL versions up to
1.0.2, but that call seems to fail with the current OpenSSL 1.1.0
degvelopment snapshot. There is no need for that zero-length BIO_write()
call, so remove it.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Skip fst_attach_wpas_error if no FST support
Jouni Malinen [Mon, 27 Jul 2015 10:54:03 +0000 (13:54 +0300)] 
tests: Skip fst_attach_wpas_error if no FST support

This check for FST testing support was forgotten from one of the new FST
test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Add CPT parameters to p2ps_provision()
Max Stepanov [Thu, 2 Jul 2015 13:21:26 +0000 (16:21 +0300)] 
tests: Add CPT parameters to p2ps_provision()

Add adv_cpt and seeker_cpt parameters to p2ps_provision() function.
The seeker_cpt is used in P2P_ASP_PROVISION command by a seeker, the
adv_cpt parameter is in P2P_ASP_PROVISION_RESP by an advertiser.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Add CPT parameter to p2ps_advertise()
Max Stepanov [Thu, 2 Jul 2015 13:21:25 +0000 (16:21 +0300)] 
tests: Add CPT parameter to p2ps_advertise()

Add an optional parameter to p2ps_advertise() function allowing to
specify CPT priority values.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Add CPT parameter to WpaSupplicant asp_provision()
Max Stepanov [Thu, 2 Jul 2015 13:21:24 +0000 (16:21 +0300)] 
tests: Add CPT parameter to WpaSupplicant asp_provision()

Add an optional CPT parameter to asp_provision() method of
WpaSupplicant.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agoP2PS: Add feature capability to PD events
Max Stepanov [Thu, 2 Jul 2015 13:21:23 +0000 (16:21 +0300)] 
P2PS: Add feature capability to PD events

Report the feature capability on P2PS-PROV-START and P2PS-PROV-DONE
ctrl-iface events. A feature capability value is specified as
'feature_cap=<hex>' event parameter, where <val> is a hexadecimal
string of feature capability bytes in a PD Response frame.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agoP2PS: Add CPT handling on PD request and response
Max Stepanov [Thu, 2 Jul 2015 13:21:22 +0000 (16:21 +0300)] 
P2PS: Add CPT handling on PD request and response

On PD Request/follow-on PD Request preparation set a feature capability
CPT value of PD context.

On PD Request processing use a request CPT and service advertisement
CPT priority list to select a feature capability CPT of PD Response.

On follow-on PD Request processing use a request CPT and a CPT priority
list in PD context to select a CPT value of follow on PD Response.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agoP2PS: Add CPT parameter to P2PS_PROVISION and P2PS_PROVISION_RESP
Max Stepanov [Thu, 2 Jul 2015 13:21:21 +0000 (16:21 +0300)] 
P2PS: Add CPT parameter to P2PS_PROVISION and P2PS_PROVISION_RESP

Add a parameter allowing to specify a value of Coordination
Protocol Transport to P2PS_PROVISION and P2PS_PROVISION_RESP commands.

Extend the p2ps_provision structure to contain cpt_priority and
cpt_mask properties and initialize them on a P2PS PD request command.

The format of the parameter:
    cpt=<cpt>[:cpt]

where <cpt> is CPT name e.g. UDP or MAC. The CPT names are listed
according to their preferences to be used for a specific P2PS session.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agoP2PS: Add CPT parameter to P2P_SERVICE_ADD asp command
Max Stepanov [Thu, 2 Jul 2015 13:21:20 +0000 (16:21 +0300)] 
P2PS: Add CPT parameter to P2P_SERVICE_ADD asp command

Add Coordination Transport Protocol parameter to P2P_SERVICE_ADD
asp command.

Extend p2ps_advertisement structure to contain CPT priorities
and a supported CPT bitmask.

The format of the new parameter:
    cpt=<cpt>[:<cpt>]

where <cpt> is a name of the Coordination Protocol Transport.
This implementation supports two CPT names: UDP and MAC.
The order of specified CPTs defines their priorities where
the first one has the highest priority.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agoutils: Add cstr_token() function
Max Stepanov [Thu, 2 Jul 2015 13:21:19 +0000 (16:21 +0300)] 
utils: Add cstr_token() function

Add an auxiliary cstr_token() function to get a token from a const char
string. The function usage syntax is similar to str_token(), but unlike
str_token() the function doesn't modify the buffer of the string. Change
str_token() function implementation to use cstr_token().

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Add p2ps_connect_pd() method
Andrei Otcheretianski [Mon, 13 Jul 2015 06:49:12 +0000 (09:49 +0300)] 
tests: Add p2ps_connect_pd() method

Add p2ps_connect_pd() helper method which strictly validates the PD
results and establishes the connection between peers accordingly.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Add p2ps_provision() method
Andrei Otcheretianski [Mon, 13 Jul 2015 06:49:11 +0000 (09:49 +0300)] 
tests: Add p2ps_provision() method

Add generic provision method. This method receives a seeker and an
advertiser devices, advertisement id, method, and a flag which indicates
whether deferred flow is expected. The method returns P2PS-PROV-DONE
events and the pin (if keypad or display method is used).

This method is needed to simplify the P2PS provision flows in the tests.
This method complies to the P2PS specification regarding the expected
order of the show and display PIN events.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Add asp_provision method to wpa_supplicant
Andrei Otcheretianski [Mon, 13 Jul 2015 06:49:10 +0000 (09:49 +0300)] 
tests: Add asp_provision method to wpa_supplicant

Add asp_provision method which issues either P2PS PD Request or, if the
status is provided, continues the deferred flow by sending follow on
PD Request.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Make discovery_auto more robust
Jouni Malinen [Sun, 26 Jul 2015 15:23:37 +0000 (18:23 +0300)] 
tests: Make discovery_auto more robust

This test case could fail if there were old BSS entries remaining in
cfg80211 scan results. That happened, e.g., when running test cases in
the following sequence: "discovery_social_plus_one discovery_auto".

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: FST SESSION_INITIATE and SESSION_RESPOND error cases
Jouni Malinen [Sun, 26 Jul 2015 14:35:52 +0000 (17:35 +0300)] 
tests: FST SESSION_INITIATE and SESSION_RESPOND error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Make fst_hw_mode_to_band() non-inline function
Jouni Malinen [Sun, 26 Jul 2015 13:34:35 +0000 (16:34 +0300)] 
FST: Make fst_hw_mode_to_band() non-inline function

There is no need for using an inline function for this. Save a bit in
binary size by using a normal function.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: More FST GET_PEER_MBIES coverage
Jouni Malinen [Sun, 26 Jul 2015 13:30:21 +0000 (16:30 +0300)] 
tests: More FST GET_PEER_MBIES coverage

The case of valid but unknown peer address was not covered previously.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Fix get_peer_mbies interface fetching in multi-group case
Jouni Malinen [Sun, 26 Jul 2015 13:28:51 +0000 (16:28 +0300)] 
FST: Fix get_peer_mbies interface fetching in multi-group case

The foreach_fst_group() loop needs "break-if-found", not
"continue-if-not-found" to do the search iteration properly. If there
were multiple groups, the previous design could have failed to find the
interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Merge unreachable error case to another error return
Jouni Malinen [Sun, 26 Jul 2015 13:18:40 +0000 (16:18 +0300)] 
FST: Merge unreachable error case to another error return

fst_read_next_text_param() is never called with buflen <= 1, so this
separate error path is practically unreachable. Merge it with another
error path to make this a bit more compact.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Use a shared FST setup function
Jouni Malinen [Sun, 26 Jul 2015 10:37:44 +0000 (13:37 +0300)] 
tests: Use a shared FST setup function

This removes quite a bit of duplicated code. In addition, this starts
using different FST group names to get additional coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Use more robust interface-find for TEST_REQUEST
Jouni Malinen [Sun, 26 Jul 2015 15:44:39 +0000 (18:44 +0300)] 
FST: Use more robust interface-find for TEST_REQUEST

It is possible for there to be multiple FST groups, so the hardcoded
mechanism of selecting the first one when sending out an event message
may not be sufficient. Get the interface from the caller, if available,
and if not, go through all groups in search of an interface to send the
event on.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Use more robust interface-find for event messages
Jouni Malinen [Sun, 26 Jul 2015 10:39:55 +0000 (13:39 +0300)] 
FST: Use more robust interface-find for event messages

It is possible for there to be multiple FST groups, so the hardcoded
mechanism of selecting the first one when sending out an event message
may not be sufficient. Get the interface from the caller, if available,
and if not, go through all groups in search of an interface to send the
event on.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Explicitly close hostapd global control socket on RELOG
Jouni Malinen [Sun, 26 Jul 2015 10:34:54 +0000 (13:34 +0300)] 
tests: Explicitly close hostapd global control socket on RELOG

Without this, the run-tests.py socket could have been left in attached
to receive all hostapd global events during a test case. This could hit
the limit of pending messages on the socket since there is nothing
clearing this socket during the execution of a test case. Fix this by
explicitly closing the socket after having completed the RELOG command.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Remove unnecessary fst_attach() already attached check
Jouni Malinen [Sun, 26 Jul 2015 09:10:14 +0000 (12:10 +0300)] 
FST: Remove unnecessary fst_attach() already attached check

Now that both hostapd and wpa_supplicant already enforce no duplicate
fst_attach() calls, there is no need for this check within fst_attach().

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: FST attach errors in wpa_supplicant
Jouni Malinen [Sun, 26 Jul 2015 09:09:08 +0000 (12:09 +0300)] 
tests: FST attach errors in wpa_supplicant

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Avoid memory leak on double FST-ATTACH
Jouni Malinen [Sun, 26 Jul 2015 09:08:17 +0000 (12:08 +0300)] 
FST: Avoid memory leak on double FST-ATTACH

Do not allow wpa_s->fst to be replaced when processing FST-ATTACH
command for an interface that has already been attached.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: FST Setup Request processing and OOM during MBIE update
Jouni Malinen [Sun, 26 Jul 2015 08:54:48 +0000 (11:54 +0300)] 
tests: FST Setup Request processing and OOM during MBIE update

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: FST setup multiple times
Jouni Malinen [Sun, 26 Jul 2015 08:45:12 +0000 (11:45 +0300)] 
tests: FST setup multiple times

This verifies FST group dialog_token wrap-around and behavior with large
number of session setups and teardowns.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Fix dialog token wrap-around
Jouni Malinen [Sun, 26 Jul 2015 08:25:49 +0000 (11:25 +0300)] 
FST: Fix dialog token wrap-around

Dialog token is only 8 bits and maintaining u32 version of it in struct
fst_group resulted in incorrect wrap-around behavior in
fst_group_assign_dialog_token(). It was possible to assign u8
dialog_token value 0 because of this. Fix this by using u8 variable
consistently.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Additional FST Setup test coverage
Jouni Malinen [Sat, 25 Jul 2015 21:33:55 +0000 (00:33 +0300)] 
tests: Additional FST Setup test coverage

This adds a test case that goes through session initialization through
separate commands that can be modified more easily for special case. The
first such special case is using special FST Setup Request frames with
non-standard MBIE contents to hit different code paths for finding the
interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Extend fst_ap_ctrl_iface to support existing groups
Jouni Malinen [Sun, 26 Jul 2015 15:11:29 +0000 (18:11 +0300)] 
tests: Extend fst_ap_ctrl_iface to support existing groups

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: FST protocol tests to verify invalid STIE header
Jouni Malinen [Sun, 26 Jul 2015 07:56:02 +0000 (10:56 +0300)] 
tests: FST protocol tests to verify invalid STIE header

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Validate STIE header in FST Setup Request/Response
Jouni Malinen [Sun, 26 Jul 2015 07:54:58 +0000 (10:54 +0300)] 
FST: Validate STIE header in FST Setup Request/Response

While this is always supposed to be the first element, check that this
is indeed the case instead of blindly using values from within the
element.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Fix Session Transition element length field value
Jouni Malinen [Sun, 26 Jul 2015 07:40:21 +0000 (10:40 +0300)] 
FST: Fix Session Transition element length field value

The Element ID and Length subfields are not supposed to be included in
the Length. In addition, both of these subfields needs to be filled in
even for non-zero status code cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Print reason for ignoring FST Action frame in debug log
Jouni Malinen [Sat, 25 Jul 2015 20:20:33 +0000 (23:20 +0300)] 
FST: Print reason for ignoring FST Action frame in debug log

This makes it easier to understand why some frames are not processed.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Do not replace previous attachment
Jouni Malinen [Sat, 25 Jul 2015 16:52:27 +0000 (19:52 +0300)] 
FST: Do not replace previous attachment

hapd->iface->fst must not be overridden if it is already pointing to FST
instance. Without this, duplicated FST-ATTACH could result in memory
leak and process termination.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFST: Use -EINVAL instead of EINVAL as return value
Jouni Malinen [Sat, 25 Jul 2015 16:50:43 +0000 (19:50 +0300)] 
FST: Use -EINVAL instead of EINVAL as return value

This is more consistent with other error cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoatheros: Enable PMF functionality without CONFIG_IEEE80211R=y
Ashok Ponnaiah [Fri, 24 Jul 2015 11:43:47 +0000 (17:13 +0530)] 
atheros: Enable PMF functionality without CONFIG_IEEE80211R=y

This extends the previous PMF (CONFIG_IEEE80211W=y) design that used
functionality from the FT (CONFIG_IEEE80211R=y) changes to work without
requiring CONFIG_IEEE80211R=y build option to be included.

Signed-off-by: Ashok Ponnaiah <aponnaia@qti.qualcomm.com>
8 years agotests: Fix ap_wps_wpa_cli_action outside VM
Jouni Malinen [Thu, 23 Jul 2015 17:48:33 +0000 (20:48 +0300)] 
tests: Fix ap_wps_wpa_cli_action outside VM

Pass absolute path to the daemonized wpa_cli process and add read
privileges for everyone on the action script to make this test case work
better when run without a VM.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agohostapd: Add build options for selecting eloop type
Jouni Malinen [Thu, 23 Jul 2015 15:45:31 +0000 (18:45 +0300)] 
hostapd: Add build options for selecting eloop type

This adds CONFIG_ELOOP_POLL=y and CONFIG_ELOOP_EPOLL=y options to
hostapd build options similarly to how these were implemented for
wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoeloop: Fix cases where a socket is reopened from a timeout/signal handler
Jouni Malinen [Thu, 23 Jul 2015 15:39:35 +0000 (18:39 +0300)] 
eloop: Fix cases where a socket is reopened from a timeout/signal handler

It was possible for a registered eloop socket handler to be unregistered
and re-registered for a re-opened socket with the same fd from a timeout
or signal handler. If such a case happened with the old socket having a
pending event waiting for processing, some eloop combinations could end
up calling the new handler function with the new socket and get stuck
waiting for an event that has not yet happened on the new socket. This
happened with timeout and signal handlers with all eloop.c types. In
addition to that, the epoll case could also trigger this when a socket
handler re-registered a re-opened socket.

Fix these by checking whether there has been socket handler changes
during processing and break the processing round by going back to
select/poll/epoll for an updated result if any changes are done during
the eloop handler calls before processing the old socket results.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: eloop socket re-open from timeout/socket handler
Jouni Malinen [Thu, 23 Jul 2015 15:39:02 +0000 (18:39 +0300)] 
tests: eloop socket re-open from timeout/socket handler

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agodrv_callbacks: Coding style cleanup
Jouni Malinen [Wed, 22 Jul 2015 16:56:04 +0000 (19:56 +0300)] 
drv_callbacks: Coding style cleanup

Clean up inconsistent whitespace use and split strings.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: WPS events and wpa_cli action script
Jouni Malinen [Wed, 22 Jul 2015 14:12:07 +0000 (17:12 +0300)] 
tests: WPS events and wpa_cli action script

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agowpa_cli: Skip action script execution when eloop termination is pending
Jouni Malinen [Wed, 22 Jul 2015 14:10:32 +0000 (17:10 +0300)] 
wpa_cli: Skip action script execution when eloop termination is pending

Try to exit more quickly by avoiding execution of the action script for
any pending events if the process is requested to be killed. This may
help in avoiding hitting the two second SIGALRM workaround in eloop in
case some of the action scripts block for long period of time.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoeloop: Try to terminate more quickly on SIGINT and SIGTERM
Jouni Malinen [Wed, 22 Jul 2015 14:05:46 +0000 (17:05 +0300)] 
eloop: Try to terminate more quickly on SIGINT and SIGTERM

It was possible for the SIGINT/SIGTERM signal to be received while
processing a pending timeout/socket/signal event and then get stuck in
the following select() call before processing the signal event. If no
other events show up within the two second SIGALRM trigger, process will
be terminated forcefully even though there would have been possibility
to do clean termination assuming no operationg blocked for that two
second time.

Handle this more cleanly by checking for eloop.pending_terminate before
starting the select()/poll()/epoll_wait() wait for the following event.
Terminate the loop if pending signal handling requests termination.

In addition, make eloop_terminated() return 1 on eloop.pending_terminate
in addition to eloop.terminate since the process will be terminated
shortly and there is no point in starting additional processing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoAdd QCA vendor definitions for multi-port concurrency
Ahmad Kholaif [Tue, 21 Jul 2015 20:11:43 +0000 (13:11 -0700)] 
Add QCA vendor definitions for multi-port concurrency

Introduce definitions for QCA vendor specific subcommands and attributes
to support multiport concurrency.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agohostapd: Mark config parameter name const
Jouni Malinen [Tue, 21 Jul 2015 10:46:00 +0000 (13:46 +0300)] 
hostapd: Mark config parameter name const

The functions parsing configuration parameters do not modify the name of
the parameter, so mark that function argument constant. In theory, the
value should also be const, but at least for now, number of the parser
functions end up modifying this to simplify parsing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>