]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
11 years agoRemove unnecessary EVENT_RX_ACTION
Jouni Malinen [Sun, 29 Dec 2013 09:22:23 +0000 (11:22 +0200)] 
Remove unnecessary EVENT_RX_ACTION

This driver event was used separately for some Action frames, but all
the driver wrappers converted to this from information that would have
been enough to indicate an EVENT_RX_MGMT event. In addition, the
received event was then converted back to a full IEEE 802.11 management
frame for processing in most cases. This is unnecessary complexity, so
get rid of the extra path and use EVENT_RX_MGMT for Action frames as
well as other management frame subtypes.

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

11 years agoDefine __maybe_unused
Jouni Malinen [Sun, 29 Dec 2013 11:37:17 +0000 (13:37 +0200)] 
Define __maybe_unused

This can be used to silence compiler warnings in cases where #ifdef
blocks can leave some variables or functions unused and there is no
cleaner way of avoiding the warnings.

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

11 years agoDo not process Action frames twice in hostapd SME/MLME
Jouni Malinen [Sun, 29 Dec 2013 08:18:49 +0000 (10:18 +0200)] 
Do not process Action frames twice in hostapd SME/MLME

Commit 88b32a99d30894b2d6bb391371c442fc117edbab added support for using
some Action frame processing in hostapd for drivers that handle most of
SME/MLME internally (it added FT, this has since be extended for SA
Query and WNM). However, this was added in a way that ended up getting
both the hostapd_rx_action() and hostapd_action_rx() called for Action
frames. This could result in an attempt to process FT, SA Query, and WNM
Action frames twice.

There is need for more significant cleanup in Action frame processing in
hostapd depending on the driver type, but as a simple step to avoid
issues, skip the hostapd_action_rx() call if hostapd_rx_action()
processed the frame.

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

11 years agoFix whitespace style
Jouni Malinen [Sun, 29 Dec 2013 08:23:45 +0000 (10:23 +0200)] 
Fix whitespace style

Commit 88b32a99d30894b2d6bb391371c442fc117edbab added couple of lines
with incorrect indentation.

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

11 years agotests: Verify wps_ap_pin command behavior
Jouni Malinen [Sat, 28 Dec 2013 17:59:33 +0000 (19:59 +0200)] 
tests: Verify wps_ap_pin command behavior

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

11 years agoWPS: Remove unused send_wpabuf()
Jouni Malinen [Sat, 28 Dec 2013 17:49:25 +0000 (19:49 +0200)] 
WPS: Remove unused send_wpabuf()

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

11 years agotests: Verify concurrent WPS protocol run with assigned PIN
Jouni Malinen [Sat, 28 Dec 2013 17:46:02 +0000 (19:46 +0200)] 
tests: Verify concurrent WPS protocol run with assigned PIN

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

11 years agoMake local UUID available through ctrl_iface STATUS command
Jouni Malinen [Sat, 28 Dec 2013 17:44:49 +0000 (19:44 +0200)] 
Make local UUID available through ctrl_iface STATUS command

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

11 years agotests: Verify that another station cannot use same PIN
Jouni Malinen [Sat, 28 Dec 2013 17:34:29 +0000 (19:34 +0200)] 
tests: Verify that another station cannot use same PIN

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

11 years agotests: Verify selected registrar clearing on PIN method completion
Jouni Malinen [Sat, 28 Dec 2013 17:30:24 +0000 (19:30 +0200)] 
tests: Verify selected registrar clearing on PIN method completion

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

11 years agotests: WPS cancel on AP
Jouni Malinen [Sat, 28 Dec 2013 17:28:01 +0000 (19:28 +0200)] 
tests: WPS cancel on AP

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

11 years agotests: WPS ER configuring AP over UPnP
Jouni Malinen [Sat, 28 Dec 2013 17:20:46 +0000 (19:20 +0200)] 
tests: WPS ER configuring AP over UPnP

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

11 years agoWPS: Make sure reconfiguration timeout is not left behind on deinit
Jouni Malinen [Sat, 28 Dec 2013 17:18:47 +0000 (19:18 +0200)] 
WPS: Make sure reconfiguration timeout is not left behind on deinit

Even though this is a short timeout, it is at least theoretically
possible for the interface to be removed while waiting for
reconfiguration to start. Avoid issues with this by cancelling the
timeout on any WPS interface deinit. In theory, this should be postponed
until interface removal, but that does not fit very nicely to the
current wps_hostapd.c style.

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

11 years agotests: WPS ER unsubscription from event on WPS_ER_STOP
Jouni Malinen [Sat, 28 Dec 2013 16:51:35 +0000 (18:51 +0200)] 
tests: WPS ER unsubscription from event on WPS_ER_STOP

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

11 years agotests: WPS ER selecting AP using BSSID instead of UUID
Jouni Malinen [Sat, 28 Dec 2013 16:47:00 +0000 (18:47 +0200)] 
tests: WPS ER selecting AP using BSSID instead of UUID

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

11 years agotests: Verify WPS AP auto upgrade from WPA/TKIP to WPA/TKIP+WPA2/CCMP
Jouni Malinen [Sat, 28 Dec 2013 16:36:49 +0000 (18:36 +0200)] 
tests: Verify WPS AP auto upgrade from WPA/TKIP to WPA/TKIP+WPA2/CCMP

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

11 years agoWPS: Allow testing mode to disable 2.0 functionality
Jouni Malinen [Sat, 28 Dec 2013 16:35:30 +0000 (18:35 +0200)] 
WPS: Allow testing mode to disable 2.0 functionality

Previously, wps_version_number was used only to test extensibility to
newer version numbers, but it can also be used to enable testing of
older versions (1.0), e.g., to avoid hitting some 2.0 specific
validation steps.

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

11 years agotests: Verify PIN mismatch behavior
Jouni Malinen [Sat, 28 Dec 2013 16:22:04 +0000 (18:22 +0200)] 
tests: Verify PIN mismatch behavior

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

11 years agoRemove unused wps_device_data_dup()
Jouni Malinen [Sat, 28 Dec 2013 16:07:51 +0000 (18:07 +0200)] 
Remove unused wps_device_data_dup()

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

11 years agotests: Verify WPS AP Setup Locking on AP PIN failures
Jouni Malinen [Sat, 28 Dec 2013 15:47:32 +0000 (17:47 +0200)] 
tests: Verify WPS AP Setup Locking on AP PIN failures

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

11 years agotests: Verify WPS extensibility (version and new attribute)
Jouni Malinen [Sat, 28 Dec 2013 15:21:41 +0000 (17:21 +0200)] 
tests: Verify WPS extensibility (version and new attribute)

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

11 years agoRemove unnecessary extra tracking of eloop registration
Jouni Malinen [Sat, 28 Dec 2013 15:00:08 +0000 (17:00 +0200)] 
Remove unnecessary extra tracking of eloop registration

It is fine to try to cancel a registration that does not exist, so there
is no need to have the duplicated checks for eloop timeout and socket
registration.

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

11 years agoReplace unnecessary hex_value() with hex2byte()
Jouni Malinen [Sat, 28 Dec 2013 14:53:31 +0000 (16:53 +0200)] 
Replace unnecessary hex_value() with hex2byte()

There is no need to maintain two functions for doing
the same type of hex-to-binary conversion.

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

11 years agotests: Verify EAP-WSC fragmentation and mixed mode WPA+WPA2
Jouni Malinen [Sat, 28 Dec 2013 07:58:14 +0000 (09:58 +0200)] 
tests: Verify EAP-WSC fragmentation and mixed mode WPA+WPA2

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

11 years agoClear wps_fragment_size on FLUSH command
Jouni Malinen [Sat, 28 Dec 2013 14:31:37 +0000 (16:31 +0200)] 
Clear wps_fragment_size on FLUSH command

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

11 years agotests: Verify FT EAP
Jouni Malinen [Sat, 28 Dec 2013 11:51:09 +0000 (13:51 +0200)] 
tests: Verify FT EAP

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

11 years agotests: Verify FT SAE
Jouni Malinen [Sat, 28 Dec 2013 11:42:43 +0000 (13:42 +0200)] 
tests: Verify FT SAE

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

11 years agoEnable FT with SAE
Jouni Malinen [Sat, 28 Dec 2013 11:41:02 +0000 (13:41 +0200)] 
Enable FT with SAE

It was already possible to configure hostapd and wpa_supplicant to use
FT-SAE for the key management, but number of places were missing proper
AKM checks to allow FT to be used with the new AKM.

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

11 years agotests: WPA2-Enterprise with PMF required
Jouni Malinen [Sat, 28 Dec 2013 10:36:03 +0000 (12:36 +0200)] 
tests: WPA2-Enterprise with PMF required

Increase test coverage with PMF required configuration and SHA256-based
AKM in one of the EAP test cases.

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

11 years agotests: Verify WPA-Enterprise functionality
Jouni Malinen [Sat, 28 Dec 2013 10:30:28 +0000 (12:30 +0200)] 
tests: Verify WPA-Enterprise functionality

All the previous EAP test cases were using WPA2-Enterprise.

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

11 years agotests: Verify IBSS with WPA-None
Jouni Malinen [Sat, 28 Dec 2013 10:22:43 +0000 (12:22 +0200)] 
tests: Verify IBSS with WPA-None

The actual data connection does not seem to work with mac80211_hwsim, so
the hwsim_test results are ignored for now.

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

11 years agotests: Verify FT-over-DS
Jouni Malinen [Sat, 28 Dec 2013 09:52:19 +0000 (11:52 +0200)] 
tests: Verify FT-over-DS

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

11 years agonl80211: Fix protected Action frame reporting for AP mode
Jouni Malinen [Sun, 29 Dec 2013 07:57:42 +0000 (09:57 +0200)] 
nl80211: Fix protected Action frame reporting for AP mode

Action frame RX report through EVENT_RX_ACTION did not indicate whether
the frame was protected or not even though that information is available
in mlme_event_mgmt(). hostapd_rx_action() has a workaround for setting
the protected flag for SA Query frames, but that did not apply for other
frames, like FT Action. This broke FT-over-DS when PMF is enabled with
newer kernel versions (i.e., the ones that do not use monitor interface
for receiving management frames).

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

11 years agotests: Verify PeerKey handshake
Jouni Malinen [Sat, 28 Dec 2013 09:43:42 +0000 (11:43 +0200)] 
tests: Verify PeerKey handshake

NOTE: Actual use of the direct link (DLS) is not supported in
mac80211_hwsim, so this operation fails at setting the keys after
successfully completed 4-way handshake. This test case does allow the
key negotiation part to be tested for coverage, though.

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

11 years agoFix PeerKey 4-way handshake
Jouni Malinen [Sat, 28 Dec 2013 09:40:23 +0000 (11:40 +0200)] 
Fix PeerKey 4-way handshake

The earlier changes to buffer EAPOL frames when not associated to avoid
race conditions (especially commit
3ab35a660364dc68eaebfc0df6130071bbee6be5 but maybe something even before
that) broke PeerKey 4-way handshake. Fix this by using a separate check
before the race condition workaround to process PeerKey 4-way handshake
EAPOL-Key messages differently.

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

11 years agoFix PeerKey deinit behavior
Jouni Malinen [Sat, 28 Dec 2013 12:23:43 +0000 (14:23 +0200)] 
Fix PeerKey deinit behavior

PeerKey entries need to be removed on disassociation and this needs to
be done in a way that cancels the possibly pending eloop timeout.

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

11 years agotests: Generate a combined code coverage report
Jouni Malinen [Sat, 28 Dec 2013 09:08:16 +0000 (11:08 +0200)] 
tests: Generate a combined code coverage report

This combines coverage from all three separate reports into a single
report.

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

11 years agotests: Verify EAP fast reauthentication
Jouni Malinen [Sat, 28 Dec 2013 08:41:42 +0000 (10:41 +0200)] 
tests: Verify EAP fast reauthentication

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

11 years agotests: Verify PEAPv0 Crypto-Binding
Jouni Malinen [Sat, 28 Dec 2013 08:26:48 +0000 (10:26 +0200)] 
tests: Verify PEAPv0 Crypto-Binding

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

11 years agotests: Add WNM test cases
Jouni Malinen [Thu, 26 Dec 2013 19:09:55 +0000 (21:09 +0200)] 
tests: Add WNM test cases

These are not yet complete, but at least some frame exchanges can
be verified for WNM operations.

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

11 years agoWNM: Move disassociation imminent sending to wnm_ap.c
Jouni Malinen [Fri, 27 Dec 2013 17:40:04 +0000 (19:40 +0200)] 
WNM: Move disassociation imminent sending to wnm_ap.c

This gets all WNM BSS Transition Management frame building and sending
within hostapd into the same location.

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

11 years agohostapd: Make STA flags available through ctrl_iface STA command
Jouni Malinen [Fri, 27 Dec 2013 17:24:24 +0000 (19:24 +0200)] 
hostapd: Make STA flags available through ctrl_iface STA command

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

11 years agoRemove IEEE80211_REQUIRE_AUTH_ACK
Jouni Malinen [Fri, 27 Dec 2013 17:11:21 +0000 (19:11 +0200)] 
Remove IEEE80211_REQUIRE_AUTH_ACK

This is not really needed for anything and the standard does not require
such validation step to be made for Authentication frame transmission.

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

11 years agoRemove unused STA flags
Jouni Malinen [Fri, 27 Dec 2013 17:09:31 +0000 (19:09 +0200)] 
Remove unused STA flags

These three flags were only displayed, but never set or used for
anything else.

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

11 years agoWNM: Add STA flag to indicate the current WNM-Sleep-Mode state
Jouni Malinen [Fri, 27 Dec 2013 17:06:52 +0000 (19:06 +0200)] 
WNM: Add STA flag to indicate the current WNM-Sleep-Mode state

This can be useful for displaying the current STA state and also for
determining whether some operations are likely to fail or need
additional delay.

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

11 years agoWNM: Fix AP processing without wnm_oper driver callback
Jouni Malinen [Fri, 27 Dec 2013 16:44:21 +0000 (18:44 +0200)] 
WNM: Fix AP processing without wnm_oper driver callback

hostapd_drv_wnm_oper() needs to indicate an error if the driver callback
function is not implemented. Without this, the buf_len argument could
have been left uninitialized which could result in crashing the process.

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

11 years agoWNM: Move ESS Disassoc Imminent sending to a helper function
Jouni Malinen [Thu, 1 Aug 2013 21:37:48 +0000 (00:37 +0300)] 
WNM: Move ESS Disassoc Imminent sending to a helper function

This makes it easier to trigger the ESS Disassociation Imminent
operation from different sources.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoWNM: Minimal processing of BSS Transition Management Query/Response
Jouni Malinen [Fri, 27 Dec 2013 15:42:11 +0000 (17:42 +0200)] 
WNM: Minimal processing of BSS Transition Management Query/Response

This adds first steps at processing a BSS Transition Management Query on
the AP side. Mainly, the message is parsed and printed out in the debug
log and a minimal BSS Transition Management Request frame is sent as a
response. BSS Transition Management Response frame is also parsed and
details printed out in the debug log.

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

11 years agoWNM: Add Target BSSID into BSS Transition Management Response
Jouni Malinen [Fri, 27 Dec 2013 16:05:27 +0000 (18:05 +0200)] 
WNM: Add Target BSSID into BSS Transition Management Response

P802.11-REVmc clarifies that the Target BSSID field is always present
hen status code is zero, so match that requirement.

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

11 years agoWNM: Use nonzero dialog token in BSS Transition Management Query
Jouni Malinen [Fri, 27 Dec 2013 15:13:53 +0000 (17:13 +0200)] 
WNM: Use nonzero dialog token in BSS Transition Management Query

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

11 years agotests: Mark kernel issues more clearly in the log file
Jouni Malinen [Fri, 27 Dec 2013 09:04:38 +0000 (11:04 +0200)] 
tests: Mark kernel issues more clearly in the log file

It was previously not obvious from the <test case>.log file that a test
case was marked failed based on kernel issues. Make this very clear to
avoid wasting time on figuring out what caused the failure.

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

11 years agotests: Collect code coverage separately from each component in vm
Jouni Malinen [Fri, 27 Dec 2013 08:16:50 +0000 (10:16 +0200)] 
tests: Collect code coverage separately from each component in vm

Use a more robust design for collecting the gcov logs from the case
where test cases are run within a virtual machine. This generates a
writable-from-vm build tree for each component separately so that the
lcov and gcov can easily find the matching source code and data files.
In addition, prepare the reports automatically at the end of the
vm-run.sh --codecov execution.

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

11 years agotests: Wait for AP-ENABLED
Jouni Malinen [Fri, 27 Dec 2013 06:27:44 +0000 (08:27 +0200)] 
tests: Wait for AP-ENABLED

It takes some time for hostapd to complete AP startup. In some cases,
this could potentially result in station starting a scan before the AP
is beaconing or ready to reply to probes. To avoid such race conditions,
wait for AP-ENABLED before going ahead with the test cases.

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

11 years agoWNM: Fix Sleep Mode AP processing in open network
Jouni Malinen [Thu, 26 Dec 2013 19:08:50 +0000 (21:08 +0200)] 
WNM: Fix Sleep Mode AP processing in open network

The previous version could end up calling WPA authenticator routines
even though the authenticator had not been initialized and this could
result in NULL pointer dereference.

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

11 years agoWNM: Add debug logs to get the RSSI from the scan results
Sudha Daram [Wed, 18 Dec 2013 06:32:44 +0000 (12:02 +0530)] 
WNM: Add debug logs to get the RSSI from the scan results

This commit adds few more debug prints to log the RSSI information from
the scanned BSSIDs and the current connected BSSID when comparing
neighbor results during WNM Transition Management Request processing.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoInitial handling of GTK-not-used cipher suite
Jouni Malinen [Tue, 23 Jul 2013 18:24:05 +0000 (21:24 +0300)] 
Initial handling of GTK-not-used cipher suite

This prepares wpa_supplicant for accepting cases where the AP does not
use group addressed frames.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoOpenSSL: Do not accept SSL Client certificate for server
Jouni Malinen [Sat, 14 Dec 2013 03:20:01 +0000 (19:20 -0800)] 
OpenSSL: Do not accept SSL Client certificate for server

If the extended key usage of the AAA server certificate indicates
that the certificate is for client use, reject the TLS handshake.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoOpenSSL: Use certificates from TLS authentication in OCSP stapling
Jouni Malinen [Mon, 9 Dec 2013 02:35:11 +0000 (18:35 -0800)] 
OpenSSL: Use certificates from TLS authentication in OCSP stapling

OCSP response may not include all the needed CA certificates, so use the
ones received during TLS handshake.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoWPS ER: Fix deinit timeout handling with delayed/failing unsubscribe
Jouni Malinen [Fri, 29 Nov 2013 15:45:30 +0000 (17:45 +0200)] 
WPS ER: Fix deinit timeout handling with delayed/failing unsubscribe

The five second timeout to call wps_er_deinit_finish() could potentially
be left behind when removing the ER data based on some other event. This
could result in double-freeing of wps_er context killing the process,
e.g., if the WPS ER functionality is stopped while in the process of
unsubscribing from an AP and then restarted.

In addition, AP entries could still be present in the
er->ap_unsubscribing list when the deinit timeout hits. These entries
would still maintain HTTP context pointing to the ER which would be
freed here and as such, the following HTTP client callback could refer
to freed memory and kill the process. Fix this by freeing AP entries
from ap_unsubscribing list when ER is deinitialized from timeout even if
such AP entries have not completed unsubscription from UPnP events.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoWPS: Reschedule AP configuration reload on EAP completion
Jouni Malinen [Fri, 29 Nov 2013 14:52:44 +0000 (16:52 +0200)] 
WPS: Reschedule AP configuration reload on EAP completion

Reduce race condition of the station trying to reconnect immediately
after AP reconfiguration through WPS by rescheduling the reload
timeout to happen after EAP completion rather than the originally
scheduled 100 ms after new configuration became known.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agotests: Verify that WPS re-provisioning replaces old network block
Jouni Malinen [Fri, 29 Nov 2013 12:58:11 +0000 (14:58 +0200)] 
tests: Verify that WPS re-provisioning replaces old network block

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoWPS: Remove old duplicate network even if key is different
Jouni Malinen [Fri, 29 Nov 2013 12:56:11 +0000 (14:56 +0200)] 
WPS: Remove old duplicate network even if key is different

Previously, WPS credential provisioning removed duplicated network
entries only if they had identicical SSID, security parameters, and the
keys. However, it is possible that the AP has changes its keys and
leaving the old entry behind can result in connectibity issues (e.g.,
with 4-way handshake failing due to use of the old PSK). Fix this by
allowing the old network entry to be removed even if the keys
(passphrase, PSK, WEP keys) are different.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoMake CONFIG_TESTING_OPTIONS=y enable all testing options
Jouni Malinen [Thu, 28 Nov 2013 13:34:24 +0000 (15:34 +0200)] 
Make CONFIG_TESTING_OPTIONS=y enable all testing options

This makes it easier to enable various testing parameters and
functionality in build configuration.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoWPS: Reduce scan wait time during WPS processing
Jouni Malinen [Thu, 28 Nov 2013 10:56:21 +0000 (12:56 +0200)] 
WPS: Reduce scan wait time during WPS processing

Since the AP is expected to be available, there is no need to wait for
the full five second wait between scans during WPS connection. This
speeds up cases where the first scan misses the AP for some reason.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoDo not use results from externally requested scan for network selection
Jouni Malinen [Thu, 26 Dec 2013 17:00:48 +0000 (19:00 +0200)] 
Do not use results from externally requested scan for network selection

It may not always be desirable to trigger reassociation or network
change based on scan results from externally to wpa_supplicant trigger
scan operations. Skip network selection and roaming determination if the
received scan result is known to be triggered by something external to
wpa_supplicant. The control interface SCAN command can be used to
request wpa_supplicant to determine the best network.

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

11 years agotests: Verify scan behavior
Jouni Malinen [Thu, 26 Dec 2013 16:18:10 +0000 (18:18 +0200)] 
tests: Verify scan behavior

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

11 years agoReschedule own scan request if an externally started one is in progress
Jouni Malinen [Thu, 26 Dec 2013 15:53:20 +0000 (17:53 +0200)] 
Reschedule own scan request if an externally started one is in progress

This avoids some unnecessary attempts to request the driver to start a
scan while it is still busy with the scan operation that was started by
an external program.

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

11 years agoShow timing information about scan requests in debug log
Jouni Malinen [Thu, 26 Dec 2013 15:52:56 +0000 (17:52 +0200)] 
Show timing information about scan requests in debug log

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

11 years agoOptional scan id for ctrl_iface SCAN requests
Jouni Malinen [Thu, 26 Dec 2013 15:35:48 +0000 (17:35 +0200)] 
Optional scan id for ctrl_iface SCAN requests

This allows users of wpa_supplicant control interface to figure out when
their specific scan command has been started and completed. For example:

CTRL-EVENT-SCAN-STARTED
> scan freq=2412,2417 passive=1 use_id=1
3
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-STARTED id=3
CTRL-EVENT-SCAN-RESULTS id=3

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

11 years agoTrack whether scan was started by us or an external program
Jouni Malinen [Thu, 26 Dec 2013 15:33:26 +0000 (17:33 +0200)] 
Track whether scan was started by us or an external program

This can be used to improve scan behavior in cases external programs
request scans directly from the driver.

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

11 years agoFix comment format
Jouni Malinen [Thu, 26 Dec 2013 15:07:12 +0000 (17:07 +0200)] 
Fix comment format

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

11 years agoAllow passive scan to be requested with SCAN passive=1
Jouni Malinen [Thu, 26 Dec 2013 14:52:55 +0000 (16:52 +0200)] 
Allow passive scan to be requested with SCAN passive=1

This allows external programs to request wpa_supplicant to execute
a passive scan (i.e., do not send any Probe Request frames).

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

11 years agonl80211: Add scanned frequencies/SSIDs into debug log
Jouni Malinen [Thu, 26 Dec 2013 14:39:39 +0000 (16:39 +0200)] 
nl80211: Add scanned frequencies/SSIDs into debug log

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

11 years agoRemove unused last_scan_full
Jouni Malinen [Thu, 26 Dec 2013 14:38:05 +0000 (16:38 +0200)] 
Remove unused last_scan_full

This parameter was not really used for anything else apart from a debug
message in the same function that set it. In addition, cfg80211 returns
the set of scanned frequencies even for the full scan, so the code that
was setting this conditionally on frequency list not being there was not
really ever entered either.

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

11 years agotests: Include additional ANQP elements for testing coverage
Jouni Malinen [Thu, 26 Dec 2013 13:55:46 +0000 (15:55 +0200)] 
tests: Include additional ANQP elements for testing coverage

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

11 years agotests: Verify Interworking network selection with other EAP types
Jouni Malinen [Thu, 26 Dec 2013 12:08:42 +0000 (14:08 +0200)] 
tests: Verify Interworking network selection with other EAP types

This adds number of test cases to go through various possible EAP
configurations for Interworking network selection.

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

11 years agoInterworking: Allow EAP-FAST to be used
Jouni Malinen [Thu, 26 Dec 2013 11:48:35 +0000 (13:48 +0200)] 
Interworking: Allow EAP-FAST to be used

This behaves like PEAP as far as Interworking network selection is
concerned.

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

11 years agotests: Verify NAI Realm list with multiple realms in one entry
Jouni Malinen [Thu, 26 Dec 2013 11:44:27 +0000 (13:44 +0200)] 
tests: Verify NAI Realm list with multiple realms in one entry

In addition, use TTLS/PAP to increase testing coverage.

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

11 years agotests: Verify Interworking network selection based on roaming consortium
Jouni Malinen [Thu, 26 Dec 2013 11:18:46 +0000 (13:18 +0200)] 
tests: Verify Interworking network selection based on roaming consortium

In addition, use PEAP as the EAP method to increase testing coverage.

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

11 years agotests: Interworking network select with simulated SIM/USIM
Jouni Malinen [Thu, 26 Dec 2013 11:11:02 +0000 (13:11 +0200)] 
tests: Interworking network select with simulated SIM/USIM

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

11 years agotests: Verify behavior on malformed GAS responses
Jouni Malinen [Thu, 26 Dec 2013 10:19:57 +0000 (12:19 +0200)] 
tests: Verify behavior on malformed GAS responses

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

11 years agotests: Verify failure status code processing in GAS/ANQP
Jouni Malinen [Thu, 26 Dec 2013 09:54:12 +0000 (11:54 +0200)] 
tests: Verify failure status code processing in GAS/ANQP

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

11 years agotests: Clean up GAS/ANQP message processing
Jouni Malinen [Thu, 26 Dec 2013 09:44:28 +0000 (11:44 +0200)] 
tests: Clean up GAS/ANQP message processing

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

11 years agotests: Use helper functions for GAS test cases
Jouni Malinen [Thu, 26 Dec 2013 08:59:58 +0000 (10:59 +0200)] 
tests: Use helper functions for GAS test cases

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

11 years agotests: Verify behavior on incorrect GAS response type
Jouni Malinen [Thu, 26 Dec 2013 08:52:11 +0000 (10:52 +0200)] 
tests: Verify behavior on incorrect GAS response type

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

11 years agotests: Add a GAS query timeout test case
Jouni Malinen [Thu, 26 Dec 2013 06:40:03 +0000 (08:40 +0200)] 
tests: Add a GAS query timeout test case

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

11 years agoAdd GAS-QUERY-START and GAS-QUERY-DONE event messages
Jouni Malinen [Thu, 26 Dec 2013 06:38:42 +0000 (08:38 +0200)] 
Add GAS-QUERY-START and GAS-QUERY-DONE event messages

External programs can use these new control interface events to better
track progress of GAS operations.

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

11 years agohostapd: Allow external management frame processing or testing
Jouni Malinen [Thu, 26 Dec 2013 06:35:22 +0000 (08:35 +0200)] 
hostapd: Allow external management frame processing or testing

This enables more convenient protocol testing of station side
functionality in various error cases and unexpected sequences without
having to implement each test scenario within hostapd.
ext_mgmt_frame_handle parameter can be set to 1 to move all management
frame processing into an external program through control interface
events (MGMT-RX and MGMT-TX-STATUS) and command (MGMT_TX).

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

11 years agotests: Add a GAS comeback delay test case
Jouni Malinen [Thu, 26 Dec 2013 05:50:00 +0000 (07:50 +0200)] 
tests: Add a GAS comeback delay test case

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

11 years agotests: Verify Wi-Fi Display operations
Jouni Malinen [Wed, 25 Dec 2013 21:33:06 +0000 (23:33 +0200)] 
tests: Verify Wi-Fi Display operations

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

11 years agotests: Increase test coverage on BSS command
Jouni Malinen [Wed, 25 Dec 2013 19:03:47 +0000 (21:03 +0200)] 
tests: Increase test coverage on BSS command

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

11 years agotests: Verify sharing and unsharing of ANQP results
Jouni Malinen [Wed, 25 Dec 2013 18:49:02 +0000 (20:49 +0200)] 
tests: Verify sharing and unsharing of ANQP results

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

11 years agotests: Use shorter Interworking element for larger coverage
Jouni Malinen [Wed, 25 Dec 2013 18:29:04 +0000 (20:29 +0200)] 
tests: Use shorter Interworking element for larger coverage

Since the venue information in the Interworking element is optional,
include both the cases of it included and not included in the test
cases.

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

11 years agotests: Use a single channel scan to avoid unnecessary full scans
Jouni Malinen [Wed, 25 Dec 2013 18:17:32 +0000 (20:17 +0200)] 
tests: Use a single channel scan to avoid unnecessary full scans

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

11 years agoAllow channel list to be specified for SCAN command
Jouni Malinen [Wed, 25 Dec 2013 18:04:52 +0000 (20:04 +0200)] 
Allow channel list to be specified for SCAN command

The new freq=<frequency ranges> parameter to the SCAN command can be
used to request a scan to be performed on the specified set of channels
instead of on all channels. For example, "wpa_cli scan
freq=2400-2500,5180" would scan channels 1-14 and 36. Only the channels
that the driver indicates as enabled and that are within the specified
ranges are included in the request.

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

11 years agoMove int_array helpfer functions to utils/common.c
Jouni Malinen [Wed, 25 Dec 2013 18:02:57 +0000 (20:02 +0200)] 
Move int_array helpfer functions to utils/common.c

These can be useful outside scan.c, so make them available.

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

11 years agotests: Verify Interworking Probe Request filtering
Jouni Malinen [Wed, 25 Dec 2013 16:55:08 +0000 (18:55 +0200)] 
tests: Verify Interworking Probe Request filtering

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

11 years agowlantest: Add a BSS probe_response counter
Jouni Malinen [Wed, 25 Dec 2013 16:37:33 +0000 (18:37 +0200)] 
wlantest: Add a BSS probe_response counter

This can be used to verify whether an AP replies to a Probe Request
frame.

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

11 years agotests: Allow gcov to be used when running test cases within vm
Jouni Malinen [Wed, 25 Dec 2013 15:14:31 +0000 (17:14 +0200)] 
tests: Allow gcov to be used when running test cases within vm

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

11 years agoAdd make lcov-html to generate code coverage report
Jouni Malinen [Wed, 25 Dec 2013 11:44:38 +0000 (13:44 +0200)] 
Add make lcov-html to generate code coverage report

In addition, update build rules to compile object files in the same
directory as the source code file if CONFIG_CODE_COVERAGE=y is set to
make lcov find the source code files.

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