mech_eap.git
9 years agoAdd support for virtual interface creation/deletion
Jithu Jance [Fri, 20 Mar 2015 10:39:50 +0000 (16:09 +0530)]
Add support for virtual interface creation/deletion

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

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

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

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

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

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

Example output:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This driver op is not used anymore

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoChange version information for the 2.4 release hostap_2_4
Jouni Malinen [Sun, 15 Mar 2015 17:30:39 +0000 (19:30 +0200)]
Change version information for the 2.4 release

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: WPA2-PSK-FT AP over DS and unexpected response
Jouni Malinen [Sun, 15 Mar 2015 14:36:37 +0000 (16:36 +0200)]
tests: WPA2-PSK-FT AP over DS and unexpected response

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoAdd ChangeLog entries for v2.4
Jouni Malinen [Sat, 14 Mar 2015 14:51:02 +0000 (16:51 +0200)]
Add ChangeLog entries for v2.4

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoFix bitfield_get_first_zero() to not read beyond buffer
Jouni Malinen [Sat, 14 Mar 2015 11:50:12 +0000 (13:50 +0200)]
Fix bitfield_get_first_zero() to not read beyond buffer

It was possible for bitfield_get_first_zero() to read one octet beyond
the allocated bit buffer in case the first zero bit was not within
size-1 first octets.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Fix parallel-vm.py test case name parsing
Jouni Malinen [Sat, 14 Mar 2015 10:12:01 +0000 (12:12 +0200)]
tests: Fix parallel-vm.py test case name parsing

The 'params' argument was not used at all. Use it as an alternative
means for setting the list of test cases to execute.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Add --valgrind argument to parallel-vm.py
Jouni Malinen [Sat, 14 Mar 2015 10:09:23 +0000 (12:09 +0200)]
tests: Add --valgrind argument to parallel-vm.py

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: P2P autonomous GO and many clients (P2P IE fragmentation)
Jouni Malinen [Sat, 14 Mar 2015 08:58:17 +0000 (10:58 +0200)]
tests: P2P autonomous GO and many clients (P2P IE fragmentation)

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Verify wpa_supplicant AP mode events
Jouni Malinen [Sat, 14 Mar 2015 08:06:06 +0000 (10:06 +0200)]
tests: Verify wpa_supplicant AP mode events

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoIndicate AP-DISABLED on main AP mode deinit path
Jouni Malinen [Sat, 14 Mar 2015 08:12:33 +0000 (10:12 +0200)]
Indicate AP-DISABLED on main AP mode deinit path

This event was previously used only when disabling AP mode operation
through hostapd control interface. Make this more consistent by
providing same indication when disabling hostapd interface through the
interface deinit path. This adds the event to the case where a full
hostapd radio instance is removed which also applies for the
wpa_supplicant AP mode operations.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoSend CTRL-EVENT-DISCONNECTED on wpa_supplicant AP deinit
Jouni Malinen [Sat, 14 Mar 2015 08:05:05 +0000 (10:05 +0200)]
Send CTRL-EVENT-DISCONNECTED on wpa_supplicant AP deinit

This makes the AP mode more consistent with other modes by providing a
matching pair of CTRL-EVENT-CONNECTED and CTRL-EVENT-DISCONNECTED event
messages.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Document dependency on python-crypto
Jouni Malinen [Sat, 7 Mar 2015 21:47:02 +0000 (23:47 +0200)]
tests: Document dependency on python-crypto

Crypto.Cipher module is now needed to be able to run the 4-way handshake
protocol tests.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoOpenSSL: Always accept pinned certificates
Rohit Agrawal [Wed, 4 Mar 2015 15:24:18 +0000 (09:24 -0600)]
OpenSSL: Always accept pinned certificates

If OpenSSL reports that a presented leaf certificate is invalid,
but it has been explicitly pinned, accept it anyway.

Signed-off-by: Rohit Agrawal <rohit.agrawal.mn@gmail.com>
9 years agoAdd QCA vendor subcmd for Data Offload
Sunil Dutt [Thu, 26 Feb 2015 09:11:05 +0000 (14:41 +0530)]
Add QCA vendor subcmd for Data Offload

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Protocol testing for EAPOL-Key supplicant processing
Jouni Malinen [Sat, 7 Mar 2015 10:15:49 +0000 (12:15 +0200)]
tests: Protocol testing for EAPOL-Key supplicant processing

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Make ap_acs_40mhz more robust
Jouni Malinen [Sat, 7 Mar 2015 14:23:48 +0000 (16:23 +0200)]
tests: Make ap_acs_40mhz more robust

Explicitly clear cached scan results on the AP interface before starting
ACS. This avoids issues where conflicting BSS entries from previously
executed test cases could affect channel selection.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoMake rate-not-supported debug print more useful
Jouni Malinen [Sat, 7 Mar 2015 13:34:17 +0000 (15:34 +0200)]
Make rate-not-supported debug print more useful

It looks like "hardware does not support required rate 1.0 Mbps" has
started showing up in some hwsim test cases as a reason for failure.
This should not really occur with mac80211_hwsim, so add more details to
the debug print to make it easier to figure out what exactly happened.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agoReject Group Key message 1/2 prior to completion of 4-way handshake
Jouni Malinen [Sat, 7 Mar 2015 10:58:19 +0000 (12:58 +0200)]
Reject Group Key message 1/2 prior to completion of 4-way handshake

Previously, it would have been possible to complete RSN connection by
skipping the msg 3/4 and 4/4 completely. This would have resulted in
pairwise key not being configured. This is obviously not supposed to
happen in practice and could result in unexpected behavior, so reject
group key message before the initial 4-way handshake has been completed.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Add --short option for parallel-vm.py
Jouni Malinen [Fri, 6 Mar 2015 21:47:34 +0000 (23:47 +0200)]
tests: Add --short option for parallel-vm.py

This can be used to filter out test cases that take significantly longer
time to execute (15 seconds or longer). While this reduces testing
coverage, this can be useful to get a pretty quick coverage in
significantly faster time.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Allow running with arbitrary working directory
Johannes Berg [Tue, 3 Mar 2015 22:08:41 +0000 (23:08 +0100)]
tests: Allow running with arbitrary working directory

It's somewhat annoying that you can only run parallel-vm.py as
./parallel-vm.py, not from elsewhere by giving the full path,
so fix that by resolving the paths correctly in the scripts where
needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agotests: parallel-vm.py: Use argparse module
Johannes Berg [Tue, 3 Mar 2015 22:08:40 +0000 (23:08 +0100)]
tests: parallel-vm.py: Use argparse module

Instead of hand-writing a (positional) parser, use the argparse module.
This also gets us nice help output.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agotests: Make ap_remove_during_acs* more robust
Jouni Malinen [Fri, 6 Mar 2015 21:22:53 +0000 (23:22 +0200)]
tests: Make ap_remove_during_acs* more robust

These test cases need to use the previous-AP-on-correct-band workaround
similarly to test_ap_acs.py test cases for now to work with
mac80211_hwsim limitations on channel survey.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: Make suite_b* test cases more robust
Jouni Malinen [Fri, 6 Mar 2015 21:18:46 +0000 (23:18 +0200)]
tests: Make suite_b* test cases more robust

Explicitly clear the cfg80211 BSS cache at the beginning of these test
cases to avoid matching BSS flags against incorrect AP.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: More thorough cache clearing in ap_hs20_hidden_ssid_in_scan_res
Jouni Malinen [Fri, 6 Mar 2015 21:17:12 +0000 (23:17 +0200)]
tests: More thorough cache clearing in ap_hs20_hidden_ssid_in_scan_res

It looked like cfg80211 BSS entry for the zero-length SSID could remain
after this test case. Stop the AP and scan twice with flush-cache option
to make this less likely to occur and cause issues to following test
cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agonl80211: Extend NL80211_CMD_TDLS_OPER to support discovery
Sunil Dutt [Fri, 6 Mar 2015 14:47:54 +0000 (20:17 +0530)]
nl80211: Extend NL80211_CMD_TDLS_OPER to support discovery

ML80211_ATTR_TDLS_OPERATION can now set to NL80211_TDLS_DISCOVERY_REQ to
allow the driver to request wpa_supplicant to initiate TDLS Discovery
Request.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoTDLS: Allow driver to request TDLS Discovery Request initiation
Sunil Dutt [Fri, 6 Mar 2015 14:47:29 +0000 (20:17 +0530)]
TDLS: Allow driver to request TDLS Discovery Request initiation

This extends the TDLS operation request mechanism to allow TDLS
Discovery Request to be initiated by the driver similarly to the
existing Setup and Teardown requests.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agomesh: Leave mesh in driver setup if initialization fails
Jouni Malinen [Fri, 6 Mar 2015 18:58:56 +0000 (20:58 +0200)]
mesh: Leave mesh in driver setup if initialization fails

It was possible to leave the driver in mesh point state if upper layer
mesh initialization failed in wpa_supplicant_mesh_init(). With nl80211,
this results in the vif being left in mesh point mode instead of
restoring it to station mode. That seems to break normal functionality,
e.g., for Public Action frame TX/RX. Fix this by restoring station mode
on mesh failure path.

This error could be triggered, e.g., with the following hwsim test case
sequence: wpas_mesh_secure_sae_missing_password
nfc_p2p_static_handover_tagdev_go_forced_freq

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoClear RSN timers for preauth and PTK rekeying on disassociation
Jouni Malinen [Fri, 6 Mar 2015 16:40:28 +0000 (18:40 +0200)]
Clear RSN timers for preauth and PTK rekeying on disassociation

Previously, it was possible for the wpa_sm_start_preauth() and
wpa_sm_rekey_ptk() eloop callbacks to remain active after disconnection
and potentially continue to be used for the next association. This is
not correct behavior, so explicitly cancel these timeouts to avoid
unexpected attempts to complete RSN preauthentication or to request PTK
to be rekeyed.

It was possible to trigger this issue, e.g., by running the following
hwsim test case sequence: ap_wpa2_ptk_rekey ap_ft_sae_over_ds

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Make offchannel_tx_roc_gas more robust
Jouni Malinen [Fri, 6 Mar 2015 15:03:06 +0000 (17:03 +0200)]
tests: Make offchannel_tx_roc_gas more robust

It was possible for this test case to fail if cfg80211 BSS cache
included an entry for the same BSSID on another channel from an earlier
test case. Fix this by epxlicitly flushing the cache. In addition, use
scan_for_bss() to make the test less likely to fail in case of heavy CPU
load.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoReserve QCA vendor specific nl80211 commands 61..90
Jouni Malinen [Fri, 6 Mar 2015 13:46:49 +0000 (15:46 +0200)]
Reserve QCA vendor specific nl80211 commands 61..90

These are reserved for QCA use.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: WPS PIN and iterate through APs without selected registrar
Jouni Malinen [Fri, 6 Mar 2015 13:37:02 +0000 (15:37 +0200)]
tests: WPS PIN and iterate through APs without selected registrar

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoHS 2.0: Add NULL check before dereferencing in hs20-osu-client
Rajiv Ranjan [Thu, 5 Mar 2015 11:56:39 +0000 (17:26 +0530)]
HS 2.0: Add NULL check before dereferencing in hs20-osu-client

xml_node_get_text() may return NULL, so need to check the return value
before using it.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agonl80211: Use the new bridge port option proxyarp_wifi
Jouni Malinen [Wed, 4 Mar 2015 21:09:44 +0000 (23:09 +0200)]
nl80211: Use the new bridge port option proxyarp_wifi

The initial IEEE 802.11 ProxyARP functionality in the kernel needed
changes in behavior and that ended up requiring an independent
configuration parameter to be used. Update hostapd to use that new
proxyarp_wifi parameter instead of the earlier proxyarp.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: DFS with wpa_supplicant AP mode
Jouni Malinen [Thu, 5 Mar 2015 14:23:33 +0000 (16:23 +0200)]
tests: DFS with wpa_supplicant AP mode

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoDFS: Allow wpa_supplicant AP mode to use non-offloaded DFS
Jouni Malinen [Thu, 5 Mar 2015 14:20:03 +0000 (16:20 +0200)]
DFS: Allow wpa_supplicant AP mode to use non-offloaded DFS

This extends the hostapd-like setup of DFS-in-userspace for
wpa_supplicant AP mode operations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agonl80211: Add vendor event parsing for DFS offload events
Ahmad Kholaif [Thu, 5 Mar 2015 02:16:10 +0000 (18:16 -0800)]
nl80211: Add vendor event parsing for DFS offload events

This converts the QCA vendor event to EVENT_DFS_* events for the case
of DFS offloaded to the driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoDFS: wpa_supplicant event processing
Ahmad Kholaif [Thu, 5 Mar 2015 02:03:39 +0000 (18:03 -0800)]
DFS: wpa_supplicant event processing

Add radar event processing logic for AP/P2P GO. The DFS processing
functions from hostapd are now used for these wpa_supplicant cases as
well for both offloaded and non-offloaded DFS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoDFS offload: P2P changes for autonomous GO
Ahmad Kholaif [Thu, 5 Mar 2015 01:31:25 +0000 (17:31 -0800)]
DFS offload: P2P changes for autonomous GO

Add P2P changes to allow bringing up P2P autonomous GO on a DFS channel
if DFS functionality is offloaded to the driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoDFS offload: Indicate AP-CSA-FINISHED for DFS offloaded case
Ahmad Kholaif [Thu, 5 Mar 2015 01:04:09 +0000 (17:04 -0800)]
DFS offload: Indicate AP-CSA-FINISHED for DFS offloaded case

Modify the string for AP-CSA-FINISHED event indication to include a flag
which tells the framework whether the new channel is a DFS channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoDFS offload: Add main DFS handler for offloaded case
Ahmad Kholaif [Thu, 5 Mar 2015 01:24:36 +0000 (17:24 -0800)]
DFS offload: Add main DFS handler for offloaded case

Add handling logic for DFS offloaded case, and add a helper function
that takes the frequency (MHz) as a param and returns 1 if given channel
requires DFS, or 0 otherwise.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoDFS offload: Skip user space processing for CAC operations
Ahmad Kholaif [Thu, 5 Mar 2015 00:56:44 +0000 (16:56 -0800)]
DFS offload: Skip user space processing for CAC operations

If DFS is offloaded to the driver, hostapd should not be performing
these operations. Send the relevant control interface events to provide
information to upper layer software that may use such events to track
DFS/CAC state. This makes the offloaded DFS implementation more
consistent with the DFS-in-hostapd behavior.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoInterworking: Clear SCANNING state if no match found
Jouni Malinen [Tue, 3 Mar 2015 15:03:25 +0000 (17:03 +0200)]
Interworking: Clear SCANNING state if no match found

Previously, it was possible for wpa_state to be left at SCANNING if
INTERWORKING_SELECT command failed to find any match. Now the state is
set to DISCONNECTED if the operation terminates because of no matching
networks.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Fix workaround for limited channel survey in mac80211_hwsim
Jouni Malinen [Tue, 3 Mar 2015 14:01:52 +0000 (16:01 +0200)]
tests: Fix workaround for limited channel survey in mac80211_hwsim

The way the current channel survey is implemented in mac80211_hwsim
requires for the ACS test cases to be run immediately after the same
radio has been on the expected operating band. This was worked around in
one of the test cases and errors ignored in couple. Extend this
workaround to cover all the test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Fix ap_vlan_wpa2_radius_id_change exception
Jouni Malinen [Tue, 3 Mar 2015 13:40:19 +0000 (15:40 +0200)]
tests: Fix ap_vlan_wpa2_radius_id_change exception

This was supposed to be Exception("string") not "string".

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Fix python typo
Johannes Berg [Tue, 3 Mar 2015 13:19:34 +0000 (14:19 +0100)]
tests: Fix python typo

Clearly that should spell Exception.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agotests: Allow --shuffle-tests to be used with parallel-vm.py
Jouni Malinen [Tue, 3 Mar 2015 07:47:03 +0000 (09:47 +0200)]
tests: Allow --shuffle-tests to be used with parallel-vm.py

This can be used to get more random sequence of test case execution
into use when running multiple VMs.

Signed-off-by: Jouni Malinen <j@w1.fi>
9 years agotests: P2P GO start with only 5 GHz band allowed
Jouni Malinen [Mon, 2 Mar 2015 15:00:20 +0000 (17:00 +0200)]
tests: P2P GO start with only 5 GHz band allowed

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoP2P: Consider 5 GHz channels also for auto GO
Krishna Vamsi [Tue, 24 Feb 2015 06:43:33 +0000 (12:13 +0530)]
P2P: Consider 5 GHz channels also for auto GO

When there is no channel preference mentioned by user, auto GO
can be started on any of the 5 GHz channels supported for P2P.
Consider operating classes 115 and 124 which do not require DFS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoP2P: Fix regression in start-GO/AP through a "fake" scan
Jouni Malinen [Mon, 2 Mar 2015 14:45:51 +0000 (16:45 +0200)]
P2P: Fix regression in start-GO/AP through a "fake" scan

Commit 3f9ebc439c9468bf51219c931a05028aa8a3d3a7 ('P2P: Allow AP/GO
interface to be started while P2P-in-progress') moved the
wpa_s->connect_without_scan and wpa_s->last_scan_req checks to an
earlier place within the wpa_supplicant_scan() function without
adjusting wpa_s->last_scan_req. This variable was set between the old
and new location, so the new location needs to use wpa_s->scan_req.

This fixes an issue where AP/GO operations were not properly started in
some operation sequence. Instead, a station mode scan was executed. This
issue could be triggered, e.g., by running the no_go_freq test case
followed by autogo_random_channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agotests: Skip radius_acct_unreachable3 when not running under VM
Jouni Malinen [Mon, 2 Mar 2015 14:30:13 +0000 (16:30 +0200)]
tests: Skip radius_acct_unreachable3 when not running under VM

It looks like the IP routing table changes used here to trigger
unreachability and following reachability of the server do not work very
well with full IP routing configuration, so run this test case only when
executed under vm-run.sh.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoeap_proxy: Callback to notify any updates from eap_proxy
Sunil Dutt [Thu, 26 Feb 2015 10:24:37 +0000 (15:54 +0530)]
eap_proxy: Callback to notify any updates from eap_proxy

This commit introduces a callback to notify any configuration updates
from the eap_proxy layer. This is used to trigger re-reading of IMSI and
MNC length.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
9 years agoatheros: Add a new flag for OSEN support
Vivek Natarajan [Mon, 2 Mar 2015 04:59:07 +0000 (10:29 +0530)]
atheros: Add a new flag for OSEN support

Signed-off-by: Vivek Natarajan <nataraja@qti.qualcomm.com>
9 years agoRemove unnecessary NULL check to make function more consistent
Jouni Malinen [Sun, 1 Mar 2015 20:15:44 +0000 (22:15 +0200)]
Remove unnecessary NULL check to make function more consistent

Static analyzers may warn about dereference before NULL check in
wpas_network_disabled() due to the new code added to check
wpa_s->p2p_mgmt. wpa_s cannot be NULL here, so remove the unneeded check
for it later in the function. (CID 106124)

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