]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
12 years agoTDLS: Pass peer's AID information to kernel
Sunil Dutt [Mon, 6 May 2013 12:47:44 +0000 (15:47 +0300)] 
TDLS: Pass peer's AID information to kernel

The information of the peer's AID is required for the driver to
construct partial AID in VHT PPDU's. Pass this information to the driver
during add/set station operations (well, as soon as the information is
available, i.e., with set station operation currently).

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

12 years agowpadebug: Add more common control interface commands to the list
Jouni Malinen [Sun, 5 May 2013 18:11:36 +0000 (21:11 +0300)] 
wpadebug: Add more common control interface commands to the list

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

12 years agowpadebug: Add credential manager
Jouni Malinen [Sun, 5 May 2013 16:38:51 +0000 (19:38 +0300)] 
wpadebug: Add credential manager

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

12 years agowpadebug: Add exception handling for missing resources
Jouni Malinen [Sun, 5 May 2013 15:28:25 +0000 (18:28 +0300)] 
wpadebug: Add exception handling for missing resources

These errors should not really happen, but apparently they can if the
build dependencies get messed up somehow.

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

12 years agoHS 2.0: Include HS 2.0 Indication element only for HS 2.0 association
Jouni Malinen [Sun, 5 May 2013 13:29:21 +0000 (16:29 +0300)] 
HS 2.0: Include HS 2.0 Indication element only for HS 2.0 association

The Hotspot 2.0 specification seems to mandate this element to be
included in all (Re)Association Request frames if the station is Hotspot
2.0 capable. However, that results in conflicts with other requirements
like no TKIP use when this element is present. The design is really
supposed to include the indication element only for Hotspot 2.0
associations regardless of what the current specification implies.
Remove the HS 2.0 Indication element from (Re)Association Request frame
whenever the connection is not for Hotspot 2.0 purposes.

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

12 years agoedit: Fix history processing on running old command
Jouni Malinen [Sun, 5 May 2013 10:09:55 +0000 (13:09 +0300)] 
edit: Fix history processing on running old command

currbuf_valid needs to be cleared when an old command from history is
processed to avoid leaving a bogus entry that makes history_prev() skip
the last entry in history.

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

12 years agowpa_cli: Fetch the current BSSID list when starting interactive mode
Jouni Malinen [Sun, 5 May 2013 09:38:55 +0000 (12:38 +0300)] 
wpa_cli: Fetch the current BSSID list when starting interactive mode

This makes tab completion work better in cases where wpa_cli is started
after wpa_supplicant has already discovered BSSes.

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

12 years agowpa_cli: Add BSSID tab completion for set bssid_filter
Jouni Malinen [Sun, 5 May 2013 09:20:35 +0000 (12:20 +0300)] 
wpa_cli: Add BSSID tab completion for set bssid_filter

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

12 years agowpa_cli: Replace set command help with completion routine
Jouni Malinen [Sun, 5 May 2013 09:12:31 +0000 (12:12 +0300)] 
wpa_cli: Replace set command help with completion routine

The old help text did not include most of the parameters and as such,
was not really helpful. Replace it with tab completion function that
includes more or less all available parameters.

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

12 years agowpa_cli: Allow space in the set command value
Jouni Malinen [Sun, 5 May 2013 08:53:20 +0000 (11:53 +0300)] 
wpa_cli: Allow space in the set command value

Previously, interactive mode could not be used to enter space-separated
lists with the set command. This removes that restriction and allows
such commands to be encoded properly.

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

12 years agowpa_supplicant: Allow global scan frequencies configuration
Ben Greear [Sun, 5 May 2013 08:46:54 +0000 (11:46 +0300)] 
wpa_supplicant: Allow global scan frequencies configuration

This allows one to limit the channels that wpa_supplicant will
scan. This is a useful addition to the freq_list configurable
in the network {} section.

Signed-hostap: Ben Greear <greearb@candelatech.com>

12 years agowpadebug: Add generic control interface command mechanism
Jouni Malinen [Sat, 4 May 2013 23:46:41 +0000 (02:46 +0300)] 
wpadebug: Add generic control interface command mechanism

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

12 years agowpadebug: Add generic shell command mechanism
Jouni Malinen [Sat, 4 May 2013 22:46:07 +0000 (01:46 +0300)] 
wpadebug: Add generic shell command mechanism

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

12 years agowpadebug: Report WSC NFC tag read to wpa_supplicant
Jouni Malinen [Sat, 4 May 2013 18:09:34 +0000 (21:09 +0300)] 
wpadebug: Report WSC NFC tag read to wpa_supplicant

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

12 years agowpadebug: Move NFC intent activity into a separate class
Jouni Malinen [Sat, 4 May 2013 17:29:47 +0000 (20:29 +0300)] 
wpadebug: Move NFC intent activity into a separate class

This simplifies both activities by making the DisplayMessageActity
simple text message displaying operation and the NFC activity as
something that is started only through NFC intent triggers.

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

12 years agoSynchronize build config comments for wpa_supplicant
Jouni Malinen [Sat, 4 May 2013 17:16:55 +0000 (20:16 +0300)] 
Synchronize build config comments for wpa_supplicant

This updates number of comments in android.config to match the latest
version in defconfig and adds some of the entries that were previously
present only in android.config into defconfig.

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

12 years agoAndroid: Enable WPS ER and NFC support in the build
Jouni Malinen [Sat, 4 May 2013 17:12:44 +0000 (20:12 +0300)] 
Android: Enable WPS ER and NFC support in the build

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

12 years agoWPS: Do not use void* in arithmetic
Jouni Malinen [Sat, 4 May 2013 17:11:16 +0000 (20:11 +0300)] 
WPS: Do not use void* in arithmetic

This is a C compiler extension and not needed, so replace with standard
compliant way of calculating the pointer.

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

12 years agoRevert "nl80211: Add nla_put_u32() wrapper for Android"
Jouni Malinen [Sat, 4 May 2013 16:06:08 +0000 (19:06 +0300)] 
Revert "nl80211: Add nla_put_u32() wrapper for Android"

This reverts commit df2f9ec6b2578def21fc26c88e661b5d28f0fbbf.

The current AOSP snapshot for JB includes nla_put_u32(), so this is not
needed anymore and is also causing linking issues due to duplicated
definition.

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

12 years agowpadebug: Add WSC request through Android beam
Jouni Malinen [Sat, 4 May 2013 15:50:48 +0000 (18:50 +0300)] 
wpadebug: Add WSC request through Android beam

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

12 years agoHS 2.0: Move Probe Request Indication IE addition to proper place
Jouni Malinen [Sat, 4 May 2013 08:57:56 +0000 (11:57 +0300)] 
HS 2.0: Move Probe Request Indication IE addition to proper place

This needs to be in wpa_supplicant_extra_ies() to get consistent
behavior for both scan and sched_scan cases.

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

12 years agoWPA: Print pairwise EAPOL-Key flag as a bool
Johannes Berg [Sat, 4 May 2013 08:48:57 +0000 (11:48 +0300)] 
WPA: Print pairwise EAPOL-Key flag as a bool

Since "pairwise" is defined as an integer, the current assignment leads
to it having the value 0 or 8, which is a bit strange in debug output:

WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8
kde_len=46 keyidx=2 encr=1)

Use !!(...) to normalize it to 0 or 1.

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

12 years agohostapd: Add Key MIC in group EAPOL-Key frames corruption test option
Johannes Berg [Sat, 4 May 2013 08:45:03 +0000 (11:45 +0300)] 
hostapd: Add Key MIC in group EAPOL-Key frames corruption test option

For some testing it can be useful to force the Key MIC in group
EAPOL-Key frames to be corrupt. Add an option to allow setting a
probability for corrupting the Key MIC and use it in the WPA code,
increasing the first byte of the MIC by one to corrupt it if desired.

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

12 years agowlantest: Fix the injection of protected broadcast frames
Chaitanya T K [Sat, 4 May 2013 08:36:28 +0000 (11:36 +0300)] 
wlantest: Fix the injection of protected broadcast frames

Injecting protected broadcast frames fails because of the unnecessary
null check for sta. In case of broadcast frames sta can be null, so
remove the check.

Reported-by: Janardhan R <janardhanr@posedge.com>
Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com>

12 years agonl80211: Fix max_remain_on_chan capability reading
Ilan Peer [Sat, 4 May 2013 08:28:54 +0000 (11:28 +0300)] 
nl80211: Fix max_remain_on_chan capability reading

In case that NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP is supported,
wiphy_info_handler() is called several times, where
NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION is present only in one
of these calls. Thus capa->max_remain_on_chan is overridden in
all other calls.

Fix it so the default value is set only after all the wiphy info was
received.

Signed-hostap: Ilan Peer <ilan.peer@intel.com>

12 years agoP2P: Clone beacon_int when initializing new group interface
Ilan Peer [Sat, 4 May 2013 08:25:29 +0000 (11:25 +0300)] 
P2P: Clone beacon_int when initializing new group interface

Signed-hostap: Ilan Peer <ilan.peer@intel.com>

12 years agowpadebug: Add a Wi-Fi debugging app for Android
Jouni Malinen [Thu, 2 May 2013 21:52:32 +0000 (00:52 +0300)] 
wpadebug: Add a Wi-Fi debugging app for Android

This tool can be used to debug Wi-Fi functionality on Android both
through the Android framework and through direct access to
wpa_supplicant.

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

12 years agoWPS: Remove duplicate networks after WPS
Vinayak Kamath [Tue, 30 Apr 2013 10:35:50 +0000 (13:35 +0300)] 
WPS: Remove duplicate networks after WPS

Each attempt to connect to the same network using WPS would result
in the duplicate configuration getting added. Avoid such redundant
additions by comparing the network configuration with an already
existing one and remove the older network if the new credential
provisioned through WPS is identical.

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

12 years agowpa_supplicant: Default to nl80211 instead of wext
Jouni Malinen [Mon, 29 Apr 2013 13:55:44 +0000 (16:55 +0300)] 
wpa_supplicant: Default to nl80211 instead of wext

nl80211 has obsoleted WEXT as the preferred kernel interface for
controlling wireless drivers. Update wpa_supplicant driver interface
list order so that nl80211 gets used first if both nl80211 and wext
interfaces are included in the build. In addition, update README to
reflect the fact that WEXT is obsolete.

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

12 years agohostapd: Add more messages for error paths
Jouni Malinen [Mon, 29 Apr 2013 10:52:34 +0000 (13:52 +0300)] 
hostapd: Add more messages for error paths

Make hostapd more verbose if something goes wrong in interface
initialization.

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

12 years agohostapd: Reject configuration file without interface parameter
Jouni Malinen [Mon, 29 Apr 2013 10:50:02 +0000 (13:50 +0300)] 
hostapd: Reject configuration file without interface parameter

Previously, this was initialized partially, but the interface was
not really started. That could result in eloop_run() returning
immediately and hostapd process getting stopped without any clear
indication of a failure. [Bug 479]

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

12 years agoClear extra_blacklist_count on FLUSH command
Jouni Malinen [Sun, 28 Apr 2013 19:35:15 +0000 (22:35 +0300)] 
Clear extra_blacklist_count on FLUSH command

This is needed to avoid old blacklist failure counts from being valid
after state flush.

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

12 years agotests: Test WPS ER UPnP functionality to add Enrollees
Jouni Malinen [Sun, 28 Apr 2013 19:00:58 +0000 (22:00 +0300)] 
tests: Test WPS ER UPnP functionality to add Enrollees

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

12 years agoWPS ER: Allow UPnP interface to be forced
Jouni Malinen [Sun, 28 Apr 2013 18:56:24 +0000 (21:56 +0300)] 
WPS ER: Allow UPnP interface to be forced

"WPS_ER_START ifname=<interace>" can now be used to force a specific
interface to be used for UPnP operations. This is especially useful for
automated test cases where the lo interface can now be used easily to
perform ER operations.

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

12 years agoUse status code 17 (unable to handle new STA) on max-STA limitation
Ben Greear [Sun, 28 Apr 2013 13:45:55 +0000 (16:45 +0300)] 
Use status code 17 (unable to handle new STA) on max-STA limitation

This is more useful information than the previously used value 1
(unspecified failure).

Signed-hostap: Ben Greear <greearb@candelatech.com>

12 years agoAdd dup_binstr() to help common binary string tasks
Jouni Malinen [Sat, 27 Apr 2013 20:44:59 +0000 (23:44 +0300)] 
Add dup_binstr() to help common binary string tasks

There are quite a few places in the current implementation where a nul
terminated string is generated from binary data. Add a helper function
to simplify the code a bit.

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

12 years agoUse os_zalloc() instead of os_malloc() + os_memset()
Jouni Malinen [Sat, 27 Apr 2013 20:05:52 +0000 (23:05 +0300)] 
Use os_zalloc() instead of os_malloc() + os_memset()

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

12 years agoFT RRB: Validate os_malloc() return value before using it
Jouni Malinen [Sat, 27 Apr 2013 20:05:15 +0000 (23:05 +0300)] 
FT RRB: Validate os_malloc() return value before using it

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

12 years agoMake vlan_file optional if dynamic_vlan is used
Michael Braun [Sat, 27 Apr 2013 19:53:34 +0000 (22:53 +0300)] 
Make vlan_file optional if dynamic_vlan is used

My APs generate their configuration on their own using a different
number of (vlan-enabled) bss. Currently, all my vlan_file files consist
of a single line: the wildcard line. Configuration file generation would
be easier, if the hostapd configuration file would not depend on those
simple vlan_file files.

This patch removes the need for those one-line files by using the
<device>.<vlan> naming scheme if no vlan_file is given (or that file is
empty). This should not break any existing setup, as using dynamic_vlan
with no vlan configured does not make sense anyway.

Signed-hostap: Michael Braun <michael-dev@fami-braun.de>

12 years agoAdd bitfield routines
Jouni Malinen [Sat, 16 Mar 2013 16:12:39 +0000 (18:12 +0200)] 
Add bitfield routines

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

12 years agoNFC: Add no waiting and no multiple operations options for scripts
Jouni Malinen [Thu, 11 Apr 2013 15:18:39 +0000 (08:18 -0700)] 
NFC: Add no waiting and no multiple operations options for scripts

The nfcpy script used to be run in a way that left them running for
multiple operations. This is not desired for some use cases, so provide
options to request only a single operation to be performed.

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

12 years agotests: Add a test case for AP auto configuration on config token build
Jouni Malinen [Thu, 4 Apr 2013 14:50:25 +0000 (17:50 +0300)] 
tests: Add a test case for AP auto configuration on config token build

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

12 years agoWPS: Fix AP auto configuration on config token generation
Jouni Malinen [Thu, 4 Apr 2013 14:49:53 +0000 (17:49 +0300)] 
WPS: Fix AP auto configuration on config token generation

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

12 years agoNFC: Increase wpa_cli command buffer size
Jouni Malinen [Fri, 15 Feb 2013 15:07:28 +0000 (17:07 +0200)] 
NFC: Increase wpa_cli command buffer size

NFC connection handover messages may be longer than 100 octets, so
increase wpa_cli buffer size to allow longer messages to be reported.

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

12 years agoWPS NFC: Allow Device Password ID override for selected registrar
Jouni Malinen [Tue, 2 Apr 2013 15:27:36 +0000 (18:27 +0300)] 
WPS NFC: Allow Device Password ID override for selected registrar

When a specific out-of-band Device Password is enabled, it can be useful
to be able to advertise that in the selected registrar information.

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

12 years agoWPS: Use generic MAC Address attribute builder
Jouni Malinen [Sat, 27 Apr 2013 19:13:36 +0000 (22:13 +0300)] 
WPS: Use generic MAC Address attribute builder

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

12 years agotests: Use ignore_old_scan_res with some more WPS tests
Jouni Malinen [Tue, 2 Apr 2013 15:19:32 +0000 (18:19 +0300)] 
tests: Use ignore_old_scan_res with some more WPS tests

The scan results from old test cases showing different SSID on the AP
can result in false failures, so avoid those by ignoring old scan
results from cfg80211.

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

12 years agoP2P: Clean up channel--frequency conversion functions
Jouni Malinen [Sat, 27 Apr 2013 18:03:16 +0000 (21:03 +0300)] 
P2P: Clean up channel--frequency conversion functions

All P2P use cases are required to use the global operating table and
there is no need to need to try to maintain some backwards compatibility
with country code -specific values. Clean up the implementation by
removing the unnecessary country parameter.

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

12 years agoUse a common frequency to channel conversion function
Jouni Malinen [Sat, 27 Apr 2013 18:27:15 +0000 (21:27 +0300)] 
Use a common frequency to channel conversion function

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

12 years agoFT: Reset FT flag upon STA deauthentication
Deepthi Gowri [Fri, 26 Apr 2013 14:56:24 +0000 (17:56 +0300)] 
FT: Reset FT flag upon STA deauthentication

Reset ft_completed if STA receives deauthentication
between FT reassoc success and the subsequent initial
mobility authentication and association.

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

12 years agotests: Generate a tarball of test results if a test fails
Jouni Malinen [Fri, 26 Apr 2013 10:48:48 +0000 (13:48 +0300)] 
tests: Generate a tarball of test results if a test fails

This makes it easier to collect failure data from test servers for
further analysis.

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

12 years agoP2P: Set P2P_DEV_PEER_WAITING_RESPONSE from TX status callback
Jouni Malinen [Fri, 26 Apr 2013 09:54:27 +0000 (12:54 +0300)] 
P2P: Set P2P_DEV_PEER_WAITING_RESPONSE from TX status callback

Commit fb8984fd6f4b49d9178dd87a880dd7add514b7d1 added a mechanism to
skip the Listen state when the peer is expected to be waiting for us to
initiate a new GO Negotiation. However, this flag was set when building
the GO Negotiation Response frame with status 1 regardless of whether we
managed to send that frame or peer receive it. This could result in GO
Negotiation failures in cases where the peer did not receive the
response and Listen channels of the devices were different. Fix this by
setting the flag only after TX status indicating success has been
received.

This fixes frequent failures shown for the test_grpform_pbc hwsim test
case.

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

12 years agotests: Capture hwsim0 packet dump during test run
Jouni Malinen [Fri, 26 Apr 2013 09:36:56 +0000 (12:36 +0300)] 
tests: Capture hwsim0 packet dump during test run

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

12 years agoEAP peer: Add check before calling getSessionId method
Shijie Zhang [Fri, 26 Apr 2013 09:30:01 +0000 (12:30 +0300)] 
EAP peer: Add check before calling getSessionId method

We should not call getSessionID method if it's not provided. This fixes
a regression from commit 950c5630768285e460aa336c78a18162fb3e0434 where
EAP methods that did not implement getSessionId resulted in NULL pointer
dereference when deriving the key.

Signed-off-by: Shijie Zhang <shijiez@qca.qualcomm.com>
12 years agoDisable network temporarily on repeated connection failures
Jouni Malinen [Thu, 25 Apr 2013 14:28:50 +0000 (17:28 +0300)] 
Disable network temporarily on repeated connection failures

Previously, only explicit indications of authentication failures were
used to disable a network block temporarily. Extend this to use multiple
failed connection attempts as a sign of a possible authentication or
authorization failure to reduce the frequency of connection attempts
with a network that does not seem to allow connection.

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

12 years agonl80211: Drop frame events that are for foreign address
Jouni Malinen [Tue, 23 Apr 2013 22:02:01 +0000 (01:02 +0300)] 
nl80211: Drop frame events that are for foreign address

This avoids duplicate processing of events when multiple BSSes are
configured.

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

12 years agonl80211: Reduce debug on Probe Request frames
Jouni Malinen [Tue, 23 Apr 2013 22:01:21 +0000 (01:01 +0300)] 
nl80211: Reduce debug on Probe Request frames

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

12 years agoP2P: Fix after_scan_tx processing during ongoing operations
Jouni Malinen [Tue, 23 Apr 2013 18:12:04 +0000 (21:12 +0300)] 
P2P: Fix after_scan_tx processing during ongoing operations

When Action frame TX is postponed until a pending p2p_scan completes,
there may be additional operations that need to be continued after the
postponed Action frame TX operation completes. Fix this by starting
pending operation (if any) from TX status event for after_scan_tx
frames.

This fixes common errors seen with the test_discovery hwsim test case.

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

12 years agoRSN: Update preauth scan results only based on new scan results
Jouni Malinen [Tue, 23 Apr 2013 15:24:00 +0000 (18:24 +0300)] 
RSN: Update preauth scan results only based on new scan results

The fast-connect optimization to skip a new scan did not update how the
RSN preauthentication callback is used. There is no point in trying to
add preauthentication candidates from cases where scan was skipped, so
skip this call, too, in such cases.

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

12 years agoMove wpa_s freeing into wpa_supplicant_deinit_iface()
Jouni Malinen [Tue, 23 Apr 2013 15:07:41 +0000 (18:07 +0300)] 
Move wpa_s freeing into wpa_supplicant_deinit_iface()

All wpa_supplicant_deinit_iface() callers ended up freeing wpa_s
immediately after this call. Move os_free(wpa_s) into the deinit
function to share the same call and make the deinit sequence clearer.

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

12 years agodbus_new: Add EAP logon/logoff
Paul Stewart [Tue, 23 Apr 2013 14:57:55 +0000 (17:57 +0300)] 
dbus_new: Add EAP logon/logoff

Add "EAPLogoff" and "EAPLogon" interface DBus commands which
parallel the "logoff" and "logon" wpa_ctrl commands which terminate
and restart EAP authentication.  Slightly enhance the "logon" case
by expiring any running "startWhile" timer.

Signed-hostap: Paul Stewart <pstew@chromium.org>

12 years agohostapd: Add some testing options
Johannes Berg [Tue, 23 Apr 2013 14:51:28 +0000 (17:51 +0300)] 
hostapd: Add some testing options

In order to test clients in scenarios where APs may (randomly)
drop certain management frames, introduce some testing options
into the hostapd configuration that can make it ignore certain
frames. For now, these are probe requests, authentication and
(re)association frames.

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

12 years agowpa_supplicant: Add option -I for additional config file
Dmitry Shmidt [Tue, 23 Apr 2013 14:38:57 +0000 (17:38 +0300)] 
wpa_supplicant: Add option -I for additional config file

This option can be used only for global parameters that are not going
to be changed from settings.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
12 years agonl80211: Fix nla_nest_start conversion
Johannes Berg [Tue, 23 Apr 2013 14:19:20 +0000 (17:19 +0300)] 
nl80211: Fix nla_nest_start conversion

Dmitry reported that the kernel could no longer parse the
scheduled scan attributes correctly after my patch to use
nla_nest_start/nla_nest_end. The reason is that the wrong
attribute is closed I accidentally made it close the full
scan config instead of just the SSID match set.

Reported-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-hostap: Johannes Berg <johannes.berg@intel.com>

12 years agowpa_supplicant: Add get_capability freq
Bruno Randolf [Tue, 23 Apr 2013 13:55:54 +0000 (16:55 +0300)] 
wpa_supplicant: Add get_capability freq

Add "get_capability freq" command to print a more verbose list of
channels and frequencies in MHz. The tag "NO_IBSS" is added, if IBSS
mode is not allowed on a channel. This allows userspace programs to get
the frequencies and limitations associated with each channel.

This extends the information already provided in "get_capability
channels" but a new interface is chosen because of backwards
compatibility considerations.

Signed-hostap: Bruno Randolf <br1@einfach.org>

12 years agoProvide TLS alerts to CLI/UI over control interface
Chris Hessing [Tue, 23 Apr 2013 13:46:02 +0000 (16:46 +0300)] 
Provide TLS alerts to CLI/UI over control interface

Harmonize EAP status events over control interface to provide same
functionality as existing D-Bus callback.

Signed-hostap: Chris Hessing <chris.hessing@cloudpath.net>

12 years agoP2P: Increase GTK rekeying period to 24 hours
Jouni Malinen [Tue, 23 Apr 2013 11:11:10 +0000 (14:11 +0300)] 
P2P: Increase GTK rekeying period to 24 hours

Strong ciphers do not need frequent rekeying, so increase the default
GTK rekeying period to 24 hours.

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

12 years agowlantest: Fix CCMP-256 cipher
Jouni Malinen [Fri, 5 Apr 2013 19:18:25 +0000 (22:18 +0300)] 
wlantest: Fix CCMP-256 cipher

TK was incorrectly truncated in a way that resulted in CCMP (128-bit
key) encryption being used in practice.

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

12 years agoTDLS: Fix key configuration with current mac80211
Jouni Malinen [Wed, 3 Apr 2013 15:39:10 +0000 (18:39 +0300)] 
TDLS: Fix key configuration with current mac80211

A kernel commit ("mac80211: fix FT roaming") started validating that the
STA entry is marked associated when adding a key. While this is needed
to fix some FT use cases with hardware crypto, it has a side effect of
breaking TDLS key configuration. Work around this by trying to
re-configure the key for the direct link after the STA entry has been
set with all information. In addition, try to tear down the link if
anything goes wrong in key configuration (if both attempts fail) or
enabling the link in the driver.

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

12 years agoWPS NFC: Allow configuration token to be built from network block
Jouni Malinen [Mon, 1 Apr 2013 18:28:57 +0000 (21:28 +0300)] 
WPS NFC: Allow configuration token to be built from network block

"WPS_NFC_CONFIG_TOKEN <WPS/NDEF> <network id>" can now be used to build
an NFC configuration token from a locally configured network.

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

12 years agoWPS ER: Allow Enrollee to be specified with MAC address
Jouni Malinen [Mon, 1 Apr 2013 17:52:44 +0000 (20:52 +0300)] 
WPS ER: Allow Enrollee to be specified with MAC address

wps_er_pbc and wps_er_pin can now be used with both the UUID and MAC
Address of the Enrollee.

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

12 years agoWPS ER: Document additional NFC command for ER operations
Jouni Malinen [Mon, 1 Apr 2013 17:36:15 +0000 (20:36 +0300)] 
WPS ER: Document additional NFC command for ER operations

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

12 years agoWPS ER: Allow AP to be specified with BSSID
Jouni Malinen [Mon, 1 Apr 2013 17:32:09 +0000 (20:32 +0300)] 
WPS ER: Allow AP to be specified with BSSID

This extends the WPS ER commands that previously accepted only UUID as
an identifier for an AP to use either UUID or BSSID for this.

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

12 years agotests: Add test cases for NFC+WPS
Jouni Malinen [Mon, 1 Apr 2013 14:48:22 +0000 (17:48 +0300)] 
tests: Add test cases for NFC+WPS

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

12 years agoWPS: Fix use of pre-configured DH keys with multiple operations
Jouni Malinen [Mon, 1 Apr 2013 16:30:34 +0000 (19:30 +0300)] 
WPS: Fix use of pre-configured DH keys with multiple operations

wps_build_public_key() takes the dh_ctx into use and another attempt to
use the same DH keys fails with wps->dh_ctx being set to NULL. Avoid
this by using the DH parameters only if dh_ctx is valid. This fixes
cases where a use of local pre-configured DH keys followed by an
operating using peer DH keys would faild due to unexpected attempt to
use local keys again.

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

12 years agoWPS: Be more careful with pre-configured DH parameters
Jouni Malinen [Mon, 1 Apr 2013 16:27:32 +0000 (19:27 +0300)] 
WPS: Be more careful with pre-configured DH parameters

Make the implementation more robust against error cases with
pre-configured DH parameters.

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

12 years agohostapd: Show more helpful message for -g and -G errors
Jouni Malinen [Mon, 1 Apr 2013 15:17:24 +0000 (18:17 +0300)] 
hostapd: Show more helpful message for -g and -G errors

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

12 years agoInterworking: Try to use same BSS entry for storing GAS results
Jouni Malinen [Mon, 1 Apr 2013 08:44:04 +0000 (11:44 +0300)] 
Interworking: Try to use same BSS entry for storing GAS results

There may be cases where multiple BSS entries for a single BSSID are in
the table. This is mostly in automated test cases due to the AP
configuration changes, but something similar could potentially happen as
a corner case in more realistic networks, too, e.g., when an AP changes
its operating channel. Make network selection more robust by trying to
find the exact BSS entry instead of any BSS entry with a matching BSSID
when storing GAS/ANQP response.

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

12 years agotests: Use Wlantest class in test_autogo_tdls
Jouni Malinen [Mon, 1 Apr 2013 07:37:44 +0000 (10:37 +0300)] 
tests: Use Wlantest class in test_autogo_tdls

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

12 years agotests: Add a test case for Hotspot 2.0 network selection
Jouni Malinen [Sun, 31 Mar 2013 22:01:24 +0000 (01:01 +0300)] 
tests: Add a test case for Hotspot 2.0 network selection

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

12 years agotests: Stop wpa_supplicant before hostapd
Jouni Malinen [Sun, 31 Mar 2013 21:59:50 +0000 (00:59 +0300)] 
tests: Stop wpa_supplicant before hostapd

Stopping the AP first was not ideal for the test cases since it could
result in wpa_supplicant trying to connect back and start a scan at the
end of a test case and cause problems for the following test case that
tried to scan in the beginning while the previously started scan was
still in progress.

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

12 years agoOptimize Extended Capabilities element to be of minimal length
Jouni Malinen [Sun, 31 Mar 2013 18:58:17 +0000 (21:58 +0300)] 
Optimize Extended Capabilities element to be of minimal length

Leave out zero octets from the end of the element.

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

12 years agohostapd/wpa_s: Use driver's extended capabilities
Johannes Berg [Sun, 31 Mar 2013 18:51:44 +0000 (21:51 +0300)] 
hostapd/wpa_s: Use driver's extended capabilities

Some extended capabilities (I'm currently interested in "Operating Mode
Notification" for VHT) are implemented by the kernel driver and exported
in nl80211. Use these in hostapd/wpa_supplicant.

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

12 years agotests: Use FLUSH command to clear wpa_supplicant state
Jouni Malinen [Sun, 31 Mar 2013 17:32:33 +0000 (20:32 +0300)] 
tests: Use FLUSH command to clear wpa_supplicant state

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

12 years agoAdd ctrl_iface command FLUSH for clearing wpa_supplicant state
Jouni Malinen [Sun, 31 Mar 2013 17:31:07 +0000 (20:31 +0300)] 
Add ctrl_iface command FLUSH for clearing wpa_supplicant state

This is mainly for testing purposes where it is convenient to have an
easy way of getting wpa_supplicant state cleared between test cases.

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

12 years agoWPS: Skip rescanning after provisioning if AP was configured
Masashi Honma [Sun, 31 Mar 2013 17:06:42 +0000 (20:06 +0300)] 
WPS: Skip rescanning after provisioning if AP was configured

If WPS provisioning step is completed with an AP that is in WPS
configured state, we can skip a second scan after the provisioning step
since the AP is unlikely to change its configuration in such a case.
This can speed up WPS connection a bit by removing an unneeded scan.

Signed-hostap: Masashi Honma <masashi.honma@gmail.com>

12 years agotests: Ignore old scan results in couple more WPS test cases
Jouni Malinen [Sun, 31 Mar 2013 17:01:57 +0000 (20:01 +0300)] 
tests: Ignore old scan results in couple more WPS test cases

These have shown failures due to obsolete scan results from previous
test cases being present.

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

12 years agotests: Use a more compact summary of test results
Jouni Malinen [Sun, 31 Mar 2013 15:10:17 +0000 (18:10 +0300)] 
tests: Use a more compact summary of test results

Do not print the potentially long list of passed test cases. In case of
failure(s), make sure the failed test list is the last item in the
report.

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

12 years agotests: Fix BSS table flushing and old result ignoring for WPS tests
Jouni Malinen [Sun, 31 Mar 2013 14:55:16 +0000 (17:55 +0300)] 
tests: Fix BSS table flushing and old result ignoring for WPS tests

The WPS tests are more prone to fail if scan results from the previous
test cases are allowed to remain in the wpa_supplicant BSS table during
the consecutive test since the test setup uses the same BSSID for the
test APs that change their configuration. Avoid these mostly bogus
issues by enforcing wpa_supplicant to drop and ignore old scan results
during the WPS test cases.

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

12 years agoAdd ignore_old_scan_res configuration parameter
Jouni Malinen [Sun, 31 Mar 2013 14:52:23 +0000 (17:52 +0300)] 
Add ignore_old_scan_res configuration parameter

This can be used to configure wpa_supplicant to ignore old scan results
from the driver cache in cases where such results were not updated after
the scan trigger from wpa_supplicant. This can be useful in some cases
where the driver may cache information for a significant time and the AP
configuration is changing. Many such cases are for testing scripts, but
this could potentially be useful for some WPS use cases, too.

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

12 years agoWPS: Clear after_wps on new WPS connection
Jouni Malinen [Sun, 31 Mar 2013 14:17:08 +0000 (17:17 +0300)] 
WPS: Clear after_wps on new WPS connection

The after_wps counter could have potentially be left in its old non-zero
value in some WPS sequences which could result in a single-channel scan
being used based on obsolete information. Clear after_wps in
wpas_wps_reassoc() to make sure this does not happen.

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

12 years agoWPS: Use latest updated BSS entry if multiple BSSID matches found
Jouni Malinen [Sun, 31 Mar 2013 14:15:39 +0000 (17:15 +0300)] 
WPS: Use latest updated BSS entry if multiple BSSID matches found

If the AP (P2P GO) has changes its channel of SSID recently, the BSS
table may have multiple entries for a BSSID. Select the one which was
most recently updated for WPS/P2P operations in such case to increase
the likelihood of using current information.

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

12 years agotests: Remove obsolete test script
Jouni Malinen [Sun, 31 Mar 2013 13:30:51 +0000 (16:30 +0300)] 
tests: Remove obsolete test script

The generic test cases and run-tests.py have removed need of this
separate test script.

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

12 years agotests: Add command line argument -f for specifying a test file
Jouni Malinen [Sun, 31 Mar 2013 13:29:16 +0000 (16:29 +0300)] 
tests: Add command line argument -f for specifying a test file

This can be used to run all test cases from a single test file.

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

12 years agotests: Use a single set of scripts for running both P2P and AP tests
Jouni Malinen [Sun, 31 Mar 2013 13:22:28 +0000 (16:22 +0300)] 
tests: Use a single set of scripts for running both P2P and AP tests

This removes the unnecessary separation of P2P (no hostapd) and AP
tests. The same scripts can be used to prepare for these tests and to
execute the tests.

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

12 years agotests: Make hostapd test setup more similar to the P2P tests
Jouni Malinen [Sun, 31 Mar 2013 13:19:12 +0000 (16:19 +0300)] 
tests: Make hostapd test setup more similar to the P2P tests

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

12 years agotests: Pass AP devices to test cases
Jouni Malinen [Sun, 31 Mar 2013 13:16:37 +0000 (16:16 +0300)] 
tests: Pass AP devices to test cases

This removes hardcoded assumptions about AP interfaces from test_*.py.

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

12 years agotests: Add test cases for WPS operations
Jouni Malinen [Sun, 31 Mar 2013 09:33:49 +0000 (12:33 +0300)] 
tests: Add test cases for WPS operations

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

12 years agoWPS: Add more helpful debug for invalid WPS_REG command parsing
Jouni Malinen [Sun, 31 Mar 2013 09:20:35 +0000 (12:20 +0300)] 
WPS: Add more helpful debug for invalid WPS_REG command parsing

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

12 years agoWPS: Allow hostapd process to control independent WPS interfaces
Jouni Malinen [Sun, 31 Mar 2013 08:48:52 +0000 (11:48 +0300)] 
WPS: Allow hostapd process to control independent WPS interfaces

The new wps_independent=1 configuration parameter can be used to remove
interfaces from the shared hostapd process WPS control (i.e., to apply
WPS operations only to a subset of interfaces instead of all).

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