]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
8 years agonl80211: Update channel information after channel switch notification
Peng Xu [Mon, 24 Oct 2016 23:54:36 +0000 (16:54 -0700)] 
nl80211: Update channel information after channel switch notification

When channel switch happens, driver wrapper's internal channel
information needs to be updated so that the new frequency will be used
in operations using drv->assoc_freq. Previously, only bss->freq was
updated and the new frequency was also indicated in the EVENT_CH_SWITCH
event. This could potentially leave out couple of cases that use
drv->assoc_freq at least as a fallback mechanism for getting the current
operating frequency.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoAdd CONFIG_IBSS_RSN=y into wpa_supplicant defconfig
Jouni Malinen [Fri, 28 Oct 2016 16:39:13 +0000 (19:39 +0300)] 
Add CONFIG_IBSS_RSN=y into wpa_supplicant defconfig

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoDo not try to start/join RSN IBSS without CONFIG_IBSS_RSN=y
Jouni Malinen [Fri, 28 Oct 2016 16:33:20 +0000 (19:33 +0300)] 
Do not try to start/join RSN IBSS without CONFIG_IBSS_RSN=y

Previously, a build without IBSS RSN support tried to start/join an IBSS
even if the profile was configured with RSN parameters. This does not
work and resulted in quite confusing debug log. Make this clearer by
explicitly checking for this case and reject the connection attempt with
a clearer debug log entry instead of trying something that is known to
fail.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoHS 2.0 server: Remove redundant NULL check
Maneesh Jain [Fri, 28 Oct 2016 06:16:27 +0000 (11:46 +0530)] 
HS 2.0 server: Remove redundant NULL check

Both devinfo and devdetail are non-NULL here due to the earlier check
within the same function.

Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
8 years agoRemoved redundant NULL check for sta in hostapd_event_sta_low_ack()
Nishant Chaprana [Fri, 28 Oct 2016 06:29:42 +0000 (11:59 +0530)] 
Removed redundant NULL check for sta in hostapd_event_sta_low_ack()

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
8 years agoRemoved redundant NULL check for b in wpabuf_concat()
Nishant Chaprana [Fri, 28 Oct 2016 06:42:04 +0000 (12:12 +0530)] 
Removed redundant NULL check for b in wpabuf_concat()

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
8 years agodriver.h: Fix a typo in a comment
Maneesh Jain [Fri, 28 Oct 2016 07:28:46 +0000 (12:58 +0530)] 
driver.h: Fix a typo in a comment

Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
8 years agonl80211: Allow TDLS trigger modes to be configured to the host driver
Sunil Dutt [Tue, 25 Oct 2016 15:41:04 +0000 (21:11 +0530)] 
nl80211: Allow TDLS trigger modes to be configured to the host driver

This commit adds a control interface command to configure the TDLS
trigger mode to the host driver. This TDLS mode is configured through
the "SET tdls_trigger_control" control interface command.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoQCA vendor command to configure the TDLS behavior in the host driver
Sunil Dutt [Tue, 25 Oct 2016 10:50:46 +0000 (16:20 +0530)] 
QCA vendor command to configure the TDLS behavior in the host driver

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoExtend QCA vendor attribute link layer statistics attribute
lifeng [Mon, 17 Oct 2016 07:37:22 +0000 (15:37 +0800)] 
Extend QCA vendor attribute link layer statistics attribute

This adds new statistics attributes to support channel hopping feature.

Signed-off-by: Li Feng <lifeng@qti.qualcomm.com>
8 years agoAdd more QCA vendor attribute definitions into qca-vendor.h
lifeng [Mon, 17 Oct 2016 07:27:53 +0000 (15:27 +0800)] 
Add more QCA vendor attribute definitions into qca-vendor.h

These attributes were previously maintained elsewhere. This commit moves
them to follow the standard assignment process through the qca-vendor.h
file in hostap.git.

Signed-off-by: Li Feng <lifeng@qti.qualcomm.com>
8 years agoQCA vendor attribute to report frame aggregation failure
lifeng [Wed, 26 Oct 2016 13:20:46 +0000 (21:20 +0800)] 
QCA vendor attribute to report frame aggregation failure

Add a new vendor attribute config to set the reorder blocksize and
timeout in 4 ACs, and then report the frame aggregation failure
statistics in QCA_NL80211_VENDOR_SUBCMD_STATS_EXT command. In addition,
fix the spelling of the enum value for this subcommand.

Signed-off-by: Li Feng <lifeng@qti.qualcomm.com>
8 years agotests: Avoid failures in ap_vlan_without_station with new kernel
Jouni Malinen [Thu, 27 Oct 2016 18:37:19 +0000 (21:37 +0300)] 
tests: Avoid failures in ap_vlan_without_station with new kernel

The kernel commit 'mac80211: filter multicast data packets on AP /
AP_VLAN' started filtering out the test frame used in
ap_vlan_without_station and that resulted in false failures. For now,
ignore that "error" case to avoid claiming failures when the kernel is
doing what it is expected to do.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Enable FILS in the example hwsim build configurations
Jouni Malinen [Thu, 27 Oct 2016 11:58:02 +0000 (14:58 +0300)] 
tests: Enable FILS in the example hwsim build configurations

This allows the new FILS test cases to be executed automatically when a
recent enough kernel version is used.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Check driver FILS capability
Jouni Malinen [Tue, 25 Oct 2016 20:45:20 +0000 (23:45 +0300)] 
nl80211: Check driver FILS capability

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: FILS KEK and nonces for NL80211_CMD_ASSOCIATE
Jouni Malinen [Sun, 23 Oct 2016 09:33:05 +0000 (12:33 +0300)] 
nl80211: FILS KEK and nonces for NL80211_CMD_ASSOCIATE

This sends the FILS KEK and AAD context (nonces) to the driver with the
NL80211_CMD_ASSOCIATE messages when using FILS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Add support for setting FILS authentication algorithm
Jouni Malinen [Fri, 4 Sep 2015 11:59:34 +0000 (14:59 +0300)] 
nl80211: Add support for setting FILS authentication algorithm

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Thu, 27 Oct 2016 12:01:44 +0000 (15:01 +0300)] 
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2016-10-27.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoNote set_key(WPA_ALG_NONE) failure in debug log
Jouni Malinen [Tue, 25 Oct 2016 21:22:49 +0000 (00:22 +0300)] 
Note set_key(WPA_ALG_NONE) failure in debug log

This makes wpa_remove_ptk() call to wpa_auth_set_key() more consistent
with all the other calls that verify the return value to keep static
analyzers happier.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: FILS
Jouni Malinen [Tue, 1 Sep 2015 17:37:52 +0000 (20:37 +0300)] 
tests: FILS

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Claim FILS capability only if driver supports it
Jouni Malinen [Tue, 25 Oct 2016 20:44:00 +0000 (23:44 +0300)] 
FILS: Claim FILS capability only if driver supports it

"GET_CAPABILITY fils" used to return "FILS" based on wpa_supplicant
configuration. This can be made more useful by checking both for
wpa_supplicant and driver support for FILS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Setup EAPOL state machines properly after FILS association (AP)
Jouni Malinen [Thu, 10 Sep 2015 18:33:40 +0000 (21:33 +0300)] 
FILS: Setup EAPOL state machines properly after FILS association (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set TK after association (AP)
Jouni Malinen [Wed, 9 Sep 2015 16:32:44 +0000 (19:32 +0300)] 
FILS: Set TK after association (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Mark connection fully authorized after FILS Association (AP)
Jouni Malinen [Wed, 9 Sep 2015 15:56:57 +0000 (18:56 +0300)] 
FILS: Mark connection fully authorized after FILS Association (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Association Response processing (STA)
Jouni Malinen [Wed, 9 Sep 2015 14:34:13 +0000 (17:34 +0300)] 
FILS: Association Response processing (STA)

Decrypt the AES-SIV protected elements and verify Key-Auth. Parse and
configure keys to the driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add Association Response frame elements and encrypt them (AP)
Jouni Malinen [Wed, 9 Sep 2015 12:43:53 +0000 (15:43 +0300)] 
FILS: Add Association Response frame elements and encrypt them (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Decrypt Association Request elements and check Key-Auth (AP)
Jouni Malinen [Tue, 8 Sep 2015 22:27:22 +0000 (01:27 +0300)] 
FILS: Decrypt Association Request elements and check Key-Auth (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add elements to FILS Association Request frame
Jouni Malinen [Tue, 8 Sep 2015 17:58:53 +0000 (20:58 +0300)] 
FILS: Add elements to FILS Association Request frame

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agodriver: Add option to pass FILS KEK/AAD to the driver for association
Jouni Malinen [Sun, 23 Oct 2016 09:31:55 +0000 (12:31 +0300)] 
driver: Add option to pass FILS KEK/AAD to the driver for association

This allows the FILS KEK and AAD data (nonces) to be configured to the
driver for association so that the driver can encrypt the
(Re)Association Request frame and decrypt the (Re)Association Response
frame.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Check if the pref_freq reported by the driver supports P2P
Sunil Dutt [Fri, 21 Oct 2016 06:43:16 +0000 (12:13 +0530)] 
P2P: Check if the pref_freq reported by the driver supports P2P

Filter out get_pref_freq_list() (i.e.,
QCA_NL80211_VENDOR_SUBCMD_GET_PREFERRED_FREQ_LIST) output in case of
channel negotiation by removing channels that do not allow P2P operation
at all. Previously, only the explicitly disallowed channels were removed
and that could have resulted in selecting an operating channel that is
not allowed for P2P and failing to complete the operation to start the
group.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Authentication frame processing (STA)
Jouni Malinen [Mon, 7 Sep 2015 21:14:13 +0000 (00:14 +0300)] 
FILS: Authentication frame processing (STA)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Process FILS Authentication frame (AP)
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
FILS: Process FILS Authentication frame (AP)

This implements processing of FILS Authentication frame for FILS shared
key authentication with ERP and PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add a helper function for status code conversion
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
FILS: Add a helper function for status code conversion

This will allow the existing code to be reused for FILS needs.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Extend wpa_auth_pmksa_get() to support PMKID matching
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
FILS: Extend wpa_auth_pmksa_get() to support PMKID matching

This is needed for FILS processing to enable PMKSA caching.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Export IEEE 802.1X helper functions
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
FILS: Export IEEE 802.1X helper functions

ieee802_1x_encapsulate_radius() and ieee802_1x_alloc_eapol_sm() need to
be called from FILS processing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoERP: Update client identity based on EAP-Initiate/Re-auth
Jouni Malinen [Fri, 4 Sep 2015 21:04:21 +0000 (00:04 +0300)] 
ERP: Update client identity based on EAP-Initiate/Re-auth

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Try to use FILS authentication if PMKSA or ERP entry is available
Jouni Malinen [Fri, 4 Sep 2015 12:32:07 +0000 (15:32 +0300)] 
FILS: Try to use FILS authentication if PMKSA or ERP entry is available

If a PMKSA cache entry for the target AP is available, try to use FILS
with PMKSA caching.

If an ERP key for the target AP is available, try to use FILS with
EAP-Initiate/Re-auth added as Wrapper Data element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoSME: Clear possibly used WPA/RSN IE for new connection
Jouni Malinen [Sat, 22 Oct 2016 19:48:25 +0000 (22:48 +0300)] 
SME: Clear possibly used WPA/RSN IE for new connection

This was already done in the case SME in the driver is used, but the SME
code path was resetting the local WPA/RSN IE only for association. While
that was fine for existing use cases, FILS needs a new RSN IE to be set
for PMKSA caching case in Authentication frames, so clear the local IE
before starting new authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoWPA: Add debug print for not-update-own-IEs case
Jouni Malinen [Sat, 22 Oct 2016 19:47:30 +0000 (22:47 +0300)] 
WPA: Add debug print for not-update-own-IEs case

This makes it easier to understand debug logs related to own WPA/RSN IE
selection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Include wpa_insert_pmkid() in non-FT builds
Jouni Malinen [Sat, 22 Oct 2016 19:46:48 +0000 (22:46 +0300)] 
FILS: Include wpa_insert_pmkid() in non-FT builds

This function is needed for FILS as well as FT.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoERP: Make eap_peer_finish() callable
Jouni Malinen [Thu, 10 Sep 2015 18:34:15 +0000 (21:34 +0300)] 
ERP: Make eap_peer_finish() callable

This is needed for FILS to process EAP-Finish/Re-auth.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoERP: Make eap_peer_erp_reauth_start() available
Jouni Malinen [Wed, 9 Sep 2015 20:39:48 +0000 (23:39 +0300)] 
ERP: Make eap_peer_erp_reauth_start() available

This needs to be callable through the EAPOL supplicant wrappers to allow
FILS implementation to use ERP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Make full (Re)Association Response frame available
Jouni Malinen [Wed, 9 Sep 2015 14:32:56 +0000 (17:32 +0300)] 
nl80211: Make full (Re)Association Response frame available

This is needed for FILS processing since AAD includes data before the
first element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Do not clear PTK on FILS Auth/Assoc (AP)
Jouni Malinen [Tue, 8 Sep 2015 22:17:30 +0000 (01:17 +0300)] 
FILS: Do not clear PTK on FILS Auth/Assoc (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Key-Auth derivation function for FILS SK
Jouni Malinen [Tue, 8 Sep 2015 17:39:46 +0000 (20:39 +0300)] 
FILS: Key-Auth derivation function for FILS SK

This implements Key-Auth derivation for (Re)Association Request frames
(see P802.11ai/D11.0 12.12.2.6.2) and (Re)Association Response frames
(see P802.11ai/D11.0 12.12.2.6.3).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: PMK-to-PTK key derivation for FILS authentication
Jouni Malinen [Mon, 7 Sep 2015 21:58:11 +0000 (00:58 +0300)] 
FILS: PMK-to-PTK key derivation for FILS authentication

This is the PTKSA key derivation used as part of the FILS authentication
exchange. See P802.11ai/D11.0 12.12.2.5.3.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoRename sae_data to more generic auth_data
Jouni Malinen [Sat, 22 Oct 2016 14:11:11 +0000 (17:11 +0300)] 
Rename sae_data to more generic auth_data

This makes it cleaner for the FILS implementation to use the same design
for setting Authentication frame elements as was already done with SAE.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoAdd QCA vendor command/attr for low level DMG(11ad) RF sector control
Lior David [Mon, 26 Sep 2016 21:09:36 +0000 (00:09 +0300)] 
Add QCA vendor command/attr for low level DMG(11ad) RF sector control

Add operations to allow low level control over RF sectors in QCA DMG
(11ad) chipsets. Operations include getting/setting the configuration of
a specific sector, as well as getting/setting the selected sector which
the HW uses to communicate with a specific station.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
8 years agowpa_cli: Mark number of char *cmd constant
Jouni Malinen [Sun, 16 Oct 2016 09:21:25 +0000 (12:21 +0300)] 
wpa_cli: Mark number of char *cmd constant

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agohostapd_cli: Mark number of char *cmd constant
Jouni Malinen [Sun, 16 Oct 2016 09:21:07 +0000 (12:21 +0300)] 
hostapd_cli: Mark number of char *cmd constant

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agowpa_cli: Add completion for ssid config commands
Mikael Kanstrup [Wed, 12 Oct 2016 12:19:01 +0000 (14:19 +0200)] 
wpa_cli: Add completion for ssid config commands

Add network id command completion support for identity, password,
new_password, pin, otp, passphrase, sim and bssid commands.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agowpa_cli: Add completion for sta, deauthenticate and disassociate
Mikael Kanstrup [Wed, 12 Oct 2016 12:19:00 +0000 (14:19 +0200)] 
wpa_cli: Add completion for sta, deauthenticate and disassociate

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agocli: Add list_sta command
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:59 +0000 (14:18 +0200)] 
cli: Add list_sta command

Add list_sta command to print addresses of all stations. Command
added to both wpa_cli and hostapd_cli.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Process events received following control iface commands
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:58 +0000 (14:18 +0200)] 
hostapd_cli: Process events received following control iface commands

Events received as an immediate result of control interface commands
end up on the control request message callback function instead of
the registered read socket. This makes for example the station list
used for complete functions for disassociate and deauthenticate out
of sync. Process events in the message callback function too to ensure
no events are missed.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Refactor control iface reconnects with common helper
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:57 +0000 (14:18 +0200)] 
hostapd_cli: Refactor control iface reconnects with common helper

Code for connecting/reconnecting to the hostapd control interface
is found duplicated a number of times. Create a common reconnect
helper function to avoid code duplication.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Refresh stations list on control interface reconnect
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:56 +0000 (14:18 +0200)] 
hostapd_cli: Refresh stations list on control interface reconnect

Whenever reconnecting the control interface the hostapd station list
is unknown as stations might have dropped or connected. Refresh the
list of stations used for command completion on cli connect, reconnect
and interface change.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Add completion for sta command
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:55 +0000 (14:18 +0200)] 
hostapd_cli: Add completion for sta command

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Enable command completion and history for Android
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:54 +0000 (14:18 +0200)] 
hostapd_cli: Enable command completion and history for Android

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd_cli: Add support for cli history file
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:53 +0000 (14:18 +0200)] 
hostapd_cli: Add support for cli history file

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agohostapd: Add CONFIG_WPA_CLI_EDIT to defconfig
Mikael Kanstrup [Wed, 12 Oct 2016 12:18:52 +0000 (14:18 +0200)] 
hostapd: Add CONFIG_WPA_CLI_EDIT to defconfig

As hostapd_cli now supports command completion add documentation
of the config option to defconfig. Disabled per default.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
8 years agowpa_supplicant: Restore permanent MAC address on reassociation
Benjamin Richter [Tue, 11 Oct 2016 03:57:38 +0000 (05:57 +0200)] 
wpa_supplicant: Restore permanent MAC address on reassociation

With mac_addr=0 and preassoc_mac_addr=1, the permanent MAC address
should be restored for association. Previously this did not happen when
reassociating to the same ESS.

Signed-off-by: Benjamin Richter <br@waldteufel.eu>
8 years agoAlways propagate scan results to all interfaces
Avraham Stern [Mon, 10 Oct 2016 15:22:09 +0000 (18:22 +0300)] 
Always propagate scan results to all interfaces

Scan results were not propagated to all interfaces if scan results
started a new operation, in order to prevent concurrent operations. But
this can cause other interfaces to trigger a new scan when scan results
are already available. Instead, always notify other interfaces of the
scan results, but note that new operations are not allowed.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
8 years agoCheck for NULL qsort() base pointers
Joel Cunningham [Sat, 8 Oct 2016 17:04:15 +0000 (12:04 -0500)] 
Check for NULL qsort() base pointers

There are a couple of places in wpa_supplicant/hostapd where qsort() can
be called with a NULL base pointer. This results in undefined behavior
according to the C standard and with some standard C libraries (ARM RVCT
2.2) results in a data abort/memory exception. Fix this by skipping such
calls since there is nothing needing to be sorted.

Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
8 years agotests: WPS PBC with two APs advertising same SSID
Jouni Malinen [Mon, 10 Oct 2016 21:30:15 +0000 (00:30 +0300)] 
tests: WPS PBC with two APs advertising same SSID

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoWPS: Force BSSID for WPS provisioning step connection
Jouni Malinen [Mon, 10 Oct 2016 21:25:20 +0000 (00:25 +0300)] 
WPS: Force BSSID for WPS provisioning step connection

This was already done for most driver cases, but it is possible that the
BSSID/frequency is not forced if the driver reports BSS selection
capability (e.g., NL80211_ATTR_ROAM_SUPPORT). That could potentially
result in the driver ignoring the BSSID/frequency hint and associating
with another (incorrect) AP for the WPS provisioning step if that
another AP in the same ESS is more preferred (e.g., better signal
strength) by the driver and only one of the APs (the not preferred one)
is in active WPS registrar state.

While most drivers follow the BSSID hint for the initial connection to
an ESS, not doing it here for the WPS provisioning would break the
protocol. Fix this by enforcing a single BSSID/frequency to disallow the
driver from selecting an incorrect AP for the WPS provisioning
association.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoERP: Do not pass full EAP header to eap_peer_erp_reauth_start()
Jouni Malinen [Wed, 9 Sep 2015 18:34:36 +0000 (21:34 +0300)] 
ERP: Do not pass full EAP header to eap_peer_erp_reauth_start()

That function does not need the full EAP header -- it only needs to know
which EAP identifier to use in the message. Make this usable for cases
where the previous EAP message may not exist (FILS).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Update EAPOL-Key Descriptor Version RX rules (AP)
Jouni Malinen [Thu, 3 Sep 2015 17:45:02 +0000 (20:45 +0300)] 
FILS: Update EAPOL-Key Descriptor Version RX rules (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Handle Group Key msg 1/2 without MIC when using AEAD cipher (STA)
Jouni Malinen [Thu, 3 Sep 2015 15:26:25 +0000 (18:26 +0300)] 
FILS: Handle Group Key msg 1/2 without MIC when using AEAD cipher (STA)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Perform AEAD processing after PTK has been confirmed
Jouni Malinen [Thu, 3 Sep 2015 15:18:53 +0000 (18:18 +0300)] 
FILS: Perform AEAD processing after PTK has been confirmed

This covers EAPOL-Key frames other than 2/4 that needed special handling
to confirm PTK.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Use AEAD cipher to check received EAPOL-Key frames (STA)
Jouni Malinen [Thu, 3 Sep 2015 14:57:09 +0000 (17:57 +0300)] 
FILS: Use AEAD cipher to check received EAPOL-Key frames (STA)

This changes 4-way handshake authenticator processing to decrypt the
EAPOL-Key frames using an AEAD cipher (AES-SIV with FILS AKMs) before
processing the Key Data field. This replaces Key MIC validation for the
cases where AEAD cipher is used.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Use AEAD cipher to protect EAPOL-Key frames (AP)
Jouni Malinen [Thu, 3 Sep 2015 14:24:37 +0000 (17:24 +0300)] 
FILS: Use AEAD cipher to protect EAPOL-Key frames (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Use AEAD cipher to check received EAPOL-Key frames (AP)
Jouni Malinen [Thu, 3 Sep 2015 12:59:44 +0000 (15:59 +0300)] 
FILS: Use AEAD cipher to check received EAPOL-Key frames (AP)

This changes 4-way handshake authenticator processing to decrypt the
EAPOL-Key frames using an AEAD cipher (AES-SIV with FILS AKMs) before
processing the Key Data field. This replaces Key MIC validation for the
cases where AEAD cipher is used. This needs to move the EAPOL-Key msg
2/4 RSN element processing to happen only after the PTK has been derived
and validated. That is done for all AKMs to avoid extra complexity with
having to maintain two code paths for this.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Use AEAD cipher to protect EAPOL-Key frames (STA)
Jouni Malinen [Thu, 3 Sep 2015 09:34:23 +0000 (12:34 +0300)] 
FILS: Use AEAD cipher to protect EAPOL-Key frames (STA)

This modifies wpa_eapol_key_send() to use AEAD cipher (AES-SIV for FILS
AKMs) to provide both integrity protection for the EAPOL-Key frame and
encryption for the Key Data field. It should be noted that this starts
encrypting the Key Data field in EAPOL-Key message 2/4 while it remains
unencrypted (but integrity protected) in non-FILS cases. Similarly, the
empty Key Data field in EAPOL-Key message 4/4 gets encrypted for AEAD
cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoRSN: Pass full PTK to wpa_eapol_key_send() instead of KCK only
Jouni Malinen [Thu, 3 Sep 2015 09:31:55 +0000 (12:31 +0300)] 
RSN: Pass full PTK to wpa_eapol_key_send() instead of KCK only

This will be needed to be able to implement AEAD cipher support from
FILS that will need to use KEK to protect the frame.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Update EAPOL-Key RX rules for FILS (AP)
Jouni Malinen [Wed, 2 Sep 2015 21:48:47 +0000 (00:48 +0300)] 
FILS: Update EAPOL-Key RX rules for FILS (AP)

Key Descriptor Version 0 is used with FILS and Key Info MIC field is set
to 0 with AEAD ciphers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Update EAPOL-Key descriptor version rules for RX (STA)
Jouni Malinen [Wed, 2 Sep 2015 21:44:14 +0000 (00:44 +0300)] 
FILS: Update EAPOL-Key descriptor version rules for RX (STA)

FILS AKM uses Key Descriptor version 0 and AEAD cipher.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set EAPOL-Key Key Descriptor Version to 0 with FILS AKMs (AP)
Jouni Malinen [Wed, 2 Sep 2015 21:31:45 +0000 (00:31 +0300)] 
FILS: Set EAPOL-Key Key Descriptor Version to 0 with FILS AKMs (AP)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set EAPOL-Key Key Info MIC=0 when using AEAD cipher (supplicant)
Jouni Malinen [Wed, 2 Sep 2015 21:29:54 +0000 (00:29 +0300)] 
FILS: Set EAPOL-Key Key Info MIC=0 when using AEAD cipher (supplicant)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Do not add Key MIC field in supplicant when using AEAD cipher
Jouni Malinen [Wed, 2 Sep 2015 21:21:18 +0000 (00:21 +0300)] 
FILS: Do not add Key MIC field in supplicant when using AEAD cipher

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoRSN authenticator: Add more debug print details on EAPOL-Key RX
Jouni Malinen [Wed, 2 Sep 2015 21:18:27 +0000 (00:18 +0300)] 
RSN authenticator: Add more debug print details on EAPOL-Key RX

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agowlantest: Recognize EAPOL-Key frames without MIC bit for FILS
Jouni Malinen [Wed, 2 Sep 2015 20:33:29 +0000 (23:33 +0300)] 
wlantest: Recognize EAPOL-Key frames without MIC bit for FILS

The new AEAD AKM option in FILS sets the MIC bit in EAPOL-Key frames to
0 for some ciphers, so the determination of EAPOL-Key frame types needs
changes to work with these cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoMake struct wpa_eapol_key easier to use with variable length MIC
Jouni Malinen [Wed, 2 Sep 2015 19:55:03 +0000 (22:55 +0300)] 
Make struct wpa_eapol_key easier to use with variable length MIC

Suite B 192-bit addition from IEEE Std 802.11ac-2013 replaced the
previous fixed length Key MIC field with a variable length field. That
change was addressed with an addition of a new struct defined for the
second MIC length. This is not really scalable and with FILS coming up
with a zero-length MIC case for AEAD, a more thorough change to support
variable length MIC is needed.

Remove the Key MIC and Key Data Length fields from the struct
wpa_eapol_key and find their location based on the MIC length
information (which is determined by the AKMP). This change allows the
separate struct wpa_eapol_key_192 to be removed since struct
wpa_eapol_key will now include only the fixed length fields that are
shared with all EAPOL-Key cases in IEEE Std 802.11.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Advertise ERP domain in FILS Indication element
Jouni Malinen [Wed, 2 Sep 2015 13:33:42 +0000 (16:33 +0300)] 
FILS: Advertise ERP domain in FILS Indication element

Calculate the hashed realm from hostapd erp_domain configuration
parameter and add this to the FILS Indication element when ERP is
enabled.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Allow hostapd to select FILS AKM for connection
Jouni Malinen [Wed, 2 Sep 2015 12:58:23 +0000 (15:58 +0300)] 
FILS: Allow hostapd to select FILS AKM for connection

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Allow wpa_supplicant to select FILS AKM for connection
Jouni Malinen [Wed, 2 Sep 2015 12:35:55 +0000 (15:35 +0300)] 
FILS: Allow wpa_supplicant to select FILS AKM for connection

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add FILS flags into wpa_supplicant BSS command output
Jouni Malinen [Tue, 1 Sep 2015 17:35:00 +0000 (20:35 +0300)] 
FILS: Add FILS flags into wpa_supplicant BSS command output

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add 'GET_CAPABILITY fils' for runtime check
Jouni Malinen [Tue, 1 Sep 2015 17:04:20 +0000 (20:04 +0300)] 
FILS: Add 'GET_CAPABILITY fils' for runtime check

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

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set FILS Capability bit in management frames from station
Jouni Malinen [Tue, 1 Sep 2015 17:00:16 +0000 (20:00 +0300)] 
FILS: Set FILS Capability bit in management frames from station

If FILS is supported, indicate that in Probe Request and (Re)Association
Request frames in the Extended Capabilities element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Set FILS Capability bit in management frames from AP
Jouni Malinen [Tue, 1 Sep 2015 16:44:23 +0000 (19:44 +0300)] 
FILS: Set FILS Capability bit in management frames from AP

If FILS is enabled, indicate that in Beacon, Probe Response, and
(Re)Association Response frames in the Extended Capabilities element.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add FILS Indication element to Beacon and Probe Response frames
Jouni Malinen [Tue, 1 Sep 2015 16:33:32 +0000 (19:33 +0300)] 
FILS: Add FILS Indication element to Beacon and Probe Response frames

If FILS is enabled, indicate that in AP Beacon/Probe Response frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add wpa_supplicant configuration options
Jouni Malinen [Tue, 1 Sep 2015 14:58:53 +0000 (17:58 +0300)] 
FILS: Add wpa_supplicant configuration options

This adds CONFIG_FILS=y build configuration option and new key
management options for FILS authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add hostapd configuration options
Jouni Malinen [Tue, 1 Sep 2015 14:57:59 +0000 (17:57 +0300)] 
FILS: Add hostapd configuration options

This adds CONFIG_FILS=y build configuration option and new key
management options for FILS authentication.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add definitions for new frames and values
Jouni Malinen [Tue, 1 Sep 2015 14:50:04 +0000 (17:50 +0300)] 
FILS: Add definitions for new frames and values

This adds definitions for various management frame elements and values
from P802.11ai/D11.0.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add AKM definitions
Jouni Malinen [Tue, 1 Sep 2015 14:50:04 +0000 (17:50 +0300)] 
FILS: Add AKM definitions

This adds definitions for the new AKM suite values from P802.11ai/D11.0.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFILS: Add new information elements
Jouni Malinen [Tue, 1 Sep 2015 14:50:04 +0000 (17:50 +0300)] 
FILS: Add new information elements

This adds definitions for new information elements from P802.11ai/D11.0
and parsing of these IEs.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Update eap_proto_psk_errors and ap_wpa2_eap_psk_oom
Jouni Malinen [Mon, 10 Oct 2016 17:23:57 +0000 (20:23 +0300)] 
tests: Update eap_proto_psk_errors and ap_wpa2_eap_psk_oom

The extension of aes_128_ctr_encrypt() to allow AES-192 and AES-256 to
be used in addition to AES-128 for CTR mode encryption resulted in the
backtrace for the function calls changing. Update the test cases that
started failing due to that change.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoExtend AES-SIV implementation to support different key lengths
Jouni Malinen [Mon, 10 Oct 2016 16:27:57 +0000 (19:27 +0300)] 
Extend AES-SIV implementation to support different key lengths

The previous implementation was hardcoded to use 128-bit AES key
(AEAD_AES_SIV_CMAC_256). Extend this by allowing AEAD_AES_SIV_CMAC_384
and AEAD_AES_SIV_CMAC_512 with 192-bit and 256-bit AES keys.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoMove CRC-32 routine from wlantest to src/utils
Jouni Malinen [Wed, 2 Sep 2015 13:16:50 +0000 (16:16 +0300)] 
Move CRC-32 routine from wlantest to src/utils

This allows the CRC-32 routine to be shared for other purposes in
addition to the WEP/TKIP/FCS within wlantest.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Mesh network and SELECT_NETWORK
Jouni Malinen [Sun, 9 Oct 2016 14:09:56 +0000 (17:09 +0300)] 
tests: Mesh network and SELECT_NETWORK

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotest: FT: EAP test for mismatching keys
Michael Braun [Sat, 24 Sep 2016 20:53:44 +0000 (22:53 +0200)] 
test: FT: EAP test for mismatching keys

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>