mech_eap.git
9 years agoFix INTERFACE_ADD parsing
Ben Greear [Fri, 3 Apr 2015 23:34:33 +0000 (19:34 -0400)]
Fix INTERFACE_ADD parsing

This fixes a regression caused by commit
efa232f9159e33e18ed624906b0093e11ddcf78e ('Add support for virtual
interface creation/deletion') for the case where an empty extra argument
is included.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agohlr_auc_gw: Allow Milenage RES length to be reduced
Jouni Malinen [Fri, 3 Apr 2015 09:44:03 +0000 (12:44 +0300)]
hlr_auc_gw: Allow Milenage RES length to be reduced

Some USIM use shorter RES length than the 64-bit default from Milenage.
Such cases did not interoperate with the hlr_auc_gw implementation. Make
it possible to configure the RES length 4..8 octets, i.e., 32 to 64
bits) to support such USIM.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agowpa_cli: Fix a typo in usage text
Ola Olsson [Thu, 26 Mar 2015 23:03:21 +0000 (00:03 +0100)]
wpa_cli: Fix a typo in usage text

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
9 years agowpa_supplicant: Clear blacklist on connect
Jason Abele [Fri, 3 Apr 2015 00:30:48 +0000 (17:30 -0700)]
wpa_supplicant: Clear blacklist on connect

It has been noticed that the band steering/load balancing of some
multi-AP networks will lead to an ever-growing list of blacklisted
BSSIDs. This eventually leads to a connection drop when the connection
is pushed to a distant AP.

Fix this issue by clearing the blacklist upon successful connect.

Signed-off-by: Jason Abele <jason@aether.com>
9 years agoAndroid: wpa_ctrl missing include for sys/stat.h
Mark Salyzyn [Wed, 1 Apr 2015 00:58:11 +0000 (17:58 -0700)]
Android: wpa_ctrl missing include for sys/stat.h

wpa_ctrl.c gets sys/stat.h inherited from
private/android_filesystem_config.h it should
not rely on this in the future. The intent is
to move fs_config function into libcutils and
thus deprecate any need for sys/stat.h in this
include file.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
9 years agoHS 2.0R2: Allow user to specify spp.xsd file location
Ben Greear [Wed, 1 Apr 2015 00:14:20 +0000 (20:14 -0400)]
HS 2.0R2: Allow user to specify spp.xsd file location

Allow user to specify the path to the spp.xsd file for hs20-osu-client
instead of requiring this to be spp.xsd in the current working
directory.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoHS 2.0R2: Add more debugging messages to hs20-osu-client
Ben Greear [Wed, 1 Apr 2015 00:14:19 +0000 (20:14 -0400)]
HS 2.0R2: Add more debugging messages to hs20-osu-client

Helps to figure out why some errors happen.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoHS 2.0R2 CA: Improve setup.sh and .conf for more flexibility
Ben Greear [Wed, 1 Apr 2015 00:14:17 +0000 (20:14 -0400)]
HS 2.0R2 CA: Improve setup.sh and .conf for more flexibility

This gives more flexibility when generating keys so that users do not
have to edit files to generate their own specific keys.

Update HS 2.0 OSU server notes as well.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoReschedule scan from wpas_stop_pno if it was postponed
Dmitry Shmidt [Mon, 30 Mar 2015 20:44:11 +0000 (13:44 -0700)]
Reschedule scan from wpas_stop_pno if it was postponed

This reschedules the postponed scan request (if such a request is
pending) from EVENT_SCHED_SCAN_STOPPED event handler to speed up
scanning after PNO/sched_scan stop has been requested.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
9 years agoEAP-PEAP server: Add support for negotiating vendor for Phase 2
Jouni Malinen [Wed, 1 Apr 2015 09:36:33 +0000 (12:36 +0300)]
EAP-PEAP server: Add support for negotiating vendor for Phase 2

This is a step towards enabling support of expanded EAP header in Phase
2.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoEAP peer: Use 32-bit EAP method type for Phase 2 processing
Jouni Malinen [Wed, 1 Apr 2015 09:35:14 +0000 (12:35 +0300)]
EAP peer: Use 32-bit EAP method type for Phase 2 processing

This is a step towards enabling expanded EAP header within Phase 2 EAP
methods.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: EAP-TTLS with TLS session ticket enabled
Jouni Malinen [Tue, 31 Mar 2015 16:40:41 +0000 (19:40 +0300)]
tests: EAP-TTLS with TLS session ticket enabled

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoFix a typo in configuration parameter documentation
Jouni Malinen [Tue, 31 Mar 2015 16:40:08 +0000 (19:40 +0300)]
Fix a typo in configuration parameter documentation

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoTLS: Fix memory leaks on tls_connection_set_params() error paths
Jouni Malinen [Tue, 31 Mar 2015 13:17:48 +0000 (16:17 +0300)]
TLS: Fix memory leaks on tls_connection_set_params() error paths

The internal TLS implementation started rejecting number of unsupported
configuration parameters recently, but those new error paths did not
free the allocated tlsv1_credentials buffer.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoMake tls_connection_get_keyblock_size() internal to tls_*.c
Jouni Malinen [Tue, 31 Mar 2015 13:15:39 +0000 (16:15 +0300)]
Make tls_connection_get_keyblock_size() internal to tls_*.c

This function exposes internal state of the TLS negotiated parameters
for the sole purpose of being able to implement PRF for EAP-FAST. Since
tls_connection_prf() is now taking care of all TLS-based key derivation
cases, it is cleaner to keep this detail internal to each tls_*.c
wrapper implementation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoRemove master key extraction from tls_connection_get_keys()
Jouni Malinen [Tue, 31 Mar 2015 12:52:40 +0000 (15:52 +0300)]
Remove master key extraction from tls_connection_get_keys()

This is not needed anymore with the tls_connection_prf() being used to
handle all key derivation needs. tls_connection_get_keys() is a bit
misnamed for now, but it is only used to fetch the client and server
random for Session-Id derivation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoUse tls_connection_prf() for all EAP TLS-based key derivation
Jouni Malinen [Tue, 31 Mar 2015 12:47:32 +0000 (15:47 +0300)]
Use tls_connection_prf() for all EAP TLS-based key derivation

tls_openssl.c is the only remaining TLS/crypto wrapper that needs the
internal PRF implementation for EAP-FAST (since
SSL_export_keying_material() is not available in older versions and does
not support server-random-before-client case). As such, it is cleaner to
assume that TLS libraries support tls_connection_prf() and move the
additional support code for the otherwise unsupported cases into
tls_openssl.c.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoRename HT 20/40 coex variable to be more descriptive
Jouni Malinen [Mon, 30 Mar 2015 09:58:41 +0000 (12:58 +0300)]
Rename HT 20/40 coex variable to be more descriptive

is_ht_allowed is a confusing name since this variable is used to track
whether 40 MHz channel bandwidth is allowed instead of whether HT is
allowed in general.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoEAP server: Add debug prints to help asleap testing
Jouni Malinen [Sun, 29 Mar 2015 19:49:16 +0000 (22:49 +0300)]
EAP server: Add debug prints to help asleap testing

This adds hexdumps of MSCHAP/MSCHAPv2 Challenge and Response in format
used by asleap. This is only enabled for CONFIG_TESTING_OPTIONS=y
builds.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoAdd wpa_snprintf_hex_sep()
Jouni Malinen [Sun, 29 Mar 2015 19:27:43 +0000 (22:27 +0300)]
Add wpa_snprintf_hex_sep()

This can be used to print a hexdump with the specified separator between
octets.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoms_funcs: Make challenge_hash() non-static
Jouni Malinen [Sun, 29 Mar 2015 19:27:00 +0000 (22:27 +0300)]
ms_funcs: Make challenge_hash() non-static

This function can be of use outside ms_funcs.c.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: EAP-PEAP/MSCHAPv2 with domain name
Jouni Malinen [Sun, 29 Mar 2015 19:06:06 +0000 (22:06 +0300)]
tests: EAP-PEAP/MSCHAPv2 with domain name

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoP2P: Optimize scan frequencies list when re-joining a persistent group
Avraham Stern [Sun, 29 Mar 2015 10:10:36 +0000 (13:10 +0300)]
P2P: Optimize scan frequencies list when re-joining a persistent group

When starting a P2P client to re-join a persistent group
(P2P_GROUP_ADD persistent=<id>), it is possible that the P2P GO was
already found in previous scans. Try to get the P2P GO operating
frequency from the scan results list so wpa_supplicant will initially
scan only the P2P GO known operating frequency.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
9 years agohostapd: Fix some compilation errors
Eliad Peller [Sun, 29 Mar 2015 12:03:25 +0000 (15:03 +0300)]
hostapd: Fix some compilation errors

If NEED_AP_MLME=y is not defined, compilation might
fail under some configurations:

src/ap/drv_callbacks.c:594:2: warning: implicit declaration of
function ‘hostapd_acs_completed’ [-Wimplicit-function-declaration]

src/ap/sta_info.c:253: undefined reference to `sae_clear_retransmit_timer'

Fix these errors by adding the missing hostapd_acs_completed() stub,
and defining NEED_AP_MLME in case of CONFIG_SAE.

Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agoAdd support for CONFIG_NO_ROAMING to Makefile
Lauri Hintsala [Fri, 20 Mar 2015 18:46:03 +0000 (20:46 +0200)]
Add support for CONFIG_NO_ROAMING to Makefile

Commit e9af53ad39a19264bf5307a1b5923afc2b2f9b06 introduced new
CONFIG_NO_ROAMING configuration parameter but unfortunately it was added
only to Android.mk. Enabling this parameter didn't have any effect when
Makefile was used to build wpa_supplicant. This commit fixes that problem
and cleans "unused variable" compiler warning.

Signed-off-by: Lauri Hintsala <lauri.hintsala@silabs.com>
9 years agoOpenSSL: Implement AES-128 CBC using EVP API
Jouni Malinen [Sun, 29 Mar 2015 17:30:58 +0000 (20:30 +0300)]
OpenSSL: Implement AES-128 CBC using EVP API

This replaces the internal CBC mode implementation in
aes_128_cbc_encrypt() and aes_128_cbc_decrypt() with the OpenSSL
implementation for CONFIG_TLS=openssl builds.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoExplicitly clear temporary stack buffers in tls_prf_sha1_md5()
Jouni Malinen [Sun, 29 Mar 2015 13:43:03 +0000 (16:43 +0300)]
Explicitly clear temporary stack buffers in tls_prf_sha1_md5()

The local buffers may contain information used to generate parts of the
derived key, so clear these explicitly to minimize amount of unnecessary
private key-related material in memory.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoExplicitly clear temporary stack buffer in sha1_t_prf()
Jouni Malinen [Sun, 29 Mar 2015 13:40:55 +0000 (16:40 +0300)]
Explicitly clear temporary stack buffer in sha1_t_prf()

The local hash[] buffer may contain parts of the derived key, so clear
it explicitly to minimize number of unnecessary copies of key material
in memory.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoExplicitly clear temporary stack buffer in hmac_sha256_kdf()
Jouni Malinen [Sun, 29 Mar 2015 13:38:37 +0000 (16:38 +0300)]
Explicitly clear temporary stack buffer in hmac_sha256_kdf()

The local T[] buffer may contain parts of the derived key, so clear it
explicitly to minimize number of unnecessary copies of key material in
memory.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agowext: Add support for renamed Host AP driver ifname
Jouni Malinen [Sun, 29 Mar 2015 08:42:02 +0000 (11:42 +0300)]
wext: Add support for renamed Host AP driver ifname

Previous workaround for WEXT events from the Host AP driver required
wlan# and wifi# interfaces to have fixed names with the same number.
While that used to be the common case ten years ago, it is less common
nowadays. Extend this to use sysfs (if available) to figure out the
wifi# interface name if the specified interface is detected to be using
the Host AP driver.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoImprove error messages related to EAP DB
Ben Greear [Thu, 26 Mar 2015 21:39:57 +0000 (17:39 -0400)]
Improve error messages related to EAP DB

Add SQLite error message and DB name to the DB related errors. Add
enough tracing so that users can know exactly where users are failing to
be found.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoError out if user configures SQLite DB without CONFIG_SQLITE
Ben Greear [Thu, 26 Mar 2015 21:39:56 +0000 (17:39 -0400)]
Error out if user configures SQLite DB without CONFIG_SQLITE

This should make it more obvious to users that they have a fatal
configuration problem in hostapd authentication server.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoHS 2.0R2: Add more logging for hs20-osu-client icon matching
Ben Greear [Thu, 26 Mar 2015 21:39:55 +0000 (17:39 -0400)]
HS 2.0R2: Add more logging for hs20-osu-client icon matching

Add some more verbose logging, and make sure logging
messages are unique for easier debugging.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoOSU server: Improve logging for SPP schema validation failures
Ben Greear [Thu, 26 Mar 2015 21:39:53 +0000 (17:39 -0400)]
OSU server: Improve logging for SPP schema validation failures

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agohttp-curl: Improve log messages
Ben Greear [Thu, 26 Mar 2015 21:39:52 +0000 (17:39 -0400)]
http-curl: Improve log messages

Helps to track down why some problems relating to certs can happen.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoOSU server: Print out signup ID if there is some problem with it
Ben Greear [Thu, 26 Mar 2015 21:39:50 +0000 (17:39 -0400)]
OSU server: Print out signup ID if there is some problem with it

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoHS 2.0R2: Remove unused argument identifier from hs20-osu-client
Ben Greear [Thu, 26 Mar 2015 21:39:49 +0000 (17:39 -0400)]
HS 2.0R2: Remove unused argument identifier from hs20-osu-client

The command line option 'i' is not handled, so I assume it should
not be in the short-options list.

Fix missing word in error message as well.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agoHS 2.0R2: Allow custom libcurl linkage for hs20-osu-client
Ben Greear [Thu, 26 Mar 2015 21:39:48 +0000 (17:39 -0400)]
HS 2.0R2: Allow custom libcurl linkage for hs20-osu-client

In case someone is compiling their own libcurl and wants to link it
statically, for instance, the new CUST_CURL_LINKAGE parameter can be
used to override the default -lcurl argument.

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agotests: WPA2-PSK AP with passphrase only in memory
Jouni Malinen [Sat, 28 Mar 2015 09:08:31 +0000 (11:08 +0200)]
tests: WPA2-PSK AP with passphrase only in memory

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoAllow PSK/passphrase to be set only when needed
Jouni Malinen [Sat, 28 Mar 2015 09:05:13 +0000 (11:05 +0200)]
Allow PSK/passphrase to be set only when needed

The new network profile parameter mem_only_psk=1 can be used to specify
that the PSK/passphrase for that network is requested over the control
interface (ctrl_iface or D-Bus) similarly to the EAP network parameter
requests. The PSK/passphrase can then be configured temporarily in a way
that prevents it from getting stored to the configuration file.

For example:

Event:
CTRL-REQ-PSK_PASSPHRASE-0:PSK or passphrase needed for SSID test-wpa2-psk

Response:
CTRL-RSP-PSK_PASSPHRASE-0:"qwertyuiop"

Note: The response value uses the same encoding as the psk network
profile parameter, i.e., passphrase is within double quotation marks.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: WPA2-Enterprise connection using EAP-pwd and NTHash
Jouni Malinen [Sat, 28 Mar 2015 07:45:25 +0000 (09:45 +0200)]
tests: WPA2-Enterprise connection using EAP-pwd and NTHash

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoEAP-pwd peer: Add support for hashed password
Jouni Malinen [Sat, 28 Mar 2015 07:43:33 +0000 (09:43 +0200)]
EAP-pwd peer: Add support for hashed password

This extends EAP-pwd peer support to allow NtHash version of password
storage in addition to full plaintext password. In addition, this allows
the server to request hashed version even if the plaintext password is
available on the client. Furthermore, unsupported password preparation
requests are now rejected rather than allowing the authentication
attempt to continue.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoEAP-pwd server: Add support for hashed password
Jouni Malinen [Sat, 28 Mar 2015 07:42:31 +0000 (09:42 +0200)]
EAP-pwd server: Add support for hashed password

This extends EAP-pwd server support to allow NtHash version of password
storage in addition to full plaintext password.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoEAP-pwd: Mark helper function arguments const when appropriate
Jouni Malinen [Sat, 28 Mar 2015 07:34:30 +0000 (09:34 +0200)]
EAP-pwd: Mark helper function arguments const when appropriate

These variables are not modified during PWE or key computation.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agowpa_cli: Use tab as only word separator for networks
Mikael Kanstrup [Fri, 27 Mar 2015 10:03:28 +0000 (11:03 +0100)]
wpa_cli: Use tab as only word separator for networks

White space is a valid SSID character so completion routine for
networks should only use tab as word separator.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agowpa_cli: Completion routine for dup_network command
Mikael Kanstrup [Tue, 24 Mar 2015 16:10:40 +0000 (17:10 +0100)]
wpa_cli: Completion routine for dup_network command

Add command completion routine for dup_network command.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agowpa_cli: Completion for remove, select, disable, enable network
Mikael Kanstrup [Tue, 24 Mar 2015 16:10:39 +0000 (17:10 +0100)]
wpa_cli: Completion for remove, select, disable, enable network

Add command completion routines for remove_network, select_network,
disable_network, and enable_network commands.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agowpa_cli: Implement completion routine for get_network/set_network
Mikael Kanstrup [Tue, 24 Mar 2015 16:10:38 +0000 (17:10 +0100)]
wpa_cli: Implement completion routine for get_network/set_network

Add command completion routine for get_network and set_network that
guide user with both network id and network parameters.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agowpa_cli: Keep track of available networks
Mikael Kanstrup [Tue, 24 Mar 2015 16:10:37 +0000 (17:10 +0100)]
wpa_cli: Keep track of available networks

Keep track of available networks for easy use in command completion
routines.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agowpa_cli: Allow tab as alternative separator for cli_txt_list words
Mikael Kanstrup [Tue, 24 Mar 2015 16:10:36 +0000 (17:10 +0100)]
wpa_cli: Allow tab as alternative separator for cli_txt_list words

To be able to reuse the add/del word utility functions for lines containing
tabs allow both space and tab as word separators.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agotests: Make parallel-vm.py FAIL parser more robust
Jouni Malinen [Thu, 26 Mar 2015 20:18:54 +0000 (22:18 +0200)]
tests: Make parallel-vm.py FAIL parser more robust

It looks like it was possible to receive an incomplete FAIL line and
break out from test execution due to a parsing error. Handle this more
robustly and log the error.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: INTERFACE_ADD/REMOVE with vif addition/removal
Jouni Malinen [Thu, 26 Mar 2015 18:43:11 +0000 (20:43 +0200)]
tests: INTERFACE_ADD/REMOVE with vif addition/removal

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoAdd support for virtual interface creation/deletion
Jithu Jance [Fri, 20 Mar 2015 10:39:50 +0000 (16:09 +0530)]
Add support for virtual interface creation/deletion

Extend interface_add and interface_remove commands via an optional
argument to allow wpa_supplicant to create/delete a new virtual
interface.

Signed-off-by: Jithu Jance <jithu@broadcom.com>
9 years agowpa_cli: Use .wpa_cli_history under Android
Mikael Kanstrup [Wed, 18 Mar 2015 11:51:18 +0000 (12:51 +0100)]
wpa_cli: Use .wpa_cli_history under Android

wpa_cli already implements a command history file for easy accessing
commands previously used. Enable the functionality on Android, too.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agotests: Verify OSEN BSS flag in scan results
Jouni Malinen [Wed, 25 Mar 2015 14:05:35 +0000 (16:05 +0200)]
tests: Verify OSEN BSS flag in scan results

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoShow OSEN key management properly in scan results
Ben Greear [Tue, 17 Mar 2015 20:52:29 +0000 (13:52 -0700)]
Show OSEN key management properly in scan results

Old code defaulted to WEP for an AP advertising OSEN. Show as OSEN
instead. Re-use most of the RSN parsing logic since all but the header
is the same.

Example output:

[root@ath9k-f lanforge]# ./local/bin/wpa_cli -i sta0 scan_results
bssid / frequency / signal level / flags / ssid
00:0e:8e:6f:40:49 2462 -23 [OSEN-OSEN-CCMP][ESS] ben-138

Signed-off-by: Ben Greear <greearb@candelatech.com>
9 years agowpa_gui: Add tray icon based signal strength meter
Arkadiusz (Arkq) Bokowy [Sun, 15 Mar 2015 22:27:46 +0000 (23:27 +0100)]
wpa_gui: Add tray icon based signal strength meter

System tray icon can be set to 5 different pictographs according to the
connection status. One for disconnected state (not associated with the
network, or not connected with the wpa_supplicant service), and four for
connected status (showing the signal strength on the receiver).

By default this functionality is disabled. The reason for this, is the
fact, that the underlaying approach of this functionality is poll based,
which might be considered as a non-efficient one. Update interval has to
be set explicitly by the user with '-m<seconds>' command line argument.

Status icon names are based on various Gnome icon packs (e.g., Faba).
When icon can not be found, default one is shown (wpa_gui logo).

Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
9 years agoAP: Unset HT capabilities for an HT association request without WMM
Ilan Peer [Tue, 24 Mar 2015 07:40:06 +0000 (09:40 +0200)]
AP: Unset HT capabilities for an HT association request without WMM

HT requires QoS/WMM, so unset HT capabilities for a station
whose association request does not include a valid WMM IE.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
9 years agonl80211: Allow driver-based roam to change ESS
Krishna Vamsi [Fri, 13 Mar 2015 12:29:20 +0000 (17:59 +0530)]
nl80211: Allow driver-based roam to change ESS

This extends NL80211_CMD_ROAM event processing to allow the driver to
roam to another ESS (different SSID) when using offloaded BSS selection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Change proxyarp_open LL src MAC check to match requirements
Jouni Malinen [Tue, 24 Mar 2015 18:33:33 +0000 (20:33 +0200)]
tests: Change proxyarp_open LL src MAC check to match requirements

Now that there is a kernel patch for IPv6 ProxyARP that is capable of
using the non-AP STAs MAC address as the link layer source address in
NA, validate that behavior rather than the temporary check for BSSID.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoAdd OpenSSL 0.9.8zf patch for EAP-FAST support
Jouni Malinen [Tue, 24 Mar 2015 14:48:04 +0000 (16:48 +0200)]
Add OpenSSL 0.9.8zf patch for EAP-FAST support

OpenSSL project reformatted all the source code files, so the 0.9.8za
version of the patch did not apply anymore.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoatheros: Clear WPS appie during deinit
Ashok Kumar Ponnaiah [Tue, 24 Mar 2015 13:05:43 +0000 (15:05 +0200)]
atheros: Clear WPS appie during deinit

The WPS IE(s) need to be cleared from the driver explicitly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoExtend offloaded ACS QCA vendor command to support VHT
Manikandan Mohan [Wed, 11 Mar 2015 20:03:58 +0000 (13:03 -0700)]
Extend offloaded ACS QCA vendor command to support VHT

Update ACS driver offload feature for VHT configuration. In addition,
this allows the chanlist parameter to be used to specify which channels
are included as options for the offloaded ACS case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoRemove duplicated wpa_s->conf->interworking check
Jouni Malinen [Sun, 22 Mar 2015 19:45:47 +0000 (21:45 +0200)]
Remove duplicated wpa_s->conf->interworking check

wpas_add_interworking_elements() does not need to do this since the
caller is already checking whether Interworking is enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoAdd Extended Capabilities element to all Probe Request frames
Ilan Peer [Mon, 16 Mar 2015 05:20:48 +0000 (01:20 -0400)]
Add Extended Capabilities element to all Probe Request frames

Always add the Extended Capabilities element to Probe Request frames (in
case it is not all zeros) to publish support for driver advertised
capabilities and wpa_supplicant specific capabilities.

This also fixes the case where Extended Capabilities element was added
for Interworking cases, but did not use the driver advertised ones and
did not handle other capabilities supported by wpa_supplicant.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
9 years agotests: Automatic reconnection on re-enabling temporarily disabled network
Jouni Malinen [Sun, 22 Mar 2015 18:54:07 +0000 (20:54 +0200)]
tests: Automatic reconnection on re-enabling temporarily disabled network

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoDelay AP selection if all networks are temporarily disabled
Avraham Stern [Mon, 16 Mar 2015 05:20:02 +0000 (01:20 -0400)]
Delay AP selection if all networks are temporarily disabled

If all networks are temporarily disabled, delay AP selection until at
least one network is enabled. Running AP selection when all networks are
disabled is useless as wpa_supplicant will not try to connect. In
addition, it will result in needless scan iterations that may delay the
connection when it is needed.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
9 years agoDon't optimize scan frequencies if selected network has changed
Avraham Stern [Mon, 16 Mar 2015 05:20:01 +0000 (01:20 -0400)]
Don't optimize scan frequencies if selected network has changed

When disconnecting from a BSS, the next scan is optimized to scan only
the channels used by the connected ESS. But when disconnecting because a
new network was selected, this optimization is wrong because
wpa_supplicant is now trying to connect to another ESS. Fix this by not
optimizing the scan frequencies in case the selected network has
changed.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
9 years agotests: Remove debug print from ap_wpa2_psk_incorrect_passphrase
Jouni Malinen [Sun, 22 Mar 2015 18:35:06 +0000 (20:35 +0200)]
tests: Remove debug print from ap_wpa2_psk_incorrect_passphrase

This development time debug print was forgotten into the test script.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Make ap_vlan_wpa2_radius_id_change more robust
Jouni Malinen [Fri, 20 Mar 2015 15:51:18 +0000 (17:51 +0200)]
tests: Make ap_vlan_wpa2_radius_id_change more robust

Wait for the 4-way handshake completion instead of assuming it gets done
in 0.1 seconds.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: P2P_SERVICE_DEL asp all
Jouni Malinen [Fri, 20 Mar 2015 13:32:30 +0000 (15:32 +0200)]
tests: P2P_SERVICE_DEL asp all

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoP2PS: Extend p2p_service_del asp to support 'all' parameter
Max Stepanov [Mon, 16 Mar 2015 05:16:59 +0000 (01:16 -0400)]
P2PS: Extend p2p_service_del asp to support 'all' parameter

Extend p2p_service_del asp command to support 'all' parameter to delete
all ASP service advertisements.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
9 years agoP2PS: Add P2PS advertisements on ALL_SERVICES ANQP query
Max Stepanov [Mon, 16 Mar 2015 05:16:58 +0000 (01:16 -0400)]
P2PS: Add P2PS advertisements on ALL_SERVICES ANQP query

Add P2PS advertisements to a query response on ANQP query of
ALL_SERVICES type.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
9 years agoP2PS: Delete ASP advertisements on wpas_p2p_service_flush
Max Stepanov [Mon, 16 Mar 2015 05:16:57 +0000 (01:16 -0400)]
P2PS: Delete ASP advertisements on wpas_p2p_service_flush

Delete all ASP serice advertisement on wpas_p2p_service_flush similarly
to Bonjour and UPnP services.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
9 years agoP2PS: Update SD indicator value on ASP add/del/update
Max Stepanov [Mon, 16 Mar 2015 05:16:56 +0000 (01:16 -0400)]
P2PS: Update SD indicator value on ASP add/del/update

Update a service update indicator value on ASP service advertisement
add/del/update operations.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
9 years agoDFS: Fix range availability check
Eliad Peller [Thu, 19 Mar 2015 14:41:42 +0000 (16:41 +0200)]
DFS: Fix range availability check

There's off-by-one in the range availability check - the case of
first_chan_idx + num_chans == num_channels should be allowed (e.g., 0 +
1 == 1, for the case of a single 20 MHz channel).

Signed-off-by: Maital Hahn <maitalm@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agoDFS: Consider non-contiguous channels
Eliad Peller [Thu, 19 Mar 2015 14:41:41 +0000 (16:41 +0200)]
DFS: Consider non-contiguous channels

When looking for a new operating channel, consider the case of
non-contiguous channels when checking all the needed channels (e.g., the
driver might support channels 36, 38, 40, so look for channels 36+40
explicitly, instead of failing when encountering channel 38).

Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agoRestart sched_scan on channel list change
Victor Goldenshtein [Thu, 19 Mar 2015 14:41:39 +0000 (16:41 +0200)]
Restart sched_scan on channel list change

The channel list can be changed as a result of arriving beacon hints
during normal scan or as a result of local Reg-Domain change. Some
passive channels can become active and needs to be reconfigured
accordingly for the scheduled scan.

This fixes the connection to hidden SSIDs on 5 GHz band during default
Reg-Domain 00 (world roaming).

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agoRemove unused shared_freq driver op
Eliad Peller [Thu, 19 Mar 2015 14:41:43 +0000 (16:41 +0200)]
Remove unused shared_freq driver op

This driver op is not used anymore

Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agoFix hlr_auc_gw build with OpenSSL
Jouni Malinen [Fri, 20 Mar 2015 12:56:31 +0000 (14:56 +0200)]
Fix hlr_auc_gw build with OpenSSL

Commit 983c6a606bc839248ea0c69090e60c095a655bc6 ('OpenSSL: Replace
internal HMAC-MD5 implementation') forgot to make inclusion of md5.o
conditional for hlr_auc_gw build.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agonl80211: Fix vendor command handling
Zefir Kurtisi [Wed, 18 Mar 2015 17:26:59 +0000 (18:26 +0100)]
nl80211: Fix vendor command handling

In wiphy_info_handler(), vendor specific commands were
interpreted as QCA specific without checking for the OUI,
which caused incorrect setting of driver flags with
commands from other vendors. As a result, that could
prevent proper operation (e.g., inability to process CSA).

This patch ensures that QCA vendor specific commands are
checked against QCA OUI before related flags are set.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
9 years agoFix CONFIG_EAP_UNAUTH_TLS without CONFIG_EAP_TLS build
Jouni Malinen [Fri, 20 Mar 2015 12:42:13 +0000 (14:42 +0200)]
Fix CONFIG_EAP_UNAUTH_TLS without CONFIG_EAP_TLS build

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: INTERWORKING_SELECT blocking SCAN
Jouni Malinen [Fri, 20 Mar 2015 12:39:16 +0000 (14:39 +0200)]
tests: INTERWORKING_SELECT blocking SCAN

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoInterworking: Prevent scan during ANQP fetch and Interworking select
Neelansh Mittal [Thu, 19 Mar 2015 19:02:44 +0000 (00:32 +0530)]
Interworking: Prevent scan during ANQP fetch and Interworking select

Reject external scan request while either ANQP fetch or Interworking
select is in progress. Not doing so could lead to a situation in which
Interworking automatic network selection does not get triggered because
of a new scan result event forcing the ANQP fetch cycle to be disrupted
and restarted all over again. Interworking automatic network selection
is only triggered when AQNP fetch cycle, that is, ANQP exchange with
every Interworking capable BSS in the current BSS list, is completed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: AP-STA-POSSIBLE-PSK-MISMATCH
Jouni Malinen [Thu, 19 Mar 2015 11:18:44 +0000 (13:18 +0200)]
tests: AP-STA-POSSIBLE-PSK-MISMATCH

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoAdd a AP mode event message for possible PSK/passphrase mismatch
Jouni Malinen [Thu, 19 Mar 2015 11:14:21 +0000 (13:14 +0200)]
Add a AP mode event message for possible PSK/passphrase mismatch

If the AP/Authenticator receives an EAPOL-Key msg 2/4 for an association
that negotiated use of PSK and the EAPOL-Key MIC does not match, it is
likely that the station is trying to use incorrect PSK/passphrase.
Report this with "AP-STA-POSSIBLE-PSK-MISMATCH <STA addr>" control
interface event.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Disable and re-enable hostapd interface
Jouni Malinen [Thu, 19 Mar 2015 10:57:37 +0000 (12:57 +0200)]
tests: Disable and re-enable hostapd interface

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoRemove SChannel support
Jouni Malinen [Wed, 18 Mar 2015 20:31:36 +0000 (22:31 +0200)]
Remove SChannel support

SChannel/CryptoAPI as a TLS/crypto library alternative was never
completed. Critical functionality is missing and there are bugs in this
implementation. Since there are no known plans of completing this
support, it is better to remove this code.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agowpa_gui: Documentation update
Arkadiusz (Arkq) Bokowy [Sun, 15 Mar 2015 22:29:44 +0000 (23:29 +0100)]
wpa_gui: Documentation update

In the commit 77b244d577a7cb5c928478627af6687a0733193d9 ('wpa_gui: Quiet
mode - disable tray icon messages') a new parameter has been introduced,
but it was not documented. This commit fixes this omission.

Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
9 years agohostapd: Add channel 140 to allowed HT40 channel pairs
Peter Oh [Sat, 14 Mar 2015 00:26:34 +0000 (17:26 -0700)]
hostapd: Add channel 140 to allowed HT40 channel pairs

Channel 140 is needed as allowed HT40 channel pair to use
channel 144 introduced in 802.11ac for VHT40 and VHT80.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
9 years agotests: GET ip_addr_go
Jouni Malinen [Sun, 15 Mar 2015 19:03:39 +0000 (21:03 +0200)]
tests: GET ip_addr_go

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agowpa_cli: Add missing parameters for "set" command completion routine
Mikael Kanstrup [Sat, 14 Mar 2015 23:37:08 +0000 (00:37 +0100)]
wpa_cli: Add missing parameters for "set" command completion routine

Some config parameters were missing in the "set" command completion
routine. Add missing parameters and while at it put the parameters
under compiler switches so only valid ones are shown.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agowpa_cli: Add completion routine for "get" command
Mikael Kanstrup [Sat, 14 Mar 2015 23:37:07 +0000 (00:37 +0100)]
wpa_cli: Add completion routine for "get" command

Add tab completion function that includes all available "get"
parameters.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agoAdd IPv4 support function for "get" control interface command
Mikael Kanstrup [Sat, 14 Mar 2015 23:37:06 +0000 (00:37 +0100)]
Add IPv4 support function for "get" control interface command

Add support to retrieve IPv4 config variables with the "get" control
interface command. This allows the ip_addr_* parameters for P2P+NFC
IP address assignment to be fetched from the GO.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
9 years agoAdd AVG_BEACON_RSSI to SIGNAL_POLL output
Jouni Malinen [Sun, 15 Mar 2015 18:45:20 +0000 (20:45 +0200)]
Add AVG_BEACON_RSSI to SIGNAL_POLL output

If the driver reports separate signal strength average for Beacon
frames, report that in SIGNAL_POLL output.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Handle NL80211_ATTR_EXT_FEATURES attribute
Janusz Dziedzic [Tue, 10 Mar 2015 07:44:59 +0000 (08:44 +0100)]
nl80211: Handle NL80211_ATTR_EXT_FEATURES attribute

Handle NL80211_ATTR_EXT_FEATURES attribute and
NL80211_EXT_FEATURE_VHT_IBSS to determine whether
the driver supports VHT with IBSS.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
9 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Sun, 15 Mar 2015 18:34:40 +0000 (20:34 +0200)]
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2015-03-04.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoP2P: Move upper layer SD interaction into a separate file
Jouni Malinen [Sun, 15 Mar 2015 18:25:48 +0000 (20:25 +0200)]
P2P: Move upper layer SD interaction into a separate file

wpa_supplicant/p2p_supplicant.c has reached almost 10000 lines in length
and was getting a bit inconvenient to edit, so start splitting it into
separate files.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoFT: Avoid unnecessary allocation for MIC calculation
Jouni Malinen [Sun, 15 Mar 2015 18:18:14 +0000 (20:18 +0200)]
FT: Avoid unnecessary allocation for MIC calculation

Use the vector version of omac1_aes_128() to avoid unnecessary memory
allocation for each FTIE MIC calculation.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoThe master branch is now used for v2.5 development
Jouni Malinen [Sun, 15 Mar 2015 17:38:15 +0000 (19:38 +0200)]
The master branch is now used for v2.5 development

Signed-off-by: Jouni Malinen <j@w1.fi>