Jouni Malinen [Mon, 4 Jul 2016 16:34:22 +0000 (19:34 +0300)]
HS 2.0: Fix hs20_get_icon() error path
If base64_encode() fails (e.g., due to memory allocation failure), the
return value needs to be checked against NULL before using the (not
really) returned length value. The error path here ended up reading
uninitialized variable.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 15:54:26 +0000 (18:54 +0300)]
tests: Hotspot 2.0 and connect attempt without matching cred
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 15:50:59 +0000 (18:50 +0300)]
tests: ANQP no sharing
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 15:43:30 +0000 (18:43 +0300)]
tests: Hotspot 2.0 and select with multiple matching home credentials
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 15:12:41 +0000 (18:12 +0300)]
tests: Hotspot 2.0 connection with TTLS/default
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 15:08:49 +0000 (18:08 +0300)]
tests: Hotspot 2.0 and connect attempt without RSN
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 15:03:28 +0000 (18:03 +0300)]
tests: Hotspot 2.0 and connect attempt without credential
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 15:00:23 +0000 (18:00 +0300)]
tests: Hotspot 2.0 connection and invalid roaming consortium element
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 10:59:14 +0000 (13:59 +0300)]
tests: Hotspot 2.0 connection and 3GPP credential constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 09:15:15 +0000 (12:15 +0300)]
tests: Hotspot 2.0 and failures during profile configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 10:21:42 +0000 (13:21 +0300)]
tests: Hotspot 2.0 connection and no full match
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 21:46:26 +0000 (00:46 +0300)]
Interworking: Remove unused allow_excluded from interworking_connect()
This argument was set to a hardcoded value 1 and as such, the other
cases were not reachable.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 21:46:07 +0000 (00:46 +0300)]
tests: Hotspot 2.0 connection and roaming consortium constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 20:57:36 +0000 (23:57 +0300)]
tests: Hotspot 2.0 network selection with req_conn_capab (not present)
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 14:48:30 +0000 (17:48 +0300)]
tests: D-Bus GetAll wpa_config_get_all() OOM
This is a regression test for a crash on wpa_config_get_all() error
path.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 4 Jul 2016 14:34:19 +0000 (17:34 +0300)]
Fix wpa_config_get_all() error path
The previous version did not really work at all and it ended up crashing
if the os_strdup(field->name) call failed.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 19:08:31 +0000 (22:08 +0300)]
tests: Hotspot 2.0 OSU provider and no AP with info
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 19:02:21 +0000 (22:02 +0300)]
tests: GAS/ANQP query OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 19:00:24 +0000 (22:00 +0300)]
tests: ANQP_GET to unknown BSS
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 18:25:45 +0000 (21:25 +0300)]
tests: GAS_REQUEST OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 18:20:08 +0000 (21:20 +0300)]
tests: Hotspot 2.0 network selection and invalid GAS response
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 18:00:08 +0000 (21:00 +0300)]
tests: Hotspot 2.0 and maximum BSS load (roaming)
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 17:55:02 +0000 (20:55 +0300)]
tests: Hotspot 2.0 network selection with min bandwidth - special cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 17:45:37 +0000 (20:45 +0300)]
tests: Hotspot 2.0 required roaming consortium and no match
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 17:30:19 +0000 (20:30 +0300)]
tests: Hotspot 2.0 connection and invalid roaming consortium ANQP-element
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 17:05:51 +0000 (20:05 +0300)]
tests: Hotspot 2.0 with simulated SIM and EAP-SIM - OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 16:57:31 +0000 (19:57 +0300)]
Interworking: Combine identical error returns into a single one
There is no need to maintain separate "return -1;" for each of the
wpa_config_set() calls that cannot really fail in practice.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 16:55:34 +0000 (19:55 +0300)]
tests: Fix interworking_select() bssid argument in some test cases
The bssid argument was missing from couple of test cases. While this is
clearly incorrect, it looks like the error did not really cause any
significant issues to the test case. Anyway, better provide the correct
set of arguments to the call.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 16:53:03 +0000 (19:53 +0300)]
tests: Hotspot 2.0 with simulated SIM and EAP-SIM - invalid IMSI
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 16:37:50 +0000 (19:37 +0300)]
tests: Remove extra semicolons from python scripts
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 16:23:18 +0000 (19:23 +0300)]
tests: Hotspot 2.0 network selection and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 15:15:29 +0000 (18:15 +0300)]
tests: Hotspot 2.0 network selection and no roaming consortium
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 15:12:44 +0000 (18:12 +0300)]
tests: Hotspot 2.0 network selection and cred_with_nai_realm cred->realm
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 15:04:48 +0000 (18:04 +0300)]
tests: Hotspot 2.0 multi-cred and same sp_priority
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Jul 2016 14:44:45 +0000 (17:44 +0300)]
tests: wpa_supplicant P2P_LO_START and P2P_LO_STOP commands
Signed-off-by: Jouni Malinen <j@w1.fi>
Peng Xu [Fri, 24 Jun 2016 18:36:18 +0000 (11:36 -0700)]
P2P: Allow P2P listen being offloaded to the driver/firmware
This allows P2P Listen to be offloaded to device to enhance power
saving.
To start P2P listen offload, from wpa_cli interface, issue the command:
p2p_lo_start <freq> <period> <interval> <count>
To stop P2P listen offload, issue the command:
p2p_lo_stop
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Peng Xu [Fri, 24 Jun 2016 00:32:09 +0000 (17:32 -0700)]
nl80211: P2P Listen offload vendor command definitions
Define QCA vendor commands, events, and attributes for P2P
Listen offload.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Roshan Pius [Thu, 30 Jun 2016 22:26:07 +0000 (15:26 -0700)]
Do not exceed scan ssid max size advertised by driver
Previously, wpa_set_scan_ssids() fully exhausted
wpa_driver_scan_params.ssid list when hidden network IDs are provided
via the control interface. This results in us exceeding the max size for
the list advertised by the driver when we add the "wildcard" scan SSID
entry. So, ensure that we leave space for one more scan SSID entry in
the list when we exit out of wpa_set_scan_ssids().
Signed-off-by: Roshan Pius <rpius@google.com>
Jouni Malinen [Fri, 1 Jul 2016 18:16:20 +0000 (21:16 +0300)]
tests: IBSS and key_mgmt field in STATUS
Signed-off-by: Jouni Malinen <j@w1.fi>
Saurav Babu [Fri, 1 Jul 2016 07:06:45 +0000 (12:36 +0530)]
Add text name for WPA_KEY_MGMT_WPA_NONE key_mgmt value
This will output WPA-NONE for WPA_KEY_MGMT_WPA_NONE key_mgmt value in
STATUS command.
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Jouni Malinen [Fri, 1 Jul 2016 17:50:13 +0000 (20:50 +0300)]
tests: IBSS operating frequency reporting
Signed-off-by: Jouni Malinen <j@w1.fi>
Saurav Babu [Fri, 1 Jul 2016 12:06:17 +0000 (12:06 +0000)]
nl80211: Provide frequency in EVENT_ASSOC when IBSS is joined
Provides operating frequency in EVENT_ASSOC when IBSS is joined so that
wpa_s->assoc_freq can be updated when any IBSS network is joined.
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Jouni Malinen [Thu, 30 Jun 2016 19:02:12 +0000 (22:02 +0300)]
tests: MBO and supported operating classes
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Thu, 30 Jun 2016 18:59:09 +0000 (21:59 +0300)]
MBO: Improve supported operating class generation
Previously, 2.4 GHz operating class 81 was not added for US due to not
all of the channels (1-13 in this operating class) being supported.
Still, this operating class is the main operating class in the global
table for 2.4 GHz and it is the only option for indicating support for
the 2.4 GHz band channels in US.
Change the supported operating class building rules to include all
operating classes for which at least one channel is enabled. In
addition, fix the 80, 80+80, and 160 MHz channel checks (checking the
center frequency channel was failing since it is not a valid 20 MHz
channel).
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Wed, 29 Jun 2016 22:49:21 +0000 (01:49 +0300)]
tests: MBO BSS transition request MBO IE parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Wed, 29 Jun 2016 22:11:35 +0000 (01:11 +0300)]
tests: MBO failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Thu, 30 Jun 2016 09:52:50 +0000 (12:52 +0300)]
tests: MBO WNM token wrap around
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Wed, 29 Jun 2016 21:38:39 +0000 (00:38 +0300)]
tests: Invalid MBO non_pref_chan values
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Wed, 29 Jun 2016 21:34:48 +0000 (00:34 +0300)]
tests: MBO mbo_cell_capa duplicate update
Signed-off-by: Jouni Malinen <j@w1.fi>
Dmitry Shmidt [Mon, 27 Jun 2016 22:54:56 +0000 (15:54 -0700)]
nl80211: Keep QCA vendor extensions together
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Jouni Malinen [Tue, 28 Jun 2016 22:56:26 +0000 (01:56 +0300)]
tests: MPM protocol testing - CLS_ACPT event in OPN_SNT
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 22:42:58 +0000 (01:42 +0300)]
tests: MPM protocol testing - CLS_ACPT event in CNF_RCVD
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 22:13:55 +0000 (01:13 +0300)]
tests: Mesh MPM FSM and HOLDING state event OPN_ACPT
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 22:12:32 +0000 (01:12 +0300)]
mesh: Add debug prints on my/peer lid mismatches
This makes it easier to figure out why a received mesh peering frame
could end up getting dropped.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 20:30:40 +0000 (23:30 +0300)]
mesh: Add MPM FSM transitions from ESTAB to HOLDING for {OPN,CNF}_RJCT
These events were missing from the MPM FSM state transition table.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 20:20:39 +0000 (23:20 +0300)]
mesh: Update MPM FSM events to match the standard
{OPN,CNF,CLS}_IGNR events were removed during P802.11s draft development
process. Replace these with not generating a MPM FSM event. In addition,
add the standard REQ_RJCT event and option to pass in a specific reason
code to mesh_mpm_fsm().
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 19:53:05 +0000 (22:53 +0300)]
mesh: Rename MPM FSM states to match the standard
During the P802.11s draft development, there were separate LISTEN and
IDLE states. However, the current IEEE 802.11 standards uses only the
IDLE state while the implementation called this LISTEN. Rename the state
in the implementation to match the one used in the standard to avoid
confusion. In addition, rename OPEN_{SENT,RCVD} to OPN_{SNT,RCVD} to
match the exact spelling of these states in the standard.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 19:45:41 +0000 (22:45 +0300)]
mesh: Indicate OPN_RJCT event if AES-SIV decrypt fails
REVmc/D6.0 14.5.5.2.2 (Processing Mesh Peering Open frames for AMPE)
mandates the OPN_RJCT event to be invoked if AES-SIV decryption for
received Mesh Peering Open frame fails. This allows a Mesh Peering Close
frame to be sent in such a case.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 19:44:28 +0000 (22:44 +0300)]
mesh: Write close reason from Mesh Peering Close to debug log
This makes it a bit easier to understand the debug log entries related
to tearing down a mesh connection.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 19:23:42 +0000 (22:23 +0300)]
mesh: Remove GTKdata and IGTKdata from Mesh Peering Confirm/Close
These optional fields are supposed to be included in the Authenticated
Mesh Peering Exchange element only in Mesh Peering Open frames.
Previously, these were incorrectly included in Mesh Peering
Confirm/Close frames and also required to be present in all these
frames.
While this commit changes the receive processing to ignore the
unexpected extra fields, it should be noted that the previous
implementation required the fields to be present and as such, the fixed
implementation is not compatible with it for secure mesh.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 17:52:21 +0000 (20:52 +0300)]
tests: Secure mesh network connectivity failure
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 17:08:52 +0000 (20:08 +0300)]
tests: Mesh peering management protocol testing for peer addition
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 17:40:37 +0000 (20:40 +0300)]
tests: Open mesh network connectivity, no_auto on both peers
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 28 Jun 2016 17:44:26 +0000 (20:44 +0300)]
tests: Add TEST_FAIL() to hostapd_get_aid()
This allows additional testing coverage for AID unavailability cases.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jonathan Afek [Thu, 23 Jun 2016 17:16:36 +0000 (20:16 +0300)]
tests: Mark 525 tests as remote compatible
After successfully passing the 525 tests on a remote setup mark the
tests as remote compatible.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:35 +0000 (20:16 +0300)]
tests: Add general filter for remote tests execution
Add a new function decorator for the test functions so that they can be
marked as remote compatible tests. Add a general filter to the remote
tests execution script to only execute tests that are remote compatible.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Use general cmd_execute() for bridge setup commands
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing shell commands to setup bridge so that this would also work on
remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Use cmd_execute() for iw connect command
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw connect ..." commands so that this would also work on
remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Use cmd_execute() for ip link set up/down commands
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ip link set up/down" commands so that this would also work on
remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Use cmd_execute() for iw station get command
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw ... station get" commands so that this would also work on
remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Use cmd_execute() in find_wpas_process()
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ps ax" so that this would also work on remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Use cmd_execute() for ip addr add/del
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ip addr add/del .." so that this would also work on remote
setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Use cmd_execute() for iw scan
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw scan .." so that this would also work on remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Use cmd_execute() for iw reg set 00
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw reg set 00" so that this would also work on remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:29 +0000 (20:16 +0300)]
tests: Remove unused import subprocess
Number of files imported subprocess without using anything from subprocess.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:34 +0000 (20:16 +0300)]
tests: Add the forgotten wlantest_setup() call to a TDLS test
One TDLS test case was using wlantest without doing the setup first.
This makes the test not work on real hardware. Fix the issue by adding
the wlantest setup to the test.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:30 +0000 (20:16 +0300)]
tests: Use cmd_execute() in set_powersave()
hwsim_utils.set_powersace() used to do file operations locally in
python. Start using the cmd_execute() general function for file
operations so that this would also work on remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jouni Malinen [Mon, 27 Jun 2016 17:24:52 +0000 (20:24 +0300)]
tests: Wait for CTRL-EVENT-CHANNEL-SWITCH event in ap_csa tests
This verifies that the channel switch is reported by the station and
replaces the fixed sleep before a traffic test by wait for the actual
switch operation to complete.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 27 Jun 2016 17:24:06 +0000 (20:24 +0300)]
Add CTRL-EVENT-CHANNEL-SWITCH event to indicate channel changes
This provides information of the channel switch to wpa_supplicant
control interface monitors.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 27 Jun 2016 17:10:23 +0000 (20:10 +0300)]
tests: Use shell in local cmd_execute() only if needed
The generic cmd_execute() function was introduced in a manner that
converted the argument array to a string and used shell to run the
command unconditionally. This is not really desirable, so move back to
using the command array by default and use the single command string
with a shell only when really needed.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jonathan Afek [Tue, 7 Jun 2016 13:42:41 +0000 (16:42 +0300)]
tests: Use cmd_execute() in ap_ht clear_scan_cache()
The ap_ht tests used to execute shell commands in the tests using the
subprocess python module. Complete the move to using the cmd_execute()
general function for executing shell commands so that this would also
work on remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Tue, 7 Jun 2016 13:42:41 +0000 (16:42 +0300)]
tests: Use cmd_execute() function in ap_ht40_scan_not_affected
The ap_ht tests used to execute shell commands in the tests using the
subprocess python module. Start using the cmd_execute() general function
for executing shell commands so that this would also work on remote
setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Tue, 7 Jun 2016 13:42:41 +0000 (16:42 +0300)]
tests: Use the cmd_execute() function in ap_ht for iw reg set
The ap_ht tests used to execute iw reg set command using the subprocess
python module. Start using the cmd_execute() general function for
executing shell commands so that this would also work on remote setups.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Tue, 7 Jun 2016 13:42:41 +0000 (16:42 +0300)]
tests: Use apdev[0] more consistently in ap_ht
The test cases ap_ht40_5ghz_invalid_pair and ap_ht40_5ghz_disabled_sec
mixed use of apdev[0] and apdev[1] while only needing a single AP. This
works when both the devices are on the same host (e.g., with
mac80211_hwsim), but not when using separate remote hosts. Fix this by
using apdev[0] more consistently in these test cases.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Tue, 7 Jun 2016 13:42:41 +0000 (16:42 +0300)]
tests: Remove trailing whitespace
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Tue, 7 Jun 2016 13:42:41 +0000 (16:42 +0300)]
tests: Pass full apdev to clear_scan_cache()
This is a step towards enabling the needed commands to be run on a
remote host.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jonathan Afek [Thu, 23 Jun 2016 17:16:32 +0000 (20:16 +0300)]
tests: Initialize hapd variable before try-finally uses
Some TDLS and WPS test cases reference the hapd variable in the finally
block even if the test failed before assigning the value to this
variable. This makes the code in the finally block to fail on
referencing this variable. Assign None to the hapd variable before
starting the tests to avoid this.
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Jouni Malinen [Mon, 27 Jun 2016 09:30:53 +0000 (12:30 +0300)]
tests: GAS failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 27 Jun 2016 15:30:11 +0000 (18:30 +0300)]
GAS: Fix double-free on an error path
If radio_add_work() fails, gas_query_req() ended up freeing the query
payload and returning an error. This resulted in also the caller trying
to free the query payload. Fix this by not freeing the buffer within
gas_query_req() in error case to be consistent with the other error
cases.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 27 Jun 2016 13:31:03 +0000 (16:31 +0300)]
GAS: Remove unused gas_query_cancel()
This function was added with the initial GAS implementation, but there
was no user for it at the time and no clear use now either, so remove
the unused function and the related GAS query reason code.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 27 Jun 2016 10:34:19 +0000 (13:34 +0300)]
tests: GAS/ANQP query protected vs. not protected
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 27 Jun 2016 10:14:28 +0000 (13:14 +0300)]
GAS: Check protected/unprotected drop after action code check
Apply the GAS specific rule of using Protected Dual of Public Action
frame only after having checked that the action code indicates this to
be a GAS response. Previously, non-GAS Public Action frames could have
been incorrectly dropped because of this check if received during an
association with PMF enabled.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 27 Jun 2016 10:01:05 +0000 (13:01 +0300)]
GAS: Report GAS-QUERY-DONE event on initial req TX failure
The GAS-QUERY-DONE event with result=INTERNAL_ERROR was reported on most
other error cases, but the failure triggered by not being able to
transmit a GAS Initial Request stopped the query silently. Make this
more consistent with other error cases by reporting the same event.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 27 Jun 2016 09:51:20 +0000 (12:51 +0300)]
tests: GAS query deleted at deinit
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 24 Jun 2016 21:35:17 +0000 (00:35 +0300)]
OpenSSL: Update to match the modified DH_get0_key() API
OpenSSL 1.1.0 (master branch) apparently ended up modifying the API
after the beta 2 release that was supposed to complete the work. Mark
the variables const to fix the compilation with the modified OpenSSL
API.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 24 Jun 2016 20:49:08 +0000 (23:49 +0300)]
D-Bus: Make the CurrentAuthMode property getter more robust
Now that mesh sets wpa_s->wpa_state = WPA_COMPLETED, it looks like this
getter can get called with wpa_s->current_ssid = NULL. That could result
in NULL pointer dereference, so need to protect that specific case.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 24 Jun 2016 15:38:36 +0000 (18:38 +0300)]
tests: D-Bus DeviceFoundProperties signal
Signed-off-by: Jouni Malinen <j@w1.fi>
Nishant Chaprana [Mon, 20 Jun 2016 04:48:21 +0000 (10:18 +0530)]
D-Bus: Add DeviceFoundProperties signal for discovered peers
This signal sends the peer properties to applications for discovered
peers. The signature of this event is "oa{sv}". This event is needed
because the current DeviceFound signal provides only the peer object
path. If there are many peers in range there will be many DeviceFound
signals and for each DeviceFound signal, applications would need to use
GetAll to fetch peer properties. Doing this many times would create
extra load over application as well as over wpa_supplicant, so it is
better to send peer properties in the event so that applications can
extract found peer information without extra steps.
The existing DeviceFound signal is left as-is to avoid changing its
signature.
The issue is not applicable to the control interface because the
P2P-DEVICE-FOUND event includes peer info in it, but over D-Bus
interface DeviceFound provides only the peer object.
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Jouni Malinen [Fri, 24 Jun 2016 15:24:37 +0000 (18:24 +0300)]
tests: wpa_state == COMPLETED in mesh
Signed-off-by: Jouni Malinen <j@w1.fi>
Maital Hahn [Mon, 20 Jun 2016 13:27:21 +0000 (16:27 +0300)]
mesh: Mark wpa_state COMPLETED when mesh join has been performed
In mesh interface, the wpa_supplicant state was either
DISCONNECT/SCANNING in non-secured connection or AUTHENTICATING in
secured connection. The latter prevented the scan. Update the
wpa_supplicant state in mesh to be COMPLETED upon initialization. This
is similar to the P2P GO case.
Signed-off-by: Maital Hahn <maitalm@ti.com>