]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
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>

11 years agotests: Add test cases for various ciphers
Jouni Malinen [Wed, 25 Dec 2013 09:17:32 +0000 (11:17 +0200)] 
tests: Add test cases for various ciphers

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

11 years agonl80211: Fetch cipher capabilities from the driver
Jouni Malinen [Wed, 25 Dec 2013 09:07:58 +0000 (11:07 +0200)] 
nl80211: Fetch cipher capabilities from the driver

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

11 years agoClean up cipher capability prints
Jouni Malinen [Wed, 25 Dec 2013 08:44:06 +0000 (10:44 +0200)] 
Clean up cipher capability prints

Use an array of ciphers and a loop instead of copy-pasted copies of the
same printing functionality for each cipher.

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

11 years agoConvert wpa_hexdump functions to use void pointer instead of u8 *
Jouni Malinen [Tue, 24 Dec 2013 21:12:37 +0000 (23:12 +0200)] 
Convert wpa_hexdump functions to use void pointer instead of u8 *

This removes need for ugly typecasts for some debug prints.

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

11 years agoRemove obsolete license notifications
Jouni Malinen [Tue, 24 Dec 2013 20:59:52 +0000 (22:59 +0200)] 
Remove obsolete license notifications

These files have been distributed only under the BSD license option
since February 2012. Clarify the license statements in the files to
match that to avoid confusion.

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

11 years agoAndroid: Remove old WEXT extensions
Jouni Malinen [Tue, 24 Dec 2013 20:52:18 +0000 (22:52 +0200)] 
Android: Remove old WEXT extensions

Android has moved to nl80211, so no need to maintain these old WEXT
extensions in wpa_supplicant.

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

11 years agoVerify that beacon setup succeeds before proceeding
Jouni Malinen [Tue, 24 Dec 2013 20:46:20 +0000 (22:46 +0200)] 
Verify that beacon setup succeeds before proceeding

There is no point in starting the AP operations unless
the driver can be successfully configured to beacon.

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

11 years agoVerify group key configuration for WPA group
Jouni Malinen [Tue, 24 Dec 2013 20:38:16 +0000 (22:38 +0200)] 
Verify group key configuration for WPA group

If configuration of the group key to the driver fails, move the WPA
group into failed state and indication group setup error to avoid cases
where AP could look like it is working even through the keys are not set
correctly.

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

11 years agoAdd definitions for new cipher suites from IEEE Std 802.11ac-2013
Jouni Malinen [Tue, 24 Dec 2013 20:21:04 +0000 (22:21 +0200)] 
Add definitions for new cipher suites from IEEE Std 802.11ac-2013

This adds initial parts for supporting the new GCMP-256, CCMP-256,
BIP-GMAC-128, BIP-GMAC-256, and BIP-CMAC-256 cipher suites.

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

11 years agoVHT: Use status code 104 to indicate VHT required
Jouni Malinen [Tue, 24 Dec 2013 19:19:45 +0000 (21:19 +0200)] 
VHT: Use status code 104 to indicate VHT required

IEEE Std 802.11ac-2013 defines a status code for this, so use that
instead of the unspecified reason.

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

11 years agotests: Verify QoS Mapping results in Data frames
Jouni Malinen [Tue, 24 Dec 2013 18:21:58 +0000 (20:21 +0200)] 
tests: Verify QoS Mapping results in Data frames

This verifies that IP packets with various DSCP values are mapped to the
correct TID both with default mapping and with custom QoS mappings.

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

11 years agowlantest: Add per-TID RX/TX counters
Jouni Malinen [Tue, 24 Dec 2013 18:21:27 +0000 (20:21 +0200)] 
wlantest: Add per-TID RX/TX counters

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

11 years agohwsim_test: Allow TOS/DSCP field to be set from command line
Jouni Malinen [Tue, 24 Dec 2013 12:31:52 +0000 (14:31 +0200)] 
hwsim_test: Allow TOS/DSCP field to be set from command line

This makes it easier to test how Data frames are mapped to different
ACs.

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

11 years agohwsim_test: Use a valid IPv4 header in the test frame
Jouni Malinen [Tue, 24 Dec 2013 12:18:14 +0000 (14:18 +0200)] 
hwsim_test: Use a valid IPv4 header in the test frame

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

11 years agohwsim_test: Use unsigned bit variables
Jouni Malinen [Tue, 24 Dec 2013 11:42:26 +0000 (13:42 +0200)] 
hwsim_test: Use unsigned bit variables

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

11 years agowpa_supplicant: Fix crash when terminating all interfaces
Moshe Benji [Sun, 15 Dec 2013 08:50:07 +0000 (10:50 +0200)] 
wpa_supplicant: Fix crash when terminating all interfaces

In wpa_supplicant_terminate_proc(), while iterating and
terminating interfaces, after an interface is terminated,
we can no longer access its memory as it is no longer valid
and causes a crash.

Fix this by saving the pointer to the next interface before freeing
the current one to avoid accessing an invalid memory location.

Signed-hostap: Moshe Benji <moshe.benji@intel.com>

11 years agoAdd secondary channel IE for CSA
Andrei Otcheretianski [Sun, 15 Dec 2013 08:47:42 +0000 (10:47 +0200)] 
Add secondary channel IE for CSA

If secondary channel is provided for CSA, advertise it in the Secondary
Channel Offset element in Beacon and Probe Response frames.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

11 years agoStore entire CS freq_params and not only freq
Andrei Otcheretianski [Sun, 15 Dec 2013 08:47:41 +0000 (10:47 +0200)] 
Store entire CS freq_params and not only freq

When CSA flow starts, store the entire struct hostapd_freq_params and
not only CS frequency as it was before. The additional freq_params are
required to advertise CS supplementary IEs such as secondary channel,
wide bandwidth CS, etc.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

11 years agoInclude driver.h in hostapd.h
Andrei Otcheretianski [Sun, 15 Dec 2013 08:47:40 +0000 (10:47 +0200)] 
Include driver.h in hostapd.h

This allows use of structs (and not only pointers) defined in drivers.h.
Remove also some not needed forward declarations and redundant includes.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

11 years agowpa_supplicant: Use monotonic time for last_scan check
Johannes Berg [Mon, 16 Dec 2013 20:08:44 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for last_scan check

This just serves to check if there was a scan within
the last 5 seconds, hence it should use monotonic time.
While at it, also use os_reltime_expired().

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoWPS: Use monotonic time for AP connection attempt
Johannes Berg [Mon, 16 Dec 2013 20:08:43 +0000 (21:08 +0100)] 
WPS: Use monotonic time for AP connection attempt

This is only used for a debug message, but that message prints
the time since the last attempt, so it should use monotonic
time instead of wall clock.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agowpa_supplicant: Use relative time for TKIP Michael MIC failures
Johannes Berg [Mon, 16 Dec 2013 20:08:42 +0000 (21:08 +0100)] 
wpa_supplicant: Use relative time for TKIP Michael MIC failures

The MMIC failure code should use monotonic time to check
whether 60 seconds have elapsed or not. For type-safety,
use struct os_reltime for the timestamp variable, and
also convert to using os_reltime_expired().

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agowpa_supplicant: Use monotonic time for temp-disabled networks
Johannes Berg [Mon, 16 Dec 2013 20:08:41 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for temp-disabled networks

Temporarily disabled networks are disabled for a certain
duration, so the code should use monotonic time.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoP2P: Use monotonic time for GO client waiting
Johannes Berg [Mon, 16 Dec 2013 20:08:40 +0000 (21:08 +0100)] 
P2P: Use monotonic time for GO client waiting

GO activation can fail if the first client doesn't connect
within a certain time, but this should not be dependent on
wall time -- use monotonic time instead.

While at it, use os_reltime_expired().

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoIBSS RSN: Use monotonic time for reinit detection
Johannes Berg [Mon, 16 Dec 2013 20:08:39 +0000 (21:08 +0100)] 
IBSS RSN: Use monotonic time for reinit detection

The reinit detection skips reinit when the time since the own
authentication frame TX is less than half a second, so it shouldn't
be affected by wall time and use monotonic time instead.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoWPS_UPNP: Use monotonic time for event debouncing
Johannes Berg [Mon, 16 Dec 2013 20:08:38 +0000 (21:08 +0100)] 
WPS_UPNP: Use monotonic time for event debouncing

The event debouncing isn't very accurate (since it doesn't
take sub-second resolution into account), but it should use
monotonic time anyway since it doesn't care about the wall
clock.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agowps_registrar: Use monotonic time for PBC workaround
Johannes Berg [Mon, 16 Dec 2013 20:08:37 +0000 (21:08 +0100)] 
wps_registrar: Use monotonic time for PBC workaround

The PBC ignore-start workaround just needs to check whether
the time is within 5 seconds, so should use monotonic time.

While at it, add a few more ifdefs to clearly separate the
code and variables needed.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agowps_registrar: Use monotonic time for PBC session timeout
Johannes Berg [Mon, 16 Dec 2013 20:08:36 +0000 (21:08 +0100)] 
wps_registrar: Use monotonic time for PBC session timeout

PBC sessions are just time-stamped when activated, and
eventually time out, so should use monotonic time.

While at it, make the code use os_reltime_expired().

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agowps_registrar: Use monotonic time for PIN timeout
Johannes Berg [Mon, 16 Dec 2013 20:08:35 +0000 (21:08 +0100)] 
wps_registrar: Use monotonic time for PIN timeout

If the PIN expires, then a timeout is given, so that monotonic
time should be used.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agorsn_supp: Use monotonic time for PMKSA cache expiry
Johannes Berg [Mon, 16 Dec 2013 20:08:34 +0000 (21:08 +0100)] 
rsn_supp: Use monotonic time for PMKSA cache expiry

Since this is just for relative timeouts, it should use
monotonic time.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agowpa_supplicant: Use monotonic time for EAPOL RX workaround
Johannes Berg [Mon, 16 Dec 2013 20:08:33 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for EAPOL RX workaround

The EAPOL RX workaround checks that the events are less than 100 ms
apart, so only uses relative times and should use monotonic time.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agobgscan: Use monotonic time
Johannes Berg [Mon, 16 Dec 2013 20:08:32 +0000 (21:08 +0100)] 
bgscan: Use monotonic time

The bgscan simple and learn algorithms should run regardless
of wall clock time jumps, so make them use monotonic time.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agorsn_supp: Do not track expiration time
Johannes Berg [Mon, 16 Dec 2013 20:08:31 +0000 (21:08 +0100)] 
rsn_supp: Do not track expiration time

The eloop already tracks the expiration/lifetime, and the expiration
isn't really used, so remove it. It should otherwise have used monotonic
time, but since it's not actually used, we can remove it instead.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoRADIUS server: Use monotonic time
Johannes Berg [Mon, 16 Dec 2013 20:08:30 +0000 (21:08 +0100)] 
RADIUS server: Use monotonic time

The RADIUS server needs to calculate uptime, which is relative
and thus should use monotonic time.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoRADIUS client: Use monotonic time
Johannes Berg [Mon, 16 Dec 2013 20:08:29 +0000 (21:08 +0100)] 
RADIUS client: Use monotonic time

Since the RADIUS client cares about relative time (retry timeout)
only, it should use monotonic time.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agowpa_supplicant: Use monotonic time for RX/BSS times
Johannes Berg [Mon, 16 Dec 2013 20:08:28 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for RX/BSS times

The BSS table, scan timeout, and related functionality should use
monotonic time since they care about relative values (age) only.
Unfortunately, these are all connected, so the patch can't be split
further. Another problem with this is that it changes the driver wrapper
API. Though, it seems only the test driver is using this.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agowpa_supplicant: Use monotonic time for SA query timeout
Johannes Berg [Mon, 16 Dec 2013 20:08:27 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for SA query timeout

The SA query timeout is just a regular timeout (currently
hard-coded to 1000 TU), so use monotonic time for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoEAP server: Remove SIM-DB pending timestamp
Johannes Berg [Mon, 16 Dec 2013 20:08:26 +0000 (21:08 +0100)] 
EAP server: Remove SIM-DB pending timestamp

This should probably have used monotonic time for entry timestamps, but
as those aren't used at all right now, so just remove them entirely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowpa_ctrl: Use monotonic time for request retry loop
Johannes Berg [Mon, 16 Dec 2013 20:08:25 +0000 (21:08 +0100)] 
wpa_ctrl: Use monotonic time for request retry loop

The request retry loop only retries for 5 seconds, so any time
jumps would probably not affect it much, but it should be using
monotonic time nonetheless since it only cares about duration.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoAP: Use monotonic time for MMIC failure/TKIP countermeasures
Johannes Berg [Mon, 16 Dec 2013 20:08:24 +0000 (21:08 +0100)] 
AP: Use monotonic time for MMIC failure/TKIP countermeasures

Wall time jumps shouldn't affect MMIC failure/TKIP countermeasures,
so use monotonic time. Change the michael_mic_failure variable to
struct os_reltime for type-safety.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoAP: Use monotonic time for PMKSA cache
Johannes Berg [Mon, 16 Dec 2013 20:08:23 +0000 (21:08 +0100)] 
AP: Use monotonic time for PMKSA cache

Since the PMKSA cache only uses relative time, use the monotonic time
functions instead of wall time to be correct when the clock jumps.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agoAP: Use monotonic time for STA accounting
Johannes Berg [Mon, 16 Dec 2013 20:08:22 +0000 (21:08 +0100)] 
AP: Use monotonic time for STA accounting

For type-safety, make sta->acct_session_start a struct os_reltime
and then use monotonic time for accounting. For RADIUS reporting,
continue to use wall clock time as specified by RFC 2869, but for
the session time use monotonic time.

Interestingly, RFC 2869 doesn't specify a timezone, so the value
is somewhat arbitrary.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agobgscan_learn: Start scanning from the first freq
Eliad Peller [Thu, 19 Dec 2013 10:03:25 +0000 (12:03 +0200)] 
bgscan_learn: Start scanning from the first freq

bgscan_learn_get_probe_freq() starts from returning the second entry in
the supp_freqs arrays. Change its logic a bit to make it start from the
first entry.

Signed-hostap: Eliad Peller <eliad@wizery.com>

11 years agobgscan_learn: Fix initial interval
Eyal Shapira [Thu, 19 Dec 2013 10:03:30 +0000 (12:03 +0200)] 
bgscan_learn: Fix initial interval

In case the initial signal level of the associated BSS was above the
given threshold, bgscan_learn module would begin using the
short_interval but never switch to the long_interval as there would be
no signal change event. Make the init code poll for the current signal
level and set scan_interval accordingly. This logic exists in
bgscan_simple but was missing in bgscan_learn.

Signed-hostap: Eyal Shapira <eyal@wizery.com>

11 years agohwsim tests: Handle regdomain requests in vm scripts
Johannes Berg [Wed, 18 Dec 2013 20:50:21 +0000 (21:50 +0100)] 
hwsim tests: Handle regdomain requests in vm scripts

In order to handle regulatory domain requests, crda needs to be
installed on the host, but we also need to install a uevent helper in
the VM so that it gets executed (since we don't run udev).

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

11 years agobgscan_learn: Avoid redundant frequencies
Eliad Peller [Thu, 19 Dec 2013 10:03:24 +0000 (12:03 +0200)] 
bgscan_learn: Avoid redundant frequencies

Some hw modes (e.g., 11b and 11g) contain the same frequencies,
causing the supp_freqs array to be populated with redundant entries.

Check for the existence of the freq before adding it.

Signed-hostap: Eliad Peller <eliad@wizery.com>