Commit graph

11145 commits

Author SHA1 Message Date
Jouni Malinen af52992a37 tests: Hotspot 2.0 connection and no full match
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen 0da9869b02 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>
2016-07-04 17:49:57 +03:00
Jouni Malinen a7fa20e047 tests: Hotspot 2.0 connection and roaming consortium constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen 416556d06b tests: Hotspot 2.0 network selection with req_conn_capab (not present)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:56 +03:00
Jouni Malinen 73ece491c1 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>
2016-07-04 17:49:56 +03:00
Jouni Malinen 8329ad4d06 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>
2016-07-04 17:49:15 +03:00
Jouni Malinen c8fa30f213 tests: Hotspot 2.0 OSU provider and no AP with info
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 3429e2ff36 tests: GAS/ANQP query OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 60547477e0 tests: ANQP_GET to unknown BSS
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 69e85c7fb3 tests: GAS_REQUEST OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 1ea75c7ce0 tests: Hotspot 2.0 network selection and invalid GAS response
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 1169516b62 tests: Hotspot 2.0 and maximum BSS load (roaming)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen a0061cf48f tests: Hotspot 2.0 network selection with min bandwidth - special cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 43e337f70c tests: Hotspot 2.0 required roaming consortium and no match
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen d717c10233 tests: Hotspot 2.0 connection and invalid roaming consortium ANQP-element
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 26597515d5 tests: Hotspot 2.0 with simulated SIM and EAP-SIM - OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen f7c04e50bd 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>
2016-07-03 22:37:01 +03:00
Jouni Malinen c8ae9daf2b 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>
2016-07-03 22:37:01 +03:00
Jouni Malinen 0e67d81fb6 tests: Hotspot 2.0 with simulated SIM and EAP-SIM - invalid IMSI
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen bc6e32880f tests: Remove extra semicolons from python scripts
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 208ebb9d1a tests: Hotspot 2.0 network selection and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 28642616bf tests: Hotspot 2.0 network selection and no roaming consortium
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen e330daa9f1 tests: Hotspot 2.0 network selection and cred_with_nai_realm cred->realm
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 04f4a1f59e tests: Hotspot 2.0 multi-cred and same sp_priority
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen 52be7b4116 tests: wpa_supplicant P2P_LO_START and P2P_LO_STOP commands
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:00 +03:00
Peng Xu a6f5b1937a 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>
2016-07-03 22:36:58 +03:00
Peng Xu 35d6655755 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>
2016-07-03 19:13:42 +03:00
Roshan Pius ef60f643ec 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>
2016-07-03 19:13:42 +03:00
Jouni Malinen 1c96988bc2 tests: IBSS and key_mgmt field in STATUS
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:42 +03:00
Saurav Babu 4ac5f2f8f4 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>
2016-07-03 19:13:41 +03:00
Jouni Malinen 50717e1e32 tests: IBSS operating frequency reporting
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:41 +03:00
Saurav Babu f0e84057fb 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>
2016-07-03 19:13:41 +03:00
Jouni Malinen a8fd58aa42 tests: MBO and supported operating classes
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:41 +03:00
Jouni Malinen 653d227e9f 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>
2016-07-01 01:13:54 +03:00
Jouni Malinen b47a743942 tests: MBO BSS transition request MBO IE parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-01 01:13:54 +03:00
Jouni Malinen 0073f453ff tests: MBO failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 12:53:05 +03:00
Jouni Malinen 3e3f1602b5 tests: MBO WNM token wrap around
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 12:53:05 +03:00
Jouni Malinen bbd41e4d2b tests: Invalid MBO non_pref_chan values
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 01:13:16 +03:00
Jouni Malinen b9dca2a954 tests: MBO mbo_cell_capa duplicate update
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 00:34:48 +03:00
Dmitry Shmidt 9607a1aef7 nl80211: Keep QCA vendor extensions together
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2016-06-30 00:25:31 +03:00
Jouni Malinen b136894fb0 tests: MPM protocol testing - CLS_ACPT event in OPN_SNT
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:56:26 +03:00
Jouni Malinen 434f8f7f82 tests: MPM protocol testing - CLS_ACPT event in CNF_RCVD
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:49:42 +03:00
Jouni Malinen 68f326d5fc tests: Mesh MPM FSM and HOLDING state event OPN_ACPT
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:43:50 +03:00
Jouni Malinen 8bd90996f9 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>
2016-06-29 01:22:13 +03:00
Jouni Malinen 78ac368574 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>
2016-06-28 23:30:40 +03:00
Jouni Malinen 02022564a0 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>
2016-06-28 23:20:39 +03:00
Jouni Malinen d02e549831 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>
2016-06-28 22:53:05 +03:00
Jouni Malinen 1f2f3f1c4a 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>
2016-06-28 22:45:41 +03:00
Jouni Malinen e8afaad7fd 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>
2016-06-28 22:44:28 +03:00
Jouni Malinen ee0ad453d5 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>
2016-06-28 22:23:42 +03:00