mech_eap.git
7 years agotests/remote: Fix usage of a non existing variable
Jonathan Afek [Thu, 19 May 2016 13:06:48 +0000 (16:06 +0300)]
tests/remote: Fix usage of a non existing variable

In monitor.py in the remote tests code there is fucntion create() that
creates standalone monitor interfaces. In this function there is an
iteration of the ifaces of the host by using the ifaces variable but
this variable is non-existing. This patch creates this variable before
its usage.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
7 years agowpaspy: Fix potentially referencing non existing attribute
Jonathan Afek [Thu, 19 May 2016 13:06:47 +0000 (16:06 +0300)]
wpaspy: Fix potentially referencing non existing attribute

In wpaspy.py in the Ctrl object constructor there is a try/except. In
the except part the code references the s attribute of the object. This
attribute is only created later in the try part. If an exception occurs
before the attribute creation then the except part references a non
existing attribute. Fix that by assigning None to the s attribute at the
beginning of the try part.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
7 years agotests/remote: Fix style and typos
Jonathan Afek [Thu, 19 May 2016 13:06:46 +0000 (16:06 +0300)]
tests/remote: Fix style and typos

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
7 years agotests/remote: Extend get_monitor_params() to support P2P interfaces
Jonathan Afek [Thu, 19 May 2016 13:06:45 +0000 (16:06 +0300)]
tests/remote: Extend get_monitor_params() to support P2P interfaces

This function is used for remote tests when a monitor interface is
needed on the channel on which the AP operates. This change enables us
to also query P2P interfaces for the channel information to use for
monitor interfaces.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
7 years agotests/remote: Use a function to add a log file to a remote host
Jonathan Afek [Thu, 19 May 2016 13:06:44 +0000 (16:06 +0300)]
tests/remote: Use a function to add a log file to a remote host

Instead of accessing the logs list member of the remote host directly,
use a function to add logs to the remote host to be collected after the
test. This enables us to later have different implementation of remote
hosts or logs collection without requiring to have this list as the
implementation.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
7 years agotests: Use 10 retries for over-the-air broadcast connectivity
Jonathan Afek [Tue, 24 May 2016 11:02:33 +0000 (14:02 +0300)]
tests: Use 10 retries for over-the-air broadcast connectivity

The regular hwsim tests use both unicast and broadcast frames to test
the connectivity between 2 interfaces. For real hardware (remote hwsim
tests) the broadcast frames will sometimes not be seen by all connected
stations since they can be in low power mode during DTIM or because
broadcast frames are not ACKed. Use 10 retries for broadcast
connectivity tests for real hardware so that the test will pass if we
successfully received at least one of them.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
7 years agowpa_cli: Run action file in case of an AP event
Jörg Krause [Mon, 23 May 2016 15:11:47 +0000 (17:11 +0200)]
wpa_cli: Run action file in case of an AP event

Run the action script in case of AP events "AP-ENABLED" and
"AP-DISABLED".

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
7 years agoOpenSSL: Comment out tls_connection_get_eap_fast_key without EAP-FAST
David Benjamin [Tue, 17 May 2016 17:24:43 +0000 (13:24 -0400)]
OpenSSL: Comment out tls_connection_get_eap_fast_key without EAP-FAST

This avoids internal access of structs and also removes the dependency
on the reimplemented TLS PRF functions when EAP-FAST support is not
enabled. Notably, BoringSSL doesn't support EAP-FAST, so there is no
need to access its internals with openssl_get_keyblock_size().

Signed-Off-By: David Benjamin <davidben@google.com>
7 years agotests: Fix ap_wpa2_eap_fast_prf_oom with the updated PRF implementation
Jouni Malinen [Mon, 23 May 2016 17:36:40 +0000 (20:36 +0300)]
tests: Fix ap_wpa2_eap_fast_prf_oom with the updated PRF implementation

This is needed to work with the tls_openssl.c changes that renamed the
function that is used for deriving the EAP-FAST keys.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoTLS: Split tls_connection_prf() into two functions
David Benjamin [Mon, 16 May 2016 15:47:37 +0000 (11:47 -0400)]
TLS: Split tls_connection_prf() into two functions

Most protocols extracting keys from TLS use RFC 5705 exporters which is
commonly implemented in TLS libraries. This is the mechanism used by
EAP-TLS. (EAP-TLS actually predates RFC 5705, but RFC 5705 was defined
to be compatible with it.)

EAP-FAST, however, uses a legacy mechanism. It reuses the TLS internal
key block derivation and derives key material after the key block. This
is uncommon and a misuse of TLS internals, so not all TLS libraries
support this. Instead, we reimplement the PRF for the OpenSSL backend
and don't support it at all in the GnuTLS one.

Since these two are very different operations, split
tls_connection_prf() in two. tls_connection_export_key() implements the
standard RFC 5705 mechanism that we expect most TLS libraries to
support. tls_connection_get_eap_fast_key() implements the
EAP-FAST-specific legacy mechanism which may not be implemented on all
backends but is only used by EAP-FAST.

Signed-Off-By: David Benjamin <davidben@google.com>
7 years agoOpenSSL: Remove two more accesses of ssl_ctx->cert_store
David Benjamin [Mon, 16 May 2016 14:17:31 +0000 (10:17 -0400)]
OpenSSL: Remove two more accesses of ssl_ctx->cert_store

Commit 68ae4773a40b601126fc1f7cf5284e159c84ab3d ('OpenSSL: Use library
wrapper functions to access cert store') fixed most of these, but missed
a few.

Signed-Off-By: David Benjamin <davidben@google.com>
7 years agotests: Scan failures
Jouni Malinen [Sun, 22 May 2016 15:10:19 +0000 (18:10 +0300)]
tests: Scan failures

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoscan: Fix a memory leak on an error path
Jouni Malinen [Sun, 22 May 2016 15:09:23 +0000 (18:09 +0300)]
scan: Fix a memory leak on an error path

If preassoc_mac_addr is used and updating the MAC address fails in
wpas_trigger_scan_cb(), the cloned scan parameters were leaked. Fix that
and also send a CTRL-EVENT-SCAN-FAILED event in this and another error
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agonl80211: Add TEST_FAIL() to nl80211_set_mac_addr()
Jouni Malinen [Sun, 22 May 2016 15:08:55 +0000 (18:08 +0300)]
nl80211: Add TEST_FAIL() to nl80211_set_mac_addr()

This makes it easier to test some error paths in wpa_supplicant.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoscan: Clean up code a bit - phase1 is used in all WPS cases
Jouni Malinen [Sun, 22 May 2016 14:44:28 +0000 (17:44 +0300)]
scan: Clean up code a bit - phase1 is used in all WPS cases

There is no need to have a separate if statement to skip the cases where
phase1 is not set. Just check it with the strstr comparison since this
case is not really used in practice.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoscan: Clean up code a bit - ssid cannot be NULL here
Jouni Malinen [Sun, 22 May 2016 13:23:28 +0000 (16:23 +0300)]
scan: Clean up code a bit - ssid cannot be NULL here

wpa_s->current_ssid is set to a non-NULL ssid pointer value here, so
there is no need for the extra if statement.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoUpdate ChangeLog files for v2.6
Jouni Malinen [Sat, 21 May 2016 17:26:56 +0000 (20:26 +0300)]
Update ChangeLog files for v2.6

This adds a summary of changes since the v2.5 release.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFix sending non-Public Action frames over P2P Device interface
Lior David [Wed, 30 Mar 2016 11:57:31 +0000 (14:57 +0300)]
Fix sending non-Public Action frames over P2P Device interface

The P2P Device interface can only send Public Action frames. Non-Public
Action frames must be sent over a group interface. The previous
implementation sometimes tried to send non-Public Action frames such as
GO Discoverability over the P2P Device interface, however, the source
address of the frame was set to the group interface address so the code
in offchannel.c knew to select the correct interface for the TX.

The check breaks when the P2P Device and group interfaces have the same
MAC address. In this case the frame will be sent over the P2P Device
interface and the send will fail.

Fix this problem in two places:
1. In offchannel, route non-Public Action frames to the GO
   interface when the above conditions are met.
2. When a TX_STATUS event arrives on such routed frame, it will
   arrive on the GO interface but it must be handled by the P2P Device
   interface since it has the relevant state logic.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
7 years agonl80211: Register for only for specific Action frames in AP mode
Kanchanapally, Vidyullatha [Fri, 20 May 2016 14:41:55 +0000 (20:11 +0530)]
nl80211: Register for only for specific Action frames in AP mode

This makes changes such that hostapd (and wpa_supplicant AP mode)
registers to kernel for specific Action frames instead of generically
registering for all Action frames. This makes it easier for other
programs to register for some Action frames that hostapd does not handle
today without having to somehow coordinate directly with hostapd.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: P2P group formation using P2PS method without specifying PIN
Jouni Malinen [Fri, 20 May 2016 20:37:51 +0000 (23:37 +0300)]
tests: P2P group formation using P2PS method without specifying PIN

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoP2PS: Allow P2P_CONNECT command for P2PS connection with/without PIN
Purushottam Kushwaha [Fri, 29 Apr 2016 10:50:12 +0000 (16:20 +0530)]
P2PS: Allow P2P_CONNECT command for P2PS connection with/without PIN

This allows using P2PS config method with or without PIN for connection.
wpa_supplicant should internally handle the default PIN "12345670" and
shall also allow connection irrespective of PIN used in P2P_CONNECT.

For example,
 1. P2P_CONNECT 02:2a:fb:22:22:33 p2ps
 2. P2P_CONNECT 02:2a:fb:22:22:33 xxxxxxxx p2ps
Where the second one is maintained for backwards compatibility.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoP2PS: Correct config_methods for different P2P cases
Purushottam Kushwaha [Fri, 29 Apr 2016 10:46:44 +0000 (16:16 +0530)]
P2PS: Correct config_methods for different P2P cases

Add P2PS config flag only when config_methods are set. This restores the
pre-P2PS behavioer for the cases where Display or Keypad config method
is specified for a peer (i.e., do not add the new P2PS method in that
case).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoEAP-SAKE: Do not debug print result if eap_sake_compute_mic() fails
Jouni Malinen [Mon, 16 May 2016 19:26:37 +0000 (22:26 +0300)]
EAP-SAKE: Do not debug print result if eap_sake_compute_mic() fails

This gets rid of a valgrind warning on uninitialized memory read in the
eap_proto_sake_errors test case where the result was used after the
failed eap_sake_compute_mic() call.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoEAP-PAX: Do not debug print result if eap_pax_mac() fails
Jouni Malinen [Mon, 16 May 2016 19:25:25 +0000 (22:25 +0300)]
EAP-PAX: Do not debug print result if eap_pax_mac() fails

This gets rid of a valgrind warning on uninitialized memory read in the
eap_proto_pax_errors test case where the result was used after the
failed eap_pax_mac() call.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoEAP-FAST: Check sha1_t_prf() result in eap_fast_get_cmk()
Jouni Malinen [Mon, 16 May 2016 19:24:01 +0000 (22:24 +0300)]
EAP-FAST: Check sha1_t_prf() result in eap_fast_get_cmk()

This gets rid of a valgrind warning on uninitialized memory read in the
eap_proto_fast_errors test case where the result was used after the
failed sha1_t_prf() call.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoWPS: Check sha256_vector() result in wps_build_oob_dev_pw()
Jouni Malinen [Mon, 16 May 2016 18:06:44 +0000 (21:06 +0300)]
WPS: Check sha256_vector() result in wps_build_oob_dev_pw()

This gets rid of a valgrind warning on uninitialized memory read in the
wpas_ctrl_error test case where the result was used after the failed
sha256_vector() call.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoCheck md5_vector() result in decrypt_ms_key()
Jouni Malinen [Mon, 16 May 2016 17:08:53 +0000 (20:08 +0300)]
Check md5_vector() result in decrypt_ms_key()

This gets rid of a valgrind warning on uninitialized memory read in the
hostapd_oom_wpa2_eap_connect test case where the result is used after
failed md5_vector() call.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoCheck hmac_md5() result in radius_msg_verify_msg_auth()
Jouni Malinen [Mon, 16 May 2016 17:06:46 +0000 (20:06 +0300)]
Check hmac_md5() result in radius_msg_verify_msg_auth()

This gets rid of a valgrind warning on uninitialized memory read in the
hostapd_oom_wpa2_eap_connect test case where memcmp is used after failed
hmac_md5() call.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoCheck md5_vector() result in radius_msg_verify()
Jouni Malinen [Mon, 16 May 2016 17:04:29 +0000 (20:04 +0300)]
Check md5_vector() result in radius_msg_verify()

This gets rid of a valgrind warning on uninitialized memory read in the
hostapd_oom_wpa2_eap test case where memcmp is used after failed
md5_vector() call.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoWPS: Fix debug prints in wps_derive_psk() error case
Jouni Malinen [Mon, 16 May 2016 16:35:03 +0000 (19:35 +0300)]
WPS: Fix debug prints in wps_derive_psk() error case

Check for hmac_sha256() failures and exit from wps_derive_psk() without
printing out the derived keys if anything fails. This removes a valgrind
warning on uninitialized value when running the ap_wps_m3_oom test case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFix external radio work debug printing on removal
Jouni Malinen [Mon, 16 May 2016 16:04:54 +0000 (19:04 +0300)]
Fix external radio work debug printing on removal

work->type was pointing to the allocated work->ctx buffer and the debug
print in radio_work_free() ended up using freed memory if a started
external radio work was removed as part of FLUSH command operations. Fix
this by updating work->type to point to a constant string in case the
dynamic version gets freed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: wpa_supplicant AP mode - WPS disabled
Jouni Malinen [Sat, 14 May 2016 16:43:13 +0000 (19:43 +0300)]
tests: wpa_supplicant AP mode - WPS disabled

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agowpa_supplicant: Add wps_disabled parameter to network block
Lior David [Tue, 12 Apr 2016 15:13:22 +0000 (18:13 +0300)]
wpa_supplicant: Add wps_disabled parameter to network block

Add a new parameter wps_disabled to network block (wpa_ssid). This
parameter allows WPS functionality to be disabled in AP mode.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
7 years agoSet wpa_psk_set in wpa_supplicant AP mode is PSK is available
Jouni Malinen [Sat, 14 May 2016 16:41:46 +0000 (19:41 +0300)]
Set wpa_psk_set in wpa_supplicant AP mode is PSK is available

While this is unlikely to make any practical difference, it is better to
keep consistent with hostapd configuration parser.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoFix AP mode key_mgmt configuration in wpa_supplicant default case
Jouni Malinen [Sat, 14 May 2016 16:40:40 +0000 (19:40 +0300)]
Fix AP mode key_mgmt configuration in wpa_supplicant default case

If the network profile key_mgmt parameter was not set, wpa_supplicant
defaulted to enabling both WPA-PSK and WPA-EAP. This is not correct for
AP mode operations, so remove WPA-EAP in such a case to fix WPA-PSK
without explicit key_mgmt parameter.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoP2P: Do not enable P2P group processing for non-P2P AP mode
Jouni Malinen [Sat, 14 May 2016 16:39:10 +0000 (19:39 +0300)]
P2P: Do not enable P2P group processing for non-P2P AP mode

wpa_supplicant was starting P2P group processing for all AP mode
interfaces in CONFIG_P2P=y builds. This is unnecessary and such
operations should be enabled only for actual GO interfaces.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Fix WEXT testing
Jouni Malinen [Sat, 14 May 2016 15:59:47 +0000 (18:59 +0300)]
tests: Fix WEXT testing

Commit afb2e8b8913f131e5fb3a1031aacae3ab2b91287 ('tests: Store P2P
Device ifname in class WpaSupplicant') did not take into account the
possibility of capa.flags not existing in get_driver_status() and broke
WEXT test cases. Fix this by checking that capa.flags is present before
looking at its value.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests/remote: Add hwsim wrapper
Janusz Dziedzic [Fri, 29 Apr 2016 05:07:37 +0000 (07:07 +0200)]
tests/remote: Add hwsim wrapper

This allow to run hwsim test cases.

duts go to apdev while refs go to dev

For now I tested:
./run-tests.py -d hwsim0 -r hwsim1 -h ap_open -h dfs
./run-tests.py -r hwsim0 -r hwsim1 -h ibss_open -v
./run-tests.py -r hwsim0 -r hwsim1 -r hwsim2 -d hwsim3 -d hwsim4 -h ap_vht80 -v
./run-tests.py -r hwsim0 -r hwsim1 -r hwsim2 -d hwsim3 -d hwsim4 -h all -k ap -k vht

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
7 years agotests/remote: Add test_example.py
Janusz Dziedzic [Fri, 29 Apr 2016 05:07:36 +0000 (07:07 +0200)]
tests/remote: Add test_example.py

This is simple example how to write a simple test case.

modprobe mac80211_hwsim radios=4
run example:
./run-tests.py -d hwsim0 -r hwsim1 -t example

run example with monitors:
./run-tests.py -d hwsim0 -r hwsim1 -t example -m all -m hwsim2

run example with trace record:
./run-tests.py -d hwsim0 -r hwsim1 -t example -T

run example with trace and perf:
./run-tests.py -d hwsim0 -r hwsim1 -t example -T -P

restart hw before test case run:
./run-tests.py -d hwsim0 -r hwsim1 -t example -R

run example verbose
./run-tests.py -d hwsim0 -r hwsim1 -t example -v

For perf/trace you need to write own hw specyfic scripts:
trace_start.sh, trace_stop.sh
perf_start.sh, perf_stop.sh

In any case you will find logs in the logs/current/ directory.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
7 years agotests/remote: Add utils file
Janusz Dziedzic [Fri, 29 Apr 2016 05:07:35 +0000 (07:07 +0200)]
tests/remote: Add utils file

Add rutils.py for remote tests.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
7 years agotests/remote: Add monitor.py
Janusz Dziedzic [Fri, 29 Apr 2016 05:07:34 +0000 (07:07 +0200)]
tests/remote: Add monitor.py

Add monitor support. This supports monitors added to the current
interfaces. This also support standalone monitor with multi interfaces
support. This allows to get logs from different channels at the same
time to one pcap file.

Example of t3-monitor added to config.py file.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
7 years agotests: Add remote directory to tests
Janusz Dziedzic [Fri, 29 Apr 2016 05:07:33 +0000 (07:07 +0200)]
tests: Add remote directory to tests

Add tests/remote directory and files:
config.py - handle devices/setup_params table
run-tests.py - run test cases
test_devices.py - run basic configuration tests

You can add own configuration file, by default this is cfg.py, and put
there devices and setup_params definition in format you can find in
config.py file. You can use -c option or just create cfg.py file.

Print available devices/test_cases:
./run-tests.py

Check devices (ssh connection, authorized_keys, interfaces):
./run-test.py -t devices

Run sanity tests (test_sanity_*):
./run-test.py -d <dut_name> -t sanity

Run all tests:
./run-tests.py -d <dut_name> -t all

Run test_A and test_B:
./run-tests.py -d <dut_name> -t "test_A, test_B"

Set reference device, and run sanity tests:
./run-tests.py -d <dut_name> -r <ref_name> -t sanity

Multiple duts/refs/monitors could be setup:
e.g.
./run-tests.py -d <dut_name> -r <ref1_name> -r <ref2_name> -t sanity

Monitor could be set like this:
./run-tests.py -d <dut_name> -t sanity -m all -m <standalone_monitor>

You can also add filters to tests you would like to run
./run-tests.py -d <dut_name> -t all -k wep -k g_only
./run-tests.py -d <dut_name> -t all -k VHT80

./run-test.py doesn't start/terminate wpa_supplicant or hostpad,
test cases are resposible for that, while we don't know test
case requirements.

Restart (-R) trace (-T) and perf (-P) options available.
This request trace/perf logs from the hosts (if possible).

As parameters each test case get:
- devices - table of available devices
- setup_params
- duts - names of DUTs should be tested
- refs - names of reference devices should be used
- monitors - names of monitors list

Each test could return append_text.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
7 years agotests: remotehost.py use join
Janusz Dziedzic [Fri, 29 Apr 2016 05:07:32 +0000 (07:07 +0200)]
tests: remotehost.py use join

Use join instead of for.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
7 years agoSend CTRL-EVENT-REGDOM-CHANGE event on the parent interface
Ilan Peer [Mon, 25 Apr 2016 08:24:58 +0000 (11:24 +0300)]
Send CTRL-EVENT-REGDOM-CHANGE event on the parent interface

The NL80211_CMD_WIPHY_REG_CHANGE can be handled by any of the
interfaces that are currently controlled by the wpa_supplicant.
However, some applications expect the REGDOM_CHANGE event to be
sent on the control interface of the initially added interface
(and do not expect the event on any of child interfaces).

To resolve this, when processing NL80211_CMD_WIPHY_REG_CHANGE,
find the highest parent in the chain, and use its control interface
to emit the CTRL-EVENT-REGDOM-CHANGE event.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
7 years agotests: Secure mesh and the first plink Open dropped
Jouni Malinen [Fri, 13 May 2016 17:50:11 +0000 (20:50 +0300)]
tests: Secure mesh and the first plink Open dropped

This is a regression test case to verify that MTK is calculated properly
also in this unexpected sequence.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoAdd MGMT_RX_PROCESS test command for wpa_supplicant
Jouni Malinen [Fri, 13 May 2016 17:48:00 +0000 (20:48 +0300)]
Add MGMT_RX_PROCESS test command for wpa_supplicant

This makes it easier to write hwsim test cases to verify management
frame processing sequences with dropped or modified frames. When
ext_mgmt_frame_handling is used, this new command can be used to request
wpa_supplicant to process a received a management frame, e.g., based on
information reported in the MGMT-RX events.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agomesh: Calculate MTK before sending it to MAC in case Open is dropped
Peter Oh [Fri, 29 Apr 2016 21:27:58 +0000 (14:27 -0700)]
mesh: Calculate MTK before sending it to MAC in case Open is dropped

IEEE Std 802.11-2012 13.5.6.3 State transitions require an action
sending SETKEYS primitive to MAC when OPN_ACPT event occurs in CNF_RCVD
state in case of AMPE is used, but since MTK calculation is missed in
this condition, all zero valued key are passed to MAC and cause unicast
packet decryption error. This could happen if the first transmission of
plink Open frame is dropped and Confirm frame is processed first
followed by retransmitted Open frame.

Fix this by calculating the MTK also in this sequence of unexpected
messages.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
7 years agomesh: Add missing action to cancel timer
Peter Oh [Fri, 29 Apr 2016 22:04:41 +0000 (15:04 -0700)]
mesh: Add missing action to cancel timer

IEEE Std 802.11-2012 Table 13-2, MPM finite state machine requires to
clear retryTimer when CNF_ACPT event occurs in OPN_SNT state which is
missing, so add it to comply with the standard.

This was found while debugging an MTK issue and this commit fixes a
potential issue that mesh sends invalid event (PLINK_OPEN) which will
lead another invalid timer register such as MeshConfirm Timer. This
behaviour might lead to undefined mesh state.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
7 years agoD-Bus: Check driver capability for IBSS in Modes property of Capabilities
Saurav Babu [Wed, 11 May 2016 05:37:23 +0000 (11:07 +0530)]
D-Bus: Check driver capability for IBSS in Modes property of Capabilities

Instead of hardcoding "ad-hoc" in the array of supported capabilities,
add this only if the driver indicates support for IBSS.

Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
7 years agowpa_cli: Add backspace key process for some terminal
SiWon Kang [Fri, 13 May 2016 02:18:14 +0000 (11:18 +0900)]
wpa_cli: Add backspace key process for some terminal

In some terminal, verified with gtkterm and teraterm, backspace key is
not properly processed. For instance, type 'abc', 3 times of backspace
key press then '123' shows the result of 'abc123' instead of '123'. To
fix this, add a routine to process '\b' character input when using
edit_simple.c instead of edit.c (i.e., without CONFIG_WPA_CLI_EDIT=y).

Signed-off-by: Siwon Kang <kkangshawn@gmail.com>
7 years agowpa_supplicant: Fix CONFIG_AP build without CTRL_IFACE
Johannes Berg [Thu, 12 May 2016 22:26:59 +0000 (00:26 +0200)]
wpa_supplicant: Fix CONFIG_AP build without CTRL_IFACE

wpas_ap_pmksa_cache_list() and wpas_ap_pmksa_cache_flush() should be
under the #ifdef since they're only called for the control iface and
use functionality that otherwise isn't available.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
7 years agodrivers: Add NEED_RADIOTAP
Johannes Berg [Thu, 12 May 2016 07:26:10 +0000 (09:26 +0200)]
drivers: Add NEED_RADIOTAP

If there's ever a driver that, like nl80211, requires radiotap,
we need to have a NEED_RADIOTAP variable to avoid trying to link
the radiotap helpers twice. Introduce that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
7 years agoOpenSSL: Make dh5_init() match the generic implementation
Jouni Malinen [Tue, 10 May 2016 17:28:08 +0000 (20:28 +0300)]
OpenSSL: Make dh5_init() match the generic implementation

Commit 4104267e81b0a0acdb43f693a67f236b3237a719 ('Fix memory leak on NFC
DH generation error path') modified the generic (non-OpenSSL)
implementation of dh5_init() to free the previously assigned public key,
if any. However, that commit did not modify the OpenSSL specific version
of this function. Add the same change there to maintain consistent
behavior between these two implementations of the same function.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoWPS: Fix segmentation fault in new DH key derivation
Rujun Wang [Mon, 25 Apr 2016 01:01:44 +0000 (09:01 +0800)]
WPS: Fix segmentation fault in new DH key derivation

Commit 4104267e81b0a0acdb43f693a67f236b3237a719 ('Fix memory leak on NFC
DH generation error path') modified dh5_init() behavior in the
non-OpenSSL implementation to free the public key (if any was previously
set). However, this did not update one of the callers to make sure the
publ argument in the call is initialized. This could result in trying to
free invalid pointer and segmentation fault when hostapd or
wpa_supplicant was built against some other crypto library than OpenSSL.

Signed-off-by: Rujun Wang <chinawrj@gmail.com>
8 years agoOpenSSL: BoringSSL has SSL_get_client_random(), etc.
David Benjamin [Mon, 25 Apr 2016 18:55:43 +0000 (14:55 -0400)]
OpenSSL: BoringSSL has SSL_get_client_random(), etc.

BoringSSL added OpenSSL 1.1.0's SSL_get_client_random() and friends in
working towards opaquifying the SSL struct. But it, for the moment,
still looks more like 1.0.2 than 1.1.0 and advertises
OPENSSL_VERSION_NUMBER as such. This means that there is no need to
define those in BoringSSL and defining them causes conflicts. (C does
not like having static and non-static functions with the same name.)

As requested, this is conditioned on defined(BORINGSSL_API_VERSION) so
wpa_supplicant may continue to support older BoringSSLs for a time.
(BoringSSL revisions without the accessors predate BoringSSL maintaining
a BORINGSSL_API_VERSION.)

Also add a missing opensslv.h include. tls_openssl.c is sensitive to
OPENSSL_VERSION_NUMBER, so it should include the header directly rather
than rely on another header to do so.

Signed-off-by: David Benjamin <davidben@google.com>
8 years agotests: Open network connection with pmf=2
Jouni Malinen [Thu, 5 May 2016 18:08:23 +0000 (21:08 +0300)]
tests: Open network connection with pmf=2

This verifies that pmf=2 is ignored for a non-RSN network while a
network profile specific ieee80211w=2 is enforced.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoSkip connection attempt for non-RSN networks if PMF is set to required
Sunil Dutt [Sat, 30 Apr 2016 09:52:36 +0000 (15:22 +0530)]
Skip connection attempt for non-RSN networks if PMF is set to required

Since ieee80211w=2 is an explicit configuration to wpa_supplicant, the
connection attempt for such non-PMF (non-RSN) capable networks should be
skipped.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoIgnore pmf=1/2 parameter for non-RSN networks
Jouni Malinen [Thu, 5 May 2016 18:07:03 +0000 (21:07 +0300)]
Ignore pmf=1/2 parameter for non-RSN networks

PMF is available only with RSN and pmf=2 could have prevented open
network connections. Change the global wpa_supplicant pmf parameter to
be interpreted as applying only to RSN cases to allow it to be used with
open networks.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: wpa_supplicant config file parsing of arbitrary global values
Jouni Malinen [Tue, 5 Apr 2016 20:57:35 +0000 (23:57 +0300)]
tests: wpa_supplicant config file parsing of arbitrary global values

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoReject SET commands with newline characters in the string values
Jouni Malinen [Tue, 5 Apr 2016 20:55:48 +0000 (23:55 +0300)]
Reject SET commands with newline characters in the string values

Many of the global configuration parameters are written as strings
without filtering and if there is an embedded newline character in the
value, unexpected configuration file data might be written.

This fixes an issue where wpa_supplicant could have updated the
configuration file global parameter with arbitrary data from the control
interface or D-Bus interface. While those interfaces are supposed to be
accessible only for trusted users/applications, it may be possible that
an untrusted user has access to a management software component that
does not validate the value of a parameter before passing it to
wpa_supplicant.

This could allow such an untrusted user to inject almost arbitrary data
into the configuration file. Such configuration file could result in
wpa_supplicant trying to load a library (e.g., opensc_engine_path,
pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user
controlled location when starting again. This would allow code from that
library to be executed under the wpa_supplicant process privileges.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Use \t instead of \n in discovery_ctrl_char_in_devname
Jouni Malinen [Tue, 5 Apr 2016 22:05:55 +0000 (01:05 +0300)]
tests: Use \t instead of \n in discovery_ctrl_char_in_devname

This is needed to allow the SET command to be modified to reject newline
characters.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: wpa_supplicant config parsing of arbitrary cred values
Jouni Malinen [Tue, 5 Apr 2016 20:36:42 +0000 (23:36 +0300)]
tests: wpa_supplicant config parsing of arbitrary cred values

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoReject SET_CRED commands with newline characters in the string values
Jouni Malinen [Tue, 5 Apr 2016 20:33:10 +0000 (23:33 +0300)]
Reject SET_CRED commands with newline characters in the string values

Most of the cred block parameters are written as strings without
filtering and if there is an embedded newline character in the value,
unexpected configuration file data might be written.

This fixes an issue where wpa_supplicant could have updated the
configuration file cred parameter with arbitrary data from the control
interface or D-Bus interface. While those interfaces are supposed to be
accessible only for trusted users/applications, it may be possible that
an untrusted user has access to a management software component that
does not validate the credential value before passing it to
wpa_supplicant.

This could allow such an untrusted user to inject almost arbitrary data
into the configuration file. Such configuration file could result in
wpa_supplicant trying to load a library (e.g., opensc_engine_path,
pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user
controlled location when starting again. This would allow code from that
library to be executed under the wpa_supplicant process privileges.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoRemove newlines from wpa_supplicant config network output
Paul Stewart [Thu, 3 Mar 2016 23:40:19 +0000 (15:40 -0800)]
Remove newlines from wpa_supplicant config network output

Spurious newlines output while writing the config file can corrupt the
wpa_supplicant configuration. Avoid writing these for the network block
parameters. This is a generic filter that cover cases that may not have
been explicitly addressed with a more specific commit to avoid control
characters in the psk parameter.

Signed-off-by: Paul Stewart <pstew@google.com>
8 years agotests: wpa_supplicant config file writing with arbitrary PSK value
Jouni Malinen [Fri, 4 Mar 2016 16:51:24 +0000 (18:51 +0200)]
tests: wpa_supplicant config file writing with arbitrary PSK value

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoReject psk parameter set with invalid passphrase character
Jouni Malinen [Fri, 4 Mar 2016 16:46:41 +0000 (18:46 +0200)]
Reject psk parameter set with invalid passphrase character

WPA/WPA2-Personal passphrase is not allowed to include control
characters. Reject a passphrase configuration attempt if that passphrase
includes an invalid passphrase.

This fixes an issue where wpa_supplicant could have updated the
configuration file psk parameter with arbitrary data from the control
interface or D-Bus interface. While those interfaces are supposed to be
accessible only for trusted users/applications, it may be possible that
an untrusted user has access to a management software component that
does not validate the passphrase value before passing it to
wpa_supplicant.

This could allow such an untrusted user to inject up to 63 characters of
almost arbitrary data into the configuration file. Such configuration
file could result in wpa_supplicant trying to load a library (e.g.,
opensc_engine_path, pkcs11_engine_path, pkcs11_module_path,
load_dynamic_eap) from user controlled location when starting again.
This would allow code from that library to be executed under the
wpa_supplicant process privileges.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: wpa_supplicant config file parsing/writing with WPS
Jouni Malinen [Fri, 4 Mar 2016 15:24:29 +0000 (17:24 +0200)]
tests: wpa_supplicant config file parsing/writing with WPS

This verifies that a WPA2PSK passphrase with control characters gets
rejected in a WPS Credential and that control characters in SSID get
written as a hexdump.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agoWPS: Reject a Credential with invalid passphrase
Jouni Malinen [Fri, 4 Mar 2016 15:20:18 +0000 (17:20 +0200)]
WPS: Reject a Credential with invalid passphrase

WPA/WPA2-Personal passphrase is not allowed to include control
characters. Reject a Credential received from a WPS Registrar both as
STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or
WPA2PSK authentication type and includes an invalid passphrase.

This fixes an issue where hostapd or wpa_supplicant could have updated
the configuration file PSK/passphrase parameter with arbitrary data from
an external device (Registrar) that may not be fully trusted. Should
such data include a newline character, the resulting configuration file
could become invalid and fail to be parsed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agonl80211: Try running without mgmt frame subscription (driver AP SME)
Rafał Miłecki [Mon, 25 Apr 2016 15:10:47 +0000 (17:10 +0200)]
nl80211: Try running without mgmt frame subscription (driver AP SME)

One of supported code paths already allows this scenario. It is used if
driver doesn't report NL80211_ATTR_DEVICE_AP_SME and doesn't support
monitor interface. In such situation:
1) We don't quit if subscribing for WLAN_FC_STYPE_PROBE_REQ fails
2) We don't try subscribing for WLAN_FC_STYPE_ACTION
3) We fallback to AP SME mode after failing to create monitor interface
4) We don't quit if subscribing for WLAN_FC_STYPE_PROBE_REQ fails
Above scenario is used, e.g., with brcmfmac. As you can see - thanks to
events provided by cfg80211 - it's not really required to receive Probe
Request or action frames.

However, the previous implementation did not allow using hostapd with
drivers that:
1) Report NL80211_ATTR_DEVICE_AP_SME
2) Don't support subscribing for PROBE_REQ and/or ACTION frames
In case of using such a driver hostapd will cancel setup after failing
to subscribe for WLAN_FC_STYPE_ACTION. I noticed it after setting flag
WIPHY_FLAG_HAVE_AP_SME in brcmfmac driver for my experiments.

This patch allows working with such drivers with just a small warning
printed as debug message.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years agoAndroid: Remove EAP-FAST option
Dmitry Shmidt [Fri, 9 Jan 2015 00:49:03 +0000 (16:49 -0800)]
Android: Remove EAP-FAST option

Current BoringSSL version is not suitable for EAP-FAST.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoWPS: Explicitly clear wpabuf memory with key information
Jouni Malinen [Thu, 28 Apr 2016 17:32:15 +0000 (20:32 +0300)]
WPS: Explicitly clear wpabuf memory with key information

This reduces duration that private keying material might remain in the
process memory by clearing wpabuf data used in WPS operations when there
is possibility of the buffer including keys or related material.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years agotests: Do not use tabs for indentation
Jouni Malinen [Sun, 24 Apr 2016 21:19:40 +0000 (00:19 +0300)]
tests: Do not use tabs for indentation

Be more consistent with indentation (always uses spaces in Python
files).

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Test configuration propagation to group interface
Andrei Otcheretianski [Thu, 7 Apr 2016 10:32:09 +0000 (13:32 +0300)]
tests: Test configuration propagation to group interface

When a dedicated P2P Device interface is used, its configuration should
be cloned to the group interface. Add a test that covers this both when
a separate group interface is used and not.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
8 years agoP2P: Copy config from p2pdev when not using dedicated group interface
Andrei Otcheretianski [Thu, 7 Apr 2016 10:32:08 +0000 (13:32 +0300)]
P2P: Copy config from p2pdev when not using dedicated group interface

When the P2P Device interface is used and an existing interface is used
for P2P GO/Client, the P2P Device configuration was not cloned to the
configuration of the existing interface. Thus, configuration parameters
such as idle_group_time, etc., were not propagated to the P2P GO/Client
interface.

Handle this by copying all configuration parameters of the P2P device
interface to the reused interface, with the following exceptions:

1. Copy the NFC key data only if it was not set in the configuration
   file.
2. The WPS string fields are set only if they were not previously set
   in the configuration of the destination interface (based on the
   assumption that these fields should be identical among all
   interfaces).

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
8 years agoP2P: Fix wpas_p2p_nfc_auth_join()
Andrei Otcheretianski [Thu, 7 Apr 2016 10:32:07 +0000 (13:32 +0300)]
P2P: Fix wpas_p2p_nfc_auth_join()

Use the p2pdev pointer instead of the parent pointer to comply with the
flows when a dedicated P2P Device interface is used and
p2p_no_group_iface == 1 (in which case the parent of the reused
interface isn't necessary the same as p2pdev).

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
8 years agotests: Fix persistent_group_peer_dropped tests
Andrei Otcheretianski [Thu, 7 Apr 2016 10:32:06 +0000 (13:32 +0300)]
tests: Fix persistent_group_peer_dropped tests

Use the global control interface to remove P2P network blocks, to
support cases when a dedicated P2P Device interface is used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
8 years agotests: Don't use proxy in urllib.urlopen()
Andrei Otcheretianski [Thu, 7 Apr 2016 10:32:05 +0000 (13:32 +0300)]
tests: Don't use proxy in urllib.urlopen()

Some environments define default system wide HTTP proxy. Using default
system configuration may result in a failure to open some HTTP URLs. Fix
this by ensuring that no proxies are used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
8 years agotests: Use global control interface for P2P configurations
Andrei Otcheretianski [Thu, 7 Apr 2016 10:32:04 +0000 (13:32 +0300)]
tests: Use global control interface for P2P configurations

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
8 years agotests: Use global control interface to set p2p_no_group_iface
Ilan Peer [Thu, 7 Apr 2016 10:32:03 +0000 (13:32 +0300)]
tests: Use global control interface to set p2p_no_group_iface

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Parse group results in a couple of p2p_channel tests
Ilan Peer [Thu, 7 Apr 2016 10:32:02 +0000 (13:32 +0300)]
tests: Parse group results in a couple of p2p_channel tests

In p2p_channel_vht80_autogo and p2p_channel_vht80p80_autogo, parse the
P2P-GROUP-STARTED event prior to calling the group_request() method, as
otherwise the group ifname is not set.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Modify use of GET command to support P2P Device interface
Avraham Stern [Thu, 7 Apr 2016 10:32:01 +0000 (13:32 +0300)]
tests: Modify use of GET command to support P2P Device interface

Support configurations that use a dedicated P2P Device interface by
using the global control interface and specifying the interface name for
the GET commands fetching the ip_addr_go parameter.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agotests: persistent_group_profile_add to support P2P Device interface
Avraham Stern [Thu, 7 Apr 2016 10:32:00 +0000 (13:32 +0300)]
tests: persistent_group_profile_add to support P2P Device interface

Modify the persistent_group_profile_add test to support configurations
that use a dedicated P2P Device interface by sending the ADD_NETWORK and
SET_NETWORK commands on the global control interface and specifying the
P2P Device interface name.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agotests: Store P2P Device ifname in class WpaSupplicant
Avraham Stern [Thu, 7 Apr 2016 10:31:59 +0000 (13:31 +0300)]
tests: Store P2P Device ifname in class WpaSupplicant

Add an attribute to class WpaSupplicant with the name of the
P2P Device interface. If a separate interface is not used for
P2P Device, this attribute will hold the name of the only used
interface (with functions also as the P2P Device management
interface).

This attribute will be used to direct P2P related commands to the
P2P Device interface, which is needed for configurations that use
a separate interface for the P2P Device.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agotests: Modify p2p_msg_long_ssid to support P2P Device interface
Avraham Stern [Thu, 7 Apr 2016 10:31:58 +0000 (13:31 +0300)]
tests: Modify p2p_msg_long_ssid to support P2P Device interface

Waiting for the P2P-DEVICE-FOUND event should be done on the global
control interface to support configurations that use a dedicated P2P
Device interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agotests: Modify autogo_scan to support P2P Device interface
Avraham Stern [Thu, 7 Apr 2016 10:31:57 +0000 (13:31 +0300)]
tests: Modify autogo_scan to support P2P Device interface

Support configurations that use a dedicated P2P Device interface by
sending the P2P_CONNECT command on the global control interface.

In addition, when a dedicated P2P Device interface is used, there is no
need to manually respond to the Provision Discovery Request since the
request is processed by the P2P Device interface and this interface was
not set for external RX management frames handling.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
8 years agotests: Fix error message in test_p2ps_connect_p2ps_method_4()
Ilan Peer [Thu, 7 Apr 2016 10:31:56 +0000 (13:31 +0300)]
tests: Fix error message in test_p2ps_connect_p2ps_method_4()

This fixes commit 2f0f69a9ec93e063822628578bceb947cf083918 ('tests: Use
p2ps_provision() and p2ps_connect_pd() in p2ps_connect_p2ps_method()').

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Add couple of roam failure tests
Ilan Peer [Thu, 7 Apr 2016 10:31:55 +0000 (13:31 +0300)]
tests: Add couple of roam failure tests

1. Fail roaming to an AP which exceeded its number of allowed stations.
2. Fail roaming due to passphrase mismatch.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
8 years agotests: Remove unused eap_connect import
Jouni Malinen [Sun, 24 Apr 2016 17:06:33 +0000 (20:06 +0300)]
tests: Remove unused eap_connect import

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Convert Host() class to use list of arguments instead of string
Jouni Malinen [Sun, 24 Apr 2016 09:28:18 +0000 (12:28 +0300)]
tests: Convert Host() class to use list of arguments instead of string

It is better to use a list of command line arguments for the local
execution case and convert that to a space-separated string for the
remote case.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years agotests: Print traceback if test fails
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:10 +0000 (07:38 +0200)]
tests: Print traceback if test fails

This is useful in case we hit a problem in test code.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Use hapd from hostapd.add_bss()
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_bss()

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Use hapd from hostapd.add_ap()
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_ap()

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Use hapd from hostapd.add_ap() in start_ap_er()
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_ap() in start_ap_er()

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Use hapd from hostapd.add_ap() in TDLS
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_ap() in TDLS

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Pass apdev to HostapdGlobal() in ap_add_with_driver
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Pass apdev to HostapdGlobal() in ap_add_with_driver

This is needed for running the test with a remote host.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Use hapd from hostapd.add_ap() in eap_connect()
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_ap() in eap_connect()

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Use hapd from hostapd.add_iface()
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:06 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_iface()

Since add_iface() now returns the correct hapd, just use it.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Pass apdev to HostapdGlobal()
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Pass apdev to HostapdGlobal()

This can be used to work with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Replace HostapdGlobal() + remove() with hostapd.remove_bss()
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Replace HostapdGlobal() + remove() with hostapd.remove_bss()

This can be used to work with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
8 years agotests: Use hostapd.add_ap() instead of HostapdGlobal() (DFS)
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Use hostapd.add_ap() instead of HostapdGlobal() (DFS)

This makes the DFS test cases that use start_dfs_ap() more usable for
testing with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>