]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
8 years agotests: Optimize p2p_go_move_scm_multi initial wait
Jouni Malinen [Fri, 27 Nov 2015 17:31:44 +0000 (19:31 +0200)] 
tests: Optimize p2p_go_move_scm_multi initial wait

There is no need to wait for the initial client timeout in this type of
test sequence since that wait can be cleared by connecting and
disconnecting a client to the group. This allows the test case to be
executed much more quickly and the dependency on --long can be removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Convert p2p_go_move_scm_multi to use dynamic hwsim
Jouni Malinen [Fri, 27 Nov 2015 17:30:02 +0000 (19:30 +0200)] 
tests: Convert p2p_go_move_scm_multi to use dynamic hwsim

Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Convert p2p_go_move_scm_peer_does_not_support to dynamic hwsim
Jouni Malinen [Fri, 27 Nov 2015 17:27:25 +0000 (19:27 +0200)] 
tests: Convert p2p_go_move_scm_peer_does_not_support to dynamic hwsim

Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

In addition, remove dependency on --long since this test case does not
really take that long.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Convert p2p_go_move_scm_peer_supports to use dynamic hwsim
Jouni Malinen [Fri, 27 Nov 2015 17:24:33 +0000 (19:24 +0200)] 
tests: Convert p2p_go_move_scm_peer_supports to use dynamic hwsim

Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

In addition, remove dependency on --long since this test case does not
really take that long (just couple of seconds).

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Optimize p2p_go_move_scm initial wait
Jouni Malinen [Fri, 27 Nov 2015 17:20:11 +0000 (19:20 +0200)] 
tests: Optimize p2p_go_move_scm initial wait

There is no need to wait for the initial client timeout in this type of
test sequence since that wait can be cleared by connecting and
disconnecting a client to the group. This allows the test case to be
executed much more quickly and the dependency on --long can be removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Convert p2p_go_move_scm to use dynamic hwsim
Jouni Malinen [Fri, 27 Nov 2015 17:14:38 +0000 (19:14 +0200)] 
tests: Convert p2p_go_move_scm to use dynamic hwsim

Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Convert p2p_go_move_active to use dynamic hwsim
Jouni Malinen [Fri, 27 Nov 2015 17:11:27 +0000 (19:11 +0200)] 
tests: Convert p2p_go_move_active to use dynamic hwsim

Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Dynamic hwsim p2ps_channel_active_go_and_station_different_mcc
Jouni Malinen [Fri, 27 Nov 2015 17:01:10 +0000 (19:01 +0200)] 
tests: Dynamic hwsim p2ps_channel_active_go_and_station_different_mcc

Convert p2ps_channel_active_go_and_station_different_mcc to use a
dynamically added HWSimRadio to allow the MCC case to be covered with a
single test run with the mac80211_hwsim default radios disabling MCC.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoAbort ongoing scans on FLUSH command
Jouni Malinen [Thu, 26 Nov 2015 23:09:42 +0000 (01:09 +0200)] 
Abort ongoing scans on FLUSH command

This may speed up some hwsim test case sequencies by avoiding a wait for
a scan at the end of a test case to complete.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Use wlantest without capture file write buffering
Jouni Malinen [Thu, 26 Nov 2015 22:12:38 +0000 (00:12 +0200)] 
tests: Use wlantest without capture file write buffering

This makes the run_tshark() operations more reliable while still
allowing to reduce the extra wait by forcing wlantest to flush the
packets to the pcapng file.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agowlantest: Add -N command line argument to remove write buffering
Jouni Malinen [Thu, 26 Nov 2015 22:10:53 +0000 (00:10 +0200)] 
wlantest: Add -N command line argument to remove write buffering

This makes it easier to do live parsing of captured pcap files from
wlantest without having to rename and restart the capture file. Packet
writes are flushed to disk after each packet if -N is included in the
command line.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Clean up frequency list in scan_dfs
Jouni Malinen [Thu, 26 Nov 2015 21:42:30 +0000 (23:42 +0200)] 
tests: Clean up frequency list in scan_dfs

This makes the test log more readable by converting the values to
integers and sorting the array.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: VHT with 80 MHz channel width and local power constraint
Jouni Malinen [Thu, 26 Nov 2015 18:40:40 +0000 (20:40 +0200)] 
tests: VHT with 80 MHz channel width and local power constraint

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agohostapd: Add Transmit Power Envelope IE when VHT is enabled
Rajkumar Manoharan [Mon, 23 Nov 2015 13:10:26 +0000 (18:40 +0530)] 
hostapd: Add Transmit Power Envelope IE when VHT is enabled

Add Transmit Power Envelope element defined in IEEE P802.11-REVmc/D4.3,
8.4.2.161.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
8 years agotests: Abort scan
Jouni Malinen [Tue, 27 Oct 2015 09:06:14 +0000 (11:06 +0200)] 
tests: Abort scan

This verifies the nl80211 behavior to abort a scan on an explicit
control interface request and on connection request.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoAdd control interface command for aborting an ongoing scan
Jouni Malinen [Tue, 27 Oct 2015 08:58:52 +0000 (10:58 +0200)] 
Add control interface command for aborting an ongoing scan

The new ABORT_SCAN command can be used to request an ongoing scan to be
aborted.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoAbort an ongoing scan before connect
Kanchanapally, Vidyullatha [Mon, 19 Oct 2015 14:00:34 +0000 (19:30 +0530)] 
Abort an ongoing scan before connect

Connect radio work is sometimes delayed for a considerable duration if
there is an ongoing scan radio work. To avoid these delays abort the
ongoing scan on that interface before queuing a connect request. Upon a
scan done indication from the driver, connect radio work will be
scheduled.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Add support for aborting an ongoing scan
Kanchanapally, Vidyullatha [Mon, 19 Oct 2015 14:00:34 +0000 (19:30 +0530)] 
nl80211: Add support for aborting an ongoing scan

This adds the driver interface commands for issuing a request to abort
an ongoing scan operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Tue, 27 Oct 2015 08:54:09 +0000 (10:54 +0200)] 
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2015-11-26.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Scan on DFS channels
Jouni Malinen [Thu, 26 Nov 2015 17:24:25 +0000 (19:24 +0200)] 
tests: Scan on DFS channels

This is a test case for mac80211 behavior regarding active scanning on
DFS channels.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Open mesh network on VHT 80+80 MHz channel
Jouni Malinen [Thu, 26 Nov 2015 15:56:45 +0000 (17:56 +0200)] 
tests: Open mesh network on VHT 80+80 MHz channel

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: IBSS on VHT 80+80 MHz channel
Jouni Malinen [Thu, 26 Nov 2015 15:48:55 +0000 (17:48 +0200)] 
tests: IBSS on VHT 80+80 MHz channel

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agomesh: Clear wpa_s cipher selection on starting mesh
Jouni Malinen [Thu, 26 Nov 2015 16:45:59 +0000 (18:45 +0200)] 
mesh: Clear wpa_s cipher selection on starting mesh

This is needed to avoid hitting WEP/TKIP detection in
ibss_mesh_setup_freq() if the previous connection used WEP or TKIP.
Previously, that could have resulted in VHT and HT getting disabled for
the mesh connection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Fix SIGNAL_POLL in IBSS and mesh
Jouni Malinen [Thu, 26 Nov 2015 15:47:36 +0000 (17:47 +0200)] 
nl80211: Fix SIGNAL_POLL in IBSS and mesh

NL80211_CMD_GET_STATION does not work with the IBSS/mesh BSSID, so clear
the signal strength instead of returning failure when SIGNAL_POLL is
used in an IBSS/mesh.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoIBSS/mesh: Add support for VHT80P80 configuration
Ahmad Kholaif [Wed, 25 Nov 2015 03:51:43 +0000 (19:51 -0800)] 
IBSS/mesh: Add support for VHT80P80 configuration

A new network profile configuration parameter max_oper_chwidth=3 can be
used to specify preference to enable 80+80 MHz VHT channel for IBSS. If
that is set, the first 80 MHz segment is specified based on the
frequency parameter in the network profile and the second segment is
selected automatically (which will practically be limited to a single
possibility due to DFS requirements in most countries).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: P2P client joining a group before having found GO Device Address
Jouni Malinen [Thu, 26 Nov 2015 13:17:06 +0000 (15:17 +0200)] 
tests: P2P client joining a group before having found GO Device Address

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: AP with open mode and REASSOCIATE not finding a match
Jouni Malinen [Thu, 26 Nov 2015 10:23:19 +0000 (12:23 +0200)] 
tests: AP with open mode and REASSOCIATE not finding a match

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Verify P2P group formation with 80+80 MHz channel
Jouni Malinen [Thu, 29 Oct 2015 18:47:36 +0000 (20:47 +0200)] 
tests: Verify P2P group formation with 80+80 MHz channel

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Add support for VHT 80+80 MHz and 160 MHz
Ahmad Kholaif [Wed, 28 Oct 2015 21:14:10 +0000 (14:14 -0700)] 
P2P: Add support for VHT 80+80 MHz and 160 MHz

The new max_oper_chwidth and freq2 arguments to P2P_CONNECT, P2P_INVITE,
and P2P_GROUP_ADD control interface commands can be used to request
larger VHT operating channel bandwidth to be used than the previously
used maximum 80 MHz.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Add VHT 160 MHz channel flags
Ahmad Kholaif [Wed, 28 Oct 2015 21:14:10 +0000 (14:14 -0700)] 
nl80211: Add VHT 160 MHz channel flags

This extends the previous design that covered only the VHT 80 MHz cases
for VHT channel flags. New functions are introduced to allow 160 MHz
bandwidth cases to determine the center channel and check availability
of a 160 MHz channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoP2P: Define operating classes for VHT 80+80 and 160
Ahmad Kholaif [Wed, 28 Oct 2015 21:14:10 +0000 (14:14 -0700)] 
P2P: Define operating classes for VHT 80+80 and 160

This adds definitions for the global operating classes 129 and 130 for
VHT 80+80 MHz and 160 MHz use cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFST: Improve parsing of Multiband IEs
Dedy Lansky [Sun, 22 Nov 2015 12:46:54 +0000 (14:46 +0200)] 
FST: Improve parsing of Multiband IEs

Previously, MB IEs were parsed only from association event. Try to get
MB IEs from other management frames like Probe Response frames. The MB
IEs from the association event may not be up-to-date and in some cases
may actually be missing and updating the information based on other
frames can improve robustness of FST exchanges.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFST: Make FST peer connection check more permissive in hostapd
Anton Nayshtut [Tue, 10 Nov 2015 13:51:07 +0000 (15:51 +0200)] 
FST: Make FST peer connection check more permissive in hostapd

Modify the FST peer connection check so it won't skip peers without MB
IEs making it more permissive for peers that didn't provide MB IEs
during association request. This can be helpful, e.g., in cases where a
STA's interface connected before it was added to the FST group. This
allows the AP to receive FST Action frames and initiate session with a
STA via STA's interface that doesn't expose MB IEs.

The adjusted FST protocol is still safe, as it protects itself in many
other ways (checking band info and it's accordance to the interfaces,
Setup IDs, connection states of the interfaces involved, etc.)
effectively avoiding all types of invalid situations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Import p2p_utils instead of functions from old locations
Jouni Malinen [Wed, 25 Nov 2015 13:47:16 +0000 (15:47 +0200)] 
tests: Import p2p_utils instead of functions from old locations

These couple of files were forgotten when moving P2P helper functions
into the new p2p_utils.py file.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Print test name to kernel log buffer
Johannes Berg [Tue, 24 Nov 2015 12:27:57 +0000 (13:27 +0100)] 
tests: Print test name to kernel log buffer

Print the test name to the kernel log buffer so debugging
cross-test issues becomes easier.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoRemove wpa_supplicant/tests
Jouni Malinen [Mon, 23 Nov 2015 21:55:33 +0000 (23:55 +0200)] 
Remove wpa_supplicant/tests

There was only a single file remaining in this directory. All the other
old test functionality has been moved under the top level tests
directory. Move the remaining file to the wpa_supplicant directory to
get rid of the subdirectory.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Move EAP-SIM PRF module test into the hwsim framework
Jouni Malinen [Mon, 23 Nov 2015 21:52:52 +0000 (23:52 +0200)] 
tests: Move EAP-SIM PRF module test into the hwsim framework

The old wpa_supplicant/Makefile target test-eap_sim_common did not work
anymore and anyway, this test is better placed in the newer hwsim
framework to make sure the test case gets executed automatically.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoRemove link_test and test_wpa
Jouni Malinen [Mon, 23 Nov 2015 21:45:10 +0000 (23:45 +0200)] 
Remove link_test and test_wpa

These wpa_supplicant test programs have not been maintained for years
and it would take significant effort to get these into working state.
Since there does not seem to be any real need for these based on lack of
maintenance, it is easier to just drop these tools for now.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoFix CONFIG_NO_WPA=y build
Jouni Malinen [Mon, 23 Nov 2015 21:34:52 +0000 (23:34 +0200)] 
Fix CONFIG_NO_WPA=y build

Number of places were calling functions that are not included in
CONFIG_NO_WPA=y build anymore. Comment out such calls. In addition, pull
in SHA1 and MD5 for config_internal.c, if needed.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoComment out wpas_reenabled_network_time with CONFIG_NO_SCAN_PROCESSING
Jouni Malinen [Mon, 23 Nov 2015 21:33:55 +0000 (23:33 +0200)] 
Comment out wpas_reenabled_network_time with CONFIG_NO_SCAN_PROCESSING

This removes a compiler warning about unused function.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Make FST tests aware of unconditional station's MB IE exposure
Anton Nayshtut [Wed, 18 Nov 2015 17:00:40 +0000 (19:00 +0200)] 
tests: Make FST tests aware of unconditional station's MB IE exposure

This syncs the test cases with the implementation change in station's MB
IE creation. FST tests should expect MB IE regardless of the station
connection state and whether the current connection is FST-enabled or
not. This fixes the follow test cases that started reporting failures
with the previous commit change in src/fst/fst_group.c:
fst_disconnect_1_of_2_stas_from_non_fst_ap
fst_sta_connect_to_non_fst_ap
fst_second_sta_connect_to_non_fst_ap
fst_disconnect_2_of_2_stas_from_non_fst_ap
fst_second_sta_connect_to_fst_ap
fst_disconnect_1_of_2_stas_from_fst_ap

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFST: Fix STA MB IEs creation
Anton Nayshtut [Wed, 12 Aug 2015 09:04:22 +0000 (12:04 +0300)] 
FST: Fix STA MB IEs creation

FST STA should always expose its MB IEs regardless of its connection
state and whether the connected AP is currently FST-enabled or not.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Test no P2P GO move when invitation is in progress
Ilan Peer [Sun, 22 Nov 2015 13:57:52 +0000 (15:57 +0200)] 
tests: Test no P2P GO move when invitation is in progress

Add a test to verify that a P2P GO does not start a CSA
once invitation signalling is done, and the P2P client is
about to connect.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
8 years agoP2P: Add a testing option to force P2P GO CSA
Ilan Peer [Sun, 22 Nov 2015 13:57:51 +0000 (15:57 +0200)] 
P2P: Add a testing option to force P2P GO CSA

Add a testing option to force a P2P GO CSA on successful
invitation to join an active P2P GO.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
8 years agoP2P: Set p2p_go_wait_client in invitation_result() cb
Ilan Peer [Sun, 22 Nov 2015 13:57:50 +0000 (15:57 +0200)] 
P2P: Set p2p_go_wait_client in invitation_result() cb

When an invitation to join an existing group is accepted by the
peer device, set p2p_go_wait_client to the current time so
that wpas_p2p_in_progress() would return != 0, thus preventing
P2P CSA, scanning etc., that would interfere with the peer
device connection.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Make dbus_p2p_group_idle_timeout more robust
Jouni Malinen [Sun, 22 Nov 2015 19:28:49 +0000 (21:28 +0200)] 
tests: Make dbus_p2p_group_idle_timeout more robust

This test case was failing if a PropertiesChanged signal for P2P peer
gets delivered from a previous test case. Avoid that by waiting for the
new group to be formed before processing any PropertiesChanged signals.

This failure was triggered by the following test case sequence:
dbus_p2p_two_groups dbus_p2p_group_idle_timeout

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoAndroid: Give user the option for selecting browser for HS 2.0 OSU
Somdas Bandyopadhyay [Tue, 3 Nov 2015 12:48:35 +0000 (18:18 +0530)] 
Android: Give user the option for selecting browser for HS 2.0 OSU

When built with browser-android.c, hs20-osu-client used to always launch
the native/stock Android browser for OSU user interaction. This browser
is not present in all devices. It is better to give the option to the
user to select his/her browser.

Here the user will be shown a pop up to select the browser that he/she
wants.

Signed-off-by: Somdas Bandyopadhyay <somdas.bandyopadhyay@intel.com>
8 years agotests: Make ap_open_select_twice less likely to fail
Jouni Malinen [Sun, 22 Nov 2015 18:14:06 +0000 (20:14 +0200)] 
tests: Make ap_open_select_twice less likely to fail

It looks like a previous P2P test case can cause the initial single
channel scan in ap_open_select_twice take more than five seconds in some
cases. While that is not really expected behavior, this test case should
not fail. Increase the timeout to avoid reporting false failures here.

This could be triggered with the following test case sequence:
p2p_msg_unexpected_go_neg_resp ap_open_select_twice

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: INTERFACE_ADD create testing coverage
Jouni Malinen [Sun, 22 Nov 2015 15:59:54 +0000 (17:59 +0200)] 
tests: INTERFACE_ADD create testing coverage

This covers an invalid interface type and interface type 'sta'.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: wpa_supplicant interface creation in AP mode
Ilan Peer [Tue, 3 Nov 2015 14:30:12 +0000 (16:30 +0200)] 
tests: wpa_supplicant interface creation in AP mode

Add a test case that creates a new interface in AP mode.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
8 years agowpa_cli: Add an option to set created interface type
Avraham Stern [Tue, 3 Nov 2015 14:30:11 +0000 (16:30 +0200)] 
wpa_cli: Add an option to set created interface type

Add an option to set the interface type when creating
a driver interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agoAdd an option to create interface of a certain type with INTERFACE_ADD
Avraham Stern [Tue, 3 Nov 2015 14:30:10 +0000 (16:30 +0200)] 
Add an option to create interface of a certain type with INTERFACE_ADD

Some drivers do not support having two station interfaces, so the fact
that wpa_supplicant always creates a new interface in station mode, even
if it will be used as another type of interface, may prevent
wpa_supplicant from creating new interfaces. Allow setting the interface
type when a new interface is created so that interfaces of supported
types can be created.

Currently supported types are station ("sta") and AP ("ap"). If the
interface type is not specified, a station interface will be created.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agodriver: Make setting up AP optional when creating AP interface
Avraham Stern [Tue, 3 Nov 2015 14:30:09 +0000 (16:30 +0200)] 
driver: Make setting up AP optional when creating AP interface

When an AP interface it created, it is also setup and subscribes
for management frames etc. However, when the interface is added by
wpa_supplicant, setting up for AP operations is redundant because
it will be done by wpa_supplicant on wpa_drv_init() when setting
the interface mode to AP.

In addition, it may cause wpa_supplicant to fail initializing the
interface as it will try to subscribe for management frames on this
interface but the interface is already registered.

Change this, so when adding an AP interface, make setting up the AP
optional, and use it only when the interface is added by hostapd but not
when it is added by wpa_supplicant.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agoCheck for LIBRESSL_VERSION_NUMBER in tls_openssl.c
Marek Behún [Tue, 17 Nov 2015 15:21:02 +0000 (16:21 +0100)] 
Check for LIBRESSL_VERSION_NUMBER in tls_openssl.c

LibreSSL does not yet support the new API, so do not use it
when LIBRESSL_VERSION_NUMBER macro is defined.

Signed-off-by: Marek Behun <kabel@blackhole.sk>
8 years agotests: Clear scan cache at the start of ap_vht80*
Jouni Malinen [Sat, 21 Nov 2015 17:04:12 +0000 (19:04 +0200)] 
tests: Clear scan cache at the start of ap_vht80*

These test cases depend on the HT40 co-ex scans not swapping PRI/SEC
channels. It was possible for a test case to fail, e.g., in the
following sequence: ap_ht40_5ghz_match ap_vht80b.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoP2P: Clear send action work without waiting on find/stop/listen
Avraham Stern [Tue, 3 Nov 2015 14:25:01 +0000 (16:25 +0200)] 
P2P: Clear send action work without waiting on find/stop/listen

When clearing pending TX action to start a new P2P operation like
P2P_FIND or P2P_LISTEN, wpas_p2p_action_tx_clear() was used to clear
the send action work. However, in cases where the action work has wait
time, it is not cleared immediately but only after the wait time ends.
This may cause delay in starting the P2P operation.

Fix that by always clearing the send action work immediately on these
P2P commands that result in immediate P2P state change and practically
stopping a previous operation, if one was pending.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agoAP: Avoid 20/40 MHz co-ex scan if PRI/SEC switch is not allowed
Alexander Bondar [Tue, 3 Nov 2015 14:25:00 +0000 (16:25 +0200)] 
AP: Avoid 20/40 MHz co-ex scan if PRI/SEC switch is not allowed

When an AP is started on the 5.2 GHz band with 40 MHz bandwidth, a
scan is issued in order to handle 20/40 MHz coexistence. However,
the scan is issued even if iface->conf->no_pri_sec_switch is set,
which is redundant.

Fix this by checking iface->conf->no_pri_sec_switch before starting
the scan.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
8 years agonl80211: Clear ignore_next_local_deauth flag
Ayala Beker [Tue, 3 Nov 2015 14:24:57 +0000 (16:24 +0200)] 
nl80211: Clear ignore_next_local_deauth flag

The de-authentication flow in wpa_driver_nl80211_deauthenticate() can
result in a locally generated de-authentication event. To avoid getting
this extra event ignore_next_local_deauth flag is set, and should be
cleared when the next local deauth event is received. However, it is not
cleared when the event shows up after the wpa_supplicant has started a
connection with a new AP, and as a result it might ignore future
deauth event from the driver.

Fix this by clearing the flag if the event is locally generated.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
8 years agonl80211: Clear ignore_next_local_deauth and ignore_deauth_event
Sara Sharon [Tue, 3 Nov 2015 14:24:56 +0000 (16:24 +0200)] 
nl80211: Clear ignore_next_local_deauth and ignore_deauth_event

The authentication flow in wpa_driver_nl80211_authenticate() can
result  in a locally generated de-authentication, in which both
next_local_deauth and ignore_next_local_deauth are set.

However, in mlme_event_deauth_disassoc(), when ignore_deauth_event is
set, the flag is cleared, but the flow immediately returns leaving
ignore_next_local_deauth set, which can result in ignoring future deauth
event from the driver, leaving the wpa_supplicant in an inconsistent
state.

Fix this by clearing both flags in case that next_local_deauth is set.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
8 years agotests: EAP-pwd local error cases
Jouni Malinen [Sat, 21 Nov 2015 15:40:44 +0000 (17:40 +0200)] 
tests: EAP-pwd local error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: EAP-MD5 local error cases
Jouni Malinen [Sat, 21 Nov 2015 15:06:41 +0000 (17:06 +0200)] 
tests: EAP-MD5 local error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoAdd QCA vendor attribute and event to indicate subnet change status
Ravi Joshi [Mon, 16 Nov 2015 06:05:05 +0000 (22:05 -0800)] 
Add QCA vendor attribute and event to indicate subnet change status

This allows offloaded roaming to inform user space of the change in IP
subnet post roaming. The device may have roamed to a network which is in
a different subnet which will result in IP connectivity loss. Indicating
the change in subnet enables the user space to refresh the IP address or
to perform IP subnet validation if unknown status is indicated.

The driver indication is reported with a new event from wpa_supplicant
in the following format:
CTRL-EVENT-SUBNET-STATUS-UPDATE status=<0/1/2>
where
0 = unknown
1 = IP subnet unchanged (can continue to use the old IP address)
2 = IP subnet changed (need to get a new IP address)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: AP with open mode and select network twice
Jouni Malinen [Thu, 19 Nov 2015 22:48:25 +0000 (00:48 +0200)] 
tests: AP with open mode and select network twice

This verifies that the second SELECT_NETWORK for the same network starts
a new scan immediately if the previous connection attempt is waiting for
the next scan iteration to start.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoSkip SELECT_NETWORK steps only if already connected or connecting
Jouni Malinen [Thu, 19 Nov 2015 22:45:40 +0000 (00:45 +0200)] 
Skip SELECT_NETWORK steps only if already connected or connecting

Commit 2a6f78fbbefc34fec6685d08f46797c4ef4b2a6e ('Do not re-associate on
SELECT_NETWORK to current network') started skipping all SELECT_NETWORK
connection steps if the selected network had already been selected
previously. This happened regardless of whether the connection was
already established. This is not necessarily desirable for all cases
where there is no immediate action to even try to connect (e.g., long
wait for the next scan).

Speed this up by allowing the SELECT_NETWORK operation to get started if
there is no connection or ongoing connection attempt with the selected
network.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: PMKSA caching and EAPOL reauthentication
Jouni Malinen [Thu, 19 Nov 2015 19:14:50 +0000 (21:14 +0200)] 
tests: PMKSA caching and EAPOL reauthentication

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Verify EAPOL reauthentication after FT protocol
Jouni Malinen [Thu, 19 Nov 2015 19:05:08 +0000 (21:05 +0200)] 
tests: Verify EAPOL reauthentication after FT protocol

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFix EAPOL reauth after FT protocol or offloaded PMKSA cache use
Jouni Malinen [Thu, 19 Nov 2015 19:01:45 +0000 (21:01 +0200)] 
Fix EAPOL reauth after FT protocol or offloaded PMKSA cache use

The EAP peer state machine moved from IDLE to FAILURE state when the
EAPOL Authenticator triggered reauthentication with an
EAP-Request/Identity in a case where the associated started with FT
protocol or offloaded PMKSA cache use (4-way handshake using a
previously acquired PMK). This happened due to the altSuccess=TRUE
setting being left behind and not cleared when processing the restart of
authentication. Fix this by clearing altAccept and eapSuccess when going
through SUPP_PAE RESTART state.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoFT auth: Fix EAPOL reauthentication after FT protocol run
Jouni Malinen [Thu, 19 Nov 2015 18:32:04 +0000 (20:32 +0200)] 
FT auth: Fix EAPOL reauthentication after FT protocol run

The EAPOL AUTH_PAE state machine was left in incomplete state at the
completion of FT protocol. Set portValid = TRUE to allow the state
machine to proceed from AUTHENTICATING to AUTHENTICATED state, so that a
new EAPOL reauthentication can be triggered.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Clear FST sessions at the end of fst_setup_mbie_diff
Jouni Malinen [Thu, 19 Nov 2015 15:33:34 +0000 (17:33 +0200)] 
tests: Clear FST sessions at the end of fst_setup_mbie_diff

This avoids issues with following test cases failing due to unexpected
starting state. This issue showed up with the following hwsim test case
sequence:
fst_setup_mbie_diff fst_dynamic_iface_attach

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoAdd VHT support for Mesh
Peter Oh [Tue, 10 Nov 2015 19:01:20 +0000 (11:01 -0800)] 
Add VHT support for Mesh

Mesh Points themselves have capability to support VHT as long as
hardware supports it. However, supporting VHT in mesh mode was disabled
because no one had clearly tested and confirmed its functionality. Since
VHT80 has now been verified to work with ath10k QCA988X driver and
mac80211_hwsim, enable VHT support in mesh mode.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
8 years agoSet WMM flag to Mesh STA by default
Peter Oh [Tue, 10 Nov 2015 03:20:29 +0000 (19:20 -0800)] 
Set WMM flag to Mesh STA by default

Set WLAN_STA_WMM flag to Mesh STA by default since Mesh STAs are QoS
STAs. Mesh STA's HT capabilities won't be parsed properly without the
flag.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
8 years agoAssign QCA vendor command and attribute for Tx power reduction in dB
Peng Xu [Thu, 5 Nov 2015 00:47:04 +0000 (16:47 -0800)] 
Assign QCA vendor command and attribute for Tx power reduction in dB

Assign nl80211 vendor command
QCA_NL80211_VENDOR_SUBCMD_SET_TXPOWER_DECR_DB and corresponding
attributes.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Clear scan cache at the end of ap_wps_per_station_psk
Jouni Malinen [Wed, 18 Nov 2015 16:03:22 +0000 (18:03 +0200)] 
tests: Clear scan cache at the end of ap_wps_per_station_psk

It was possible for the WPS PBC state to get cached through to the
following test cases and that would trigger false failures. Fix this by
explicitly clearing the scan cache at the end of ap_wps_per_station_psk.
This issue was triggered with the following test case sequence:
ap_wps_per_station_psk autogo_pbc

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Do not return incomplete hw capability info
Jouni Malinen [Tue, 17 Nov 2015 17:01:15 +0000 (19:01 +0200)] 
nl80211: Do not return incomplete hw capability info

If a memory allocation fails while parsing driver capabilities, drop all
mode/channel/rate information instead of returning possibly partial
information.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Force hw capability re-fetch at the end of dbus_connect_oom
Jouni Malinen [Tue, 17 Nov 2015 17:00:21 +0000 (19:00 +0200)] 
tests: Force hw capability re-fetch at the end of dbus_connect_oom

This is needed since the forced OOM may have forced the cached
information to be invalid or dropped. This issue was hit with the
following hwsim test case sequence:
ap_interworking_scan_filtering fst_sta_config_llt_large dbus_connect_oom
wpas_ctrl_enable_disable_network

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoWPS: Reconnect for a failed data connection when STA_AUTOCONNECT is 0
Sunil Dutt [Mon, 16 Nov 2015 15:02:56 +0000 (20:32 +0530)] 
WPS: Reconnect for a failed data connection when STA_AUTOCONNECT is 0

If "STA_AUTOCONNECT 0" has been used to disable automatic connection on
disconnection event and the driver indicates a failure for the data
connection after successful WPS handshake, it is possible to hit a case
where wpa_s->disconnected is set to 1 and further attempts to connect
shall stop.

While "STA_AUTOCONNECT 0" is used to disable automatic reconnection
attempts in general, this specific WPS case can benefit from trying
again even with that configuration for a short period of time. Extend
the wpa_supplicant re-enable-networks-after-WPS 10 second timeout to
apply for ignoring disabled STA_AUTOCONNECT immediately after a WPS
provisioning step.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: D-Bus P2P and InvitationReceived
Jouni Malinen [Tue, 17 Nov 2015 16:03:06 +0000 (18:03 +0200)] 
tests: D-Bus P2P and InvitationReceived

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agodbus: Fix memory leak in sending InvitationReceived signal
MAYANK HAARIT [Tue, 17 Nov 2015 06:19:57 +0000 (06:19 +0000)] 
dbus: Fix memory leak in sending InvitationReceived signal

Free the message after message send in
wpas_dbus_signal_p2p_invitation_received() to avoid leaking memory.

Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
8 years agohostapd: Process MAC ACLs on a station association event (SME in driver)
Anton Nayshtut [Thu, 22 Oct 2015 16:48:04 +0000 (19:48 +0300)] 
hostapd: Process MAC ACLs on a station association event (SME in driver)

Now hostapd will use station MAC-based permissions according to the
macaddr_acl policy also for drivers which use AP SME offload, but do not
support NL80211_CMD_SET_MAC_ACL for offloading MAC ACL processing. It
should be noted that in this type of case the association goes through
and the station gets disconnected immediately after that.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoRSN: Remove check for proactive_key_caching while setting PMK offload
Amarnath Hullur Subramanyam [Thu, 12 Nov 2015 20:37:04 +0000 (12:37 -0800)] 
RSN: Remove check for proactive_key_caching while setting PMK offload

wpa_sm_key_mgmt_set_pmk() was checking for proactive_key_caching to be
enabled before setting the PMK to the driver. This check is not required
and would mandate configuration setting of okc or proactive_key_caching
for cases which were not necessary.

Signed-off-by: Amarnath Hullur Subramanyam <amarnath@qca.qualcomm.com>
8 years agoExtend QCA roam event with subnet change indication
Ravi Joshi [Mon, 16 Nov 2015 17:00:35 +0000 (19:00 +0200)] 
Extend QCA roam event with subnet change indication

The new attribute can be used with
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH to indicate whether the IP
subnet was detected to have changed when processing offloaded roam/key
management.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agodbus: Do not use pointer arithmetic with a void pointer
Samuel Tan [Thu, 5 Nov 2015 19:08:22 +0000 (11:08 -0800)] 
dbus: Do not use pointer arithmetic with a void pointer

This failed to compile on x86 gcc due to pointer arithmetic on a void
pointer.

Signed-off-by: Samuel Tan <samueltan@google.com>
8 years agoAndroid: Use libdbus rather than dbus-1
Samuel Tan [Thu, 5 Nov 2015 18:48:48 +0000 (10:48 -0800)] 
Android: Use libdbus rather than dbus-1

The upstream wpa_supplicant uses the dbus-1 library when it is compiled
with D-Bus support. In Android, we imported the D-Bus shared libraries
under the name "libdbus", so use this shared library instead of dbus-1
when compiling wpa_supplicant with D-Bus support.

Signed-off-by: Samuel Tan <samueltan@google.com>
8 years agoDocument passive_scan option for wpa_supplicant.conf
Ben Greear [Thu, 5 Nov 2015 00:49:39 +0000 (19:49 -0500)] 
Document passive_scan option for wpa_supplicant.conf

This should save the next person to need this behavior some time.

Signed-off-by: Ben Greear <greearb@candelatech.com>
8 years agonl80211: Add debug message for passive scanning
Ben Greear [Thu, 5 Nov 2015 00:49:38 +0000 (19:49 -0500)] 
nl80211: Add debug message for passive scanning

This is more obvious than looking for the lack of 'Scan SSID' messages.

Signed-off-by: Ben Greear <greearb@candelatech.com>
8 years agotests: D-Bus SaveConfig
Jouni Malinen [Sun, 15 Nov 2015 17:08:05 +0000 (19:08 +0200)] 
tests: D-Bus SaveConfig

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agodbus: Add SaveConfig to update configuration file
Purushottam Kushwaha [Tue, 3 Nov 2015 07:01:27 +0000 (07:01 +0000)] 
dbus: Add SaveConfig to update configuration file

This is similar to SAVE_CONFIG on control interface, which allow users
to update the configuration file.

Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
8 years agoP2P: Fix a typo in debug message
Purushottam Kushwaha [Tue, 3 Nov 2015 07:06:55 +0000 (07:06 +0000)] 
P2P: Fix a typo in debug message

Signed-off-by: Dilshad Ahmad <dilshad.a@samsung.com>
8 years agodbus: Fix a copy-paste error in debug print
Purushottam Kushwaha [Tue, 3 Nov 2015 07:03:58 +0000 (07:03 +0000)] 
dbus: Fix a copy-paste error in debug print

Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
8 years agotests: EAP-pwd protocol tests
Jouni Malinen [Sun, 1 Nov 2015 16:25:40 +0000 (18:25 +0200)] 
tests: EAP-pwd protocol tests

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP-pwd peer: Fix error path for unexpected Confirm message
Jouni Malinen [Sun, 1 Nov 2015 17:35:44 +0000 (19:35 +0200)] 
EAP-pwd peer: Fix error path for unexpected Confirm message

If the Confirm message is received from the server before the Identity
exchange has been completed, the group has not yet been determined and
data->grp is NULL. The error path in eap_pwd_perform_confirm_exchange()
did not take this corner case into account and could end up
dereferencing a NULL pointer and terminating the process if invalid
message sequence is received. (CVE-2015-5316)

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP-pwd server: Fix last fragment length validation
Jouni Malinen [Sun, 1 Nov 2015 16:24:16 +0000 (18:24 +0200)] 
EAP-pwd server: Fix last fragment length validation

All but the last fragment had their length checked against the remaining
room in the reassembly buffer. This allowed a suitably constructed last
fragment frame to try to add extra data that would go beyond the buffer.
The length validation code in wpabuf_put_data() prevents an actual
buffer write overflow from occurring, but this results in process
termination. (CVE-2015-5314)

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoEAP-pwd peer: Fix last fragment length validation
Jouni Malinen [Sun, 1 Nov 2015 16:18:17 +0000 (18:18 +0200)] 
EAP-pwd peer: Fix last fragment length validation

All but the last fragment had their length checked against the remaining
room in the reassembly buffer. This allowed a suitably constructed last
fragment frame to try to add extra data that would go beyond the buffer.
The length validation code in wpabuf_put_data() prevents an actual
buffer write overflow from occurring, but this results in process
termination. (CVE-2015-5315)

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoWNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been used
Jouni Malinen [Sun, 25 Oct 2015 21:02:14 +0000 (23:02 +0200)] 
WNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been used

The AP is not expected to send out a WNM-Sleep Mode Response frame
without the STA trying to use WNM-Sleep Mode. Drop such unexpected
responses to reduce unnecessary processing of the frame.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Start WNM-Sleep Mode in wnm_action_proto*
Jouni Malinen [Sun, 25 Oct 2015 21:01:21 +0000 (23:01 +0200)] 
tests: Start WNM-Sleep Mode in wnm_action_proto*

This is needed to avoid test case failures with additional state
validation in wpa_supplicant.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: WNM Action protocol testing (PMF disabled)
Jouni Malinen [Sun, 25 Oct 2015 13:47:31 +0000 (15:47 +0200)] 
tests: WNM Action protocol testing (PMF disabled)

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoWNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use
Jouni Malinen [Sun, 25 Oct 2015 13:45:50 +0000 (15:45 +0200)] 
WNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use

WNM Sleep Mode Response frame is used to update GTK/IGTK only if PMF is
enabled. Verify that PMF is in use before using this field on station
side to avoid accepting unauthenticated key updates. (CVE-2015-5310)

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Fix wpas_ctrl_network for builds without Suite B support
Jouni Malinen [Sun, 1 Nov 2015 22:30:00 +0000 (00:30 +0200)] 
tests: Fix wpas_ctrl_network for builds without Suite B support

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoDescribe preferred mechanism for submitting contributions
Jouni Malinen [Sun, 1 Nov 2015 19:15:08 +0000 (21:15 +0200)] 
Describe preferred mechanism for submitting contributions

Add pointers to the mailing list and some brief guidance on preferred
patch format.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agoUse "STATUS-NO_EVENTS" instead of "STATUS" in get_wpa_status function
Somdas Bandyopadhyay [Sun, 1 Nov 2015 06:53:45 +0000 (12:23 +0530)] 
Use "STATUS-NO_EVENTS" instead of "STATUS" in get_wpa_status function

Using "STATUS" command triggers CTRL-EVENT-STATE-CHANGE and
CTRL-EVENT-CONNECTED (if connected to some AP) events. These events
cause problems in Android WifiStateMachine in Marshmallow. Due to these
events WifiStateMachine sometimes disconnects the OSU SSID connection,
while hs20-osu-client waits for IP address.

Signed-off-by: Somdas Bandyopadhyay <somdas.bandyopadhyay@intel.com>