]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
11 years agoAdd initial parts for SAE
Jouni Malinen [Sun, 30 Sep 2012 16:51:07 +0000 (19:51 +0300)] 
Add initial parts for SAE

This introduces new AKM for SAE and FT-SAE and adds the initial parts
for going through the SAE Authentication frame exchange. The actual SAE
algorithm and new fields in Authentication frames are not yet included
in this commit and will be added separately. This version is able to
complete a dummy authentication with the correct authentication
algorithm and transaction values to allow cfg80211/mac80211 drivers to
be tested (all the missing parts can be handled with
hostapd/wpa_supplicant changes).

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

11 years agoSync with linux/nl80211.h in wireless-testing.git
Jouni Malinen [Sun, 30 Sep 2012 07:49:46 +0000 (10:49 +0300)] 
Sync with linux/nl80211.h in wireless-testing.git

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

11 years agodbus: Add global capabilities property
Dan Williams [Sat, 29 Sep 2012 16:06:30 +0000 (19:06 +0300)] 
dbus: Add global capabilities property

Otherwise it's difficult to determine if the supplicant was built with
CONFIG_AP, CONFIG_IBSS_RSN, CONFIG_P2P, etc. CONFIG_AP and CONFIG_P2P
can be inferred from the introspection data of the Interface object,
but CONFIG_IBSS_RSN does not change the introspection data at all and
thus it's impossible to determine whether the supplicant supports it
without knowing its compile-time options.

Signed-hostap: Dan Williams <dcbw@redhat.com>
intended-for: hostap-1

11 years agonl80211: Don't send BSSID with disconnect command
Mykyta Iziumtsev [Sat, 29 Sep 2012 16:01:50 +0000 (19:01 +0300)] 
nl80211: Don't send BSSID with disconnect command

NL80211_CMD_DISCONNECT doesn't need BSSID, because cfg80211
uses locally saved value.

Signed-hostap: Mykyta Iziumtsev <mykyta.iziumtsev@gmail.com>

11 years agoP2P: Fix p2p_cancel processing during group formation
Jouni Malinen [Fri, 28 Sep 2012 19:01:48 +0000 (22:01 +0300)] 
P2P: Fix p2p_cancel processing during group formation

The wpa_s->p2p_in_provisioning flag did not get cleared in some cases
where p2p_cancel command is used to stop group formation. This can result
in some operations (like p2p_find) failing afterwards. Fix this by using
wpas_group_formation_completed() when processing p2p_cancel for a group
that has not yet completed group formation.

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

11 years agoInterworking: Support Android JB keystore with EAP-TLS
Jouni Malinen [Fri, 28 Sep 2012 14:12:27 +0000 (17:12 +0300)] 
Interworking: Support Android JB keystore with EAP-TLS

If the keystore:// prefix is used in the private_key entry, convert that
to the OpenSSL engine style configuration used for Android JB keystore.

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

11 years agoInterworking: Fix failed GAS query processing
Jouni Malinen [Fri, 28 Sep 2012 14:09:15 +0000 (17:09 +0300)] 
Interworking: Fix failed GAS query processing

The pending GAS entry must be removed from the list when it is removed.
This fixes an issue with potential segfault due to freed memory being
accessed if the driver fails to accept a GAS query.

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

11 years agoAdd disallow_aps parameter to disallow BSSIDs/SSIDs
Jouni Malinen [Thu, 27 Sep 2012 14:36:59 +0000 (17:36 +0300)] 
Add disallow_aps parameter to disallow BSSIDs/SSIDs

External programs can use this new parameter to prevent wpa_supplicant
from connecting to a list of BSSIDs and/or SSIDs. The disallowed BSSes
will still be visible in scan results and it is possible to run ANQP
operations with them, but BSS selection for connection will skip any
BSS that matches an entry in the disallowed list.

The new parameter can be set with the control interface SET command
using following syntax:

SET disallow_aps <disallow_list>
disallow_list ::= <ssid_spec> | <bssid_spec> | <disallow_list> | “”
SSID_SPEC ::= ssid <SSID_HEX>
BSSID_SPEC ::= bssid <BSSID_HEX>

For example:
wpa_cli set disallow_list "ssid 74657374 bssid 001122334455 ssid 68656c6c6f"
wpa_cli set disallow_list
(the empty value removes all entries)

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

11 years agoInclude connected time in AP mode STA-* commands
Raja Mani [Wed, 26 Sep 2012 10:52:19 +0000 (13:52 +0300)] 
Include connected time in AP mode STA-* commands

This allows hostapd_cli and wpa_cli all_sta command to be used to
display connected time (in seconds) of each station in AP mode.

Signed-hostap: Raja Mani <rmani@qca.qualcomm.com>

11 years agoP2P: Fix ignoring of PD Response due to dialog token mismatch
Jouni Malinen [Tue, 25 Sep 2012 18:41:52 +0000 (21:41 +0300)] 
P2P: Fix ignoring of PD Response due to dialog token mismatch

Commit 6b56cc2d97fe9efd1feea8d418714b4658b056f1 added clearing of the
p2p->pending_action_state too early in this function. This should not
be done if we are going to silently ignore the frame due to dialog
token mismatch. Fix this by moving the code around to check the dialog
token first.

This issue resulted in PD Request retries getting stopped too early if
the peer is sending out an unexpected PD Response (e.g., because of it
being excessively slow with the response so that the response is
received only after the next TX attempt with a new dialog token).

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

11 years agoP2P: Clear sta_scan_pending on group removal
Jouni Malinen [Mon, 24 Sep 2012 23:55:20 +0000 (02:55 +0300)] 
P2P: Clear sta_scan_pending on group removal

It is possible for the P2P client group to be removed while waiting for
a pending scan operation (e.g., when p2p_group_idle timeout hits after
getting disconnected from the GO with something else than
Deauthentication with reason code 3). If this happens with a P2P
interface that is used both for P2P Device and group roles, scan state
could get stuck while waiting for the next scan to complete since no
more station (P2P client) mode scans are scheduled. Fix this by clearing
sta_scan_pending when removing the temporary group network block.

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

11 years agoP2P: Allow peer to propose channel in invitation process
Jouni Malinen [Mon, 24 Sep 2012 19:15:58 +0000 (22:15 +0300)] 
P2P: Allow peer to propose channel in invitation process

Make Invitation process for re-invoking a persistent group behave
similarly to GO Negotiation as far as channel negotiation is concerned.
The Operating Channel value (if present) is used as a starting point if
the local device does not have a forced operating channel (e.g., due to
concurrent use). Channel lists from devices are then compared to check
that the selected channel is in the intersection. If not, channel is
selected based on GO Negotiation channel rules (best channel preferences
etc.). Invitation Request is rejected if no common channel can be
selected.

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

11 years agoP2P: Show own channel list in debug log
Jouni Malinen [Mon, 24 Sep 2012 19:14:50 +0000 (22:14 +0300)] 
P2P: Show own channel list in debug log

This makes it easier to debug channel negotiation mechanisms.

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

11 years agoP2P: Fix pending-sta-scan processing for concurrent operation cases
Jouni Malinen [Mon, 24 Sep 2012 10:46:27 +0000 (13:46 +0300)] 
P2P: Fix pending-sta-scan processing for concurrent operation cases

If two P2P_FIND commands and a station mode SCAN command are issued in a
sequence with the second P2P_FIND and SCAN commands started before the
initial scan from the first P2P_FIND command has completed,
sta_scan_pending may be left set without an automatic way of getting it
cleared. This can get P2P search stuck if no further station mode scan
operations are run.

Fix this by clearing the sta_scan_pending flag whenever station mode scans
are stopped due to no enabled networks resulting in INACTIVE mode getting
entered. In addition, avoid setting sta_scan_pending flag when a special
scan_res_handler is set so that this does not get enabled on the P2P
Device interface during a P2P search operation.

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

11 years agoP2P: Add more debug prints for GO start routines
Jouni Malinen [Sun, 23 Sep 2012 22:05:51 +0000 (01:05 +0300)] 
P2P: Add more debug prints for GO start routines

This makes it easier to debug issues in starting GO mode.

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

11 years agoAdd debug print for no-enabled-networks case
Jouni Malinen [Sun, 23 Sep 2012 22:04:00 +0000 (01:04 +0300)] 
Add debug print for no-enabled-networks case

If there are any disabled networks, show a debug print with the count
of those networks when no enabled networks are found. This can be
helpful in trying to figure out why scans are being skipped.

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

11 years agoPrint control interface commands in easier format
Jouni Malinen [Sun, 23 Sep 2012 22:01:26 +0000 (01:01 +0300)] 
Print control interface commands in easier format

The ASCII hexdump is somewhat difficult to search for (especially on
Android builds), so make the debug log easier to parse by printing the
full control interface command as a text string. In addition, use
wpa_dbg() to get the interface name printed so that multi-interface
cases can be debugged.

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

11 years agoP2P: Fix PSK configuration for GO network
Jouni Malinen [Sun, 23 Sep 2012 21:56:57 +0000 (00:56 +0300)] 
P2P: Fix PSK configuration for GO network

Setting just ssid->passphrase is not enough to complete the network
block for the GO entry. Also the PSK needs to be derived so that the
network is considered enabled by wpas_network_disabled(). The previous
version worked as long as something else allowed the scan request to be
performed (this is needed even though the actual scan is skipped when
starting GO).

The first GO start was allowed because wpa_s->scan_req is initialized to
1 in wpa_supplicant_alloc(). However, other attempts may fail if
wpa_s->scan_req is cleared. This failure shows up as "No enabled
networkas - do not scan" in debug log followed by state change to
INACTIVE when trying to start GO.

Fix this by deriving PSK from the passphrase for GO mode.

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

11 years agoP2P: Fix p2p_group_idle in no-group-interface P2P client case
Jouni Malinen [Sun, 23 Sep 2012 17:28:03 +0000 (20:28 +0300)] 
P2P: Fix p2p_group_idle in no-group-interface P2P client case

Commit 30ee769235f3170d9bf6b62c11c6e018e97deb84 started skipping P2P
group removal if wpa_s->current_ssid is not set and commit
0d30cc240fa36905b034dc9676f9d8da0ac18e56 started clearing
wpa_s->current_ssid on disconnection. This combination broke
p2p_group_idle timeout on P2P client interface in a case where no
separate P2P group interface is used and when the disconnection is
triggered by something else than an explicit indication of GO
terminating the group.

Fix this by relaxing network block matching rules when figuring out
whether any of the configured network blocks could be in P2P use. The
p2p_group flag alone should be enough for this since temporary P2P group
network blocks are removed once the P2P group is terminated.

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

11 years agowpa_supplicant: Set state to DISCONNECTED on AP creation errors
Dan Williams [Sun, 23 Sep 2012 10:55:58 +0000 (13:55 +0300)] 
wpa_supplicant: Set state to DISCONNECTED on AP creation errors

If the AP creation failed (missing freq= or driver error) the supplicant
would previously stay in SCANNING state forever. Instead, it should
handle the error a bit better and drop back to DISCONNECTED so clients
know something went wrong.

Signed-hostap: Dan Williams <dcbw@redhat.com>
intended-for: hostap-1

11 years agonl80211: Use the monitor interface if socket tx status is not supported
Felix Fietkau [Sun, 23 Sep 2012 10:28:31 +0000 (13:28 +0300)] 
nl80211: Use the monitor interface if socket tx status is not supported

Fixes hostapd on recent compat-wireless builds with older kernels.

Signed-hostap: Felix Fietkau <nbd@openwrt.org>

11 years agohostapd: Add check for the wds sta flag before creating 4addr VLANs
Felix Fietkau [Sun, 23 Sep 2012 10:25:49 +0000 (13:25 +0300)] 
hostapd: Add check for the wds sta flag before creating 4addr VLANs

Signed-hostap: Felix Fietkau <nbd@openwrt.org>

11 years agohostapd: Clear WLAN_STA_ASSOC_REQ_OK if sending the assoc response failed
Felix Fietkau [Sun, 23 Sep 2012 10:23:16 +0000 (13:23 +0300)] 
hostapd: Clear WLAN_STA_ASSOC_REQ_OK if sending the assoc response failed

As long as WLAN_STA_ASSOC_REQ_OK is set in sta->flags, Class 3 frames do
not trigger a disassoc/deauth. If it is still set even after the assoc
response tx has already failed, it may take somewhat longer for clients
to realize that the connection wasn't fully established.

Signed-hostap: Felix Fietkau <nbd@openwrt.org>

11 years agoP2P: Remove channel 14 from supported P2P channels
Mykyta Iziumtsev [Sun, 23 Sep 2012 09:49:52 +0000 (12:49 +0300)] 
P2P: Remove channel 14 from supported P2P channels

Channel 14 is available only in Japan and is DSSS-only according to
IEEE 802.11-2012 19.4.3 and MIC Equipment Ordinance (EO)
for Regulating Radio Equipment article 49.20.

At the same time, P2P should avoid using DSSS modulation in normal
operation according to P2P specification v1.2 2.4.1.

Signed-hostap: Mykyta Iziumtsev <mykyta.iziumtsev@gmail.com>
intended-for: hostap-1

11 years agohostapd: Send EAPOL frames from the VO queue if WMM is active
Felix Fietkau [Sun, 16 Sep 2012 05:40:00 +0000 (22:40 -0700)] 
hostapd: Send EAPOL frames from the VO queue if WMM is active

This avoids extra latency caused by establishing an aggregation session
and makes the initial connection attempt more reliable

Signed-hostap: Felix Fietkau <nbd@openwrt.org>

11 years agohostapd: Fix WDS VLAN bridge handling
Felix Fietkau [Sun, 16 Sep 2012 05:38:14 +0000 (22:38 -0700)] 
hostapd: Fix WDS VLAN bridge handling

This patch fixes an issue where removing a WDS VLAN interface also
removed the main AP interface from the same bridge.

Signed-hostap: Felix Fietkau <nbd@openwrt.org>

11 years agohostapd: Fix CONFIG_INTERWORKING=y build without CONFIG_HS20=y
Jouni Malinen [Sun, 16 Sep 2012 05:37:27 +0000 (22:37 -0700)] 
hostapd: Fix CONFIG_INTERWORKING=y build without CONFIG_HS20=y

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

11 years agoP2P: Fix p2p_ctrl_invite_persistent() to parse peer parameter
Jouni Malinen [Sun, 16 Sep 2012 05:21:46 +0000 (22:21 -0700)] 
P2P: Fix p2p_ctrl_invite_persistent() to parse peer parameter

Commit 4d32c0c44db43d496f45c5094a9b6ae60c35115e added another use for the
local pos variable and that broke the mechanism used to determine wheter
the peer address was provided. Fix this by using a separate pointer to the
peer address.

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

11 years agoRemove unused function warning in WPS NFC case
Masashi Honma [Sun, 16 Sep 2012 05:02:09 +0000 (22:02 -0700)] 
Remove unused function warning in WPS NFC case

When I use CONFIG_WPS_NFC=y a warning appears.

wps_supplicant.c:1872:12: warning: 'wpas_wps_add_nfc_password_token'
defined but not used [-Wunused-function]

This patch removes this warning.

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

11 years agoDo not inform other virtual interfaces of scan results in all cases
Jouni Malinen [Fri, 14 Sep 2012 01:07:02 +0000 (18:07 -0700)] 
Do not inform other virtual interfaces of scan results in all cases

If a connection operation is started on an interface based on scan
results, other virtual interfaces should not be information about the
results to avoid potential concurrent operations during the association
steps. Since the sibling notification of scan results received was added
as an optimization, skipping it for this type of cases is the simplest
way of avoiding unnecessary concurrent operations.

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

11 years agoP2P: Schedule new scan if P2P operation delays scan
Jouni Malinen [Fri, 14 Sep 2012 01:05:55 +0000 (18:05 -0700)] 
P2P: Schedule new scan if P2P operation delays scan

This makes sure that the interrupted station mode scan can be completed
after the P2P operations have had their chance of using the radio.

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

11 years agoP2P: Check all interfaces for pending scan for p2p_scan failures
Jouni Malinen [Fri, 14 Sep 2012 01:03:14 +0000 (18:03 -0700)] 
P2P: Check all interfaces for pending scan for p2p_scan failures

Driver could reject the new scan based on any virtual interface
running a concurrent scan. As such, mark the pending scan callback
for P2P based on any interfaces instead of just the one used for
the p2p_scan operation.

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

11 years agoP2P: Move p2p_cb_on_scan_complete to global context
Jouni Malinen [Fri, 14 Sep 2012 00:58:22 +0000 (17:58 -0700)] 
P2P: Move p2p_cb_on_scan_complete to global context

Since we have a global P2P module, the flag to trigger scan completion
events to it needs to be in similar context. The previous design
maintained this separately for each virtual interface and if P2P module
did not run its scan operation on the virtual interface that completed
the scan, P2P module would not be allowed to restart operations
properly.

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

11 years agoFix last_scan_res update existing BSS entry is update
Jouni Malinen [Mon, 10 Sep 2012 10:33:29 +0000 (12:33 +0200)] 
Fix last_scan_res update existing BSS entry is update

The BSS pointer may change if the entry needs to be reallocated
and the new pointer has to be added to the last_scan_res array
to avoid using pointers to freed memory.

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

11 years agowlantest: Add BIP-GMAC-128/256 test vectors
Jouni Malinen [Sun, 9 Sep 2012 16:04:53 +0000 (19:04 +0300)] 
wlantest: Add BIP-GMAC-128/256 test vectors

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

11 years agowlantest: Add CCMP-256 test vector
Jouni Malinen [Sun, 9 Sep 2012 15:38:18 +0000 (18:38 +0300)] 
wlantest: Add CCMP-256 test vector

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

11 years agoMove AES-CCM implementation into src/crypto
Jouni Malinen [Sun, 9 Sep 2012 15:07:19 +0000 (18:07 +0300)] 
Move AES-CCM implementation into src/crypto

This is a generic AES CCM implementation that can be used for other
purposes than just implementing CCMP, so it fits better in a separate
file in src/crypto.

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

11 years agowlantest: Move generic AES-CCM into separate functions
Jouni Malinen [Sun, 9 Sep 2012 15:00:14 +0000 (18:00 +0300)] 
wlantest: Move generic AES-CCM into separate functions

This part of the implementation is not specific to CCMP and could be
used for other purposes, too.

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

11 years agoEnable 256-bit key AES in internal TLS implementation
Jouni Malinen [Sun, 9 Sep 2012 11:16:05 +0000 (14:16 +0300)] 
Enable 256-bit key AES in internal TLS implementation

Now that the internal AES implementation supports 256-bit keys, enable
use of the TLS cipher suites that use AES-256 regardless of which crypto
implementation is used.

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

11 years agoFix AES block size handling for internal cipher
Jouni Malinen [Sun, 9 Sep 2012 11:12:59 +0000 (14:12 +0300)] 
Fix AES block size handling for internal cipher

AES uses the same 128-bit block size with 128, 192, 256 bit keys, so use
the fixed block size definition instead of trying to dynamically set the
block size based on key length. This fixes use of 192-bit and 256-bit
AES keys with crypto_cipher_*() API when using the internal AES
implementation.

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

11 years agowlantest: Add GCMP-256 test vector
Jouni Malinen [Sun, 9 Sep 2012 11:01:03 +0000 (14:01 +0300)] 
wlantest: Add GCMP-256 test vector

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

11 years agoShare common GCM-AE and GCM-AD functionality
Jouni Malinen [Sun, 9 Sep 2012 10:54:33 +0000 (13:54 +0300)] 
Share common GCM-AE and GCM-AD functionality

These operations are almost identical, so use common functions to
share the same implementation.

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

11 years agoAdd aes_gmac() as a wrapper for AES GMAC operations using GCM
Jouni Malinen [Sun, 9 Sep 2012 10:37:50 +0000 (13:37 +0300)] 
Add aes_gmac() as a wrapper for AES GMAC operations using GCM

This is otherwise identical to aes_gcm_ae() but does not use the
plain/crypt pointers since no data is encrypted.

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

11 years agoAdd support for using 192-bit and 256-bit keys with AES-GCM
Jouni Malinen [Sun, 9 Sep 2012 09:26:22 +0000 (12:26 +0300)] 
Add support for using 192-bit and 256-bit keys with AES-GCM

This adds 192-bit and 256-bit key support to the internal AES
implementation and extends the AES-GCM functions to accept key length to
enable longer AES key use.

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

11 years agoSupport arbitrary IV length with AES-GCM
Jouni Malinen [Sat, 8 Sep 2012 21:49:54 +0000 (00:49 +0300)] 
Support arbitrary IV length with AES-GCM

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

11 years agoAdd AES-GCM test vectors from gcm-spec.pdf
Jouni Malinen [Sat, 8 Sep 2012 21:25:54 +0000 (00:25 +0300)] 
Add AES-GCM test vectors from gcm-spec.pdf

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

11 years agoMove AES-GCM implementation into src/crypto
Jouni Malinen [Sat, 8 Sep 2012 20:48:08 +0000 (23:48 +0300)] 
Move AES-GCM implementation into src/crypto

This is a generic AES GCM and GMAC implementation that can be used for
other purposes than just implementing GCMP, so it fits better in a
separate file in src/crypto.

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

11 years agowlantest: Allow GHASH update calls to avoid extra allocation
Jouni Malinen [Sat, 8 Sep 2012 20:40:06 +0000 (23:40 +0300)] 
wlantest: Allow GHASH update calls to avoid extra allocation

There is no need to allocate a temporary buffer and build GHASH input
data into it. Instead, ghash() is trivial to split into update part that
can be called separately for each segment.

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

11 years agowlantest: Remove CCMP specific AAD handling from GCMP
Jouni Malinen [Sat, 8 Sep 2012 19:10:05 +0000 (22:10 +0300)] 
wlantest: Remove CCMP specific AAD handling from GCMP

GCMP encodes length of AAD differently, so remove the unnecessary
code that got copied from the CCMP implementation.

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

11 years agowlantest: Move GCM-AE and GCM-AD into separate functions
Jouni Malinen [Sat, 8 Sep 2012 19:08:00 +0000 (22:08 +0300)] 
wlantest: Move GCM-AE and GCM-AD into separate functions

This splits the more generic GCM operations from GCMP specific
implementation.

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

11 years agowlantest: Add GCMP implementation and test vectors from P802.11ad/D9.0
Jouni Malinen [Sat, 8 Sep 2012 17:00:54 +0000 (20:00 +0300)] 
wlantest: Add GCMP implementation and test vectors from P802.11ad/D9.0

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

11 years agowlantest: Check TKIP/CCMP decryption routines for test vectors
Jouni Malinen [Sat, 8 Sep 2012 13:53:45 +0000 (16:53 +0300)] 
wlantest: Check TKIP/CCMP decryption routines for test vectors

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

11 years agowlantest: Add IEEE Std 802.11-2012, M.9.1 BIP test vector
Jouni Malinen [Sat, 8 Sep 2012 13:43:11 +0000 (16:43 +0300)] 
wlantest: Add IEEE Std 802.11-2012, M.9.1 BIP test vector

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

11 years agowlantest: Move BIP function into a separate function and file
Jouni Malinen [Sat, 8 Sep 2012 13:32:35 +0000 (16:32 +0300)] 
wlantest: Move BIP function into a separate function and file

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

11 years agowlantest: Add IEEE Std 802.11-2012, M.9.2 CCMP (mgmt) test vector
Jouni Malinen [Sat, 8 Sep 2012 13:21:57 +0000 (16:21 +0300)] 
wlantest: Add IEEE Std 802.11-2012, M.9.2 CCMP (mgmt) test vector

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

11 years agowlantest: Add program for generating IEEE 802.11 test vectors
Jouni Malinen [Sat, 8 Sep 2012 11:03:43 +0000 (14:03 +0300)] 
wlantest: Add program for generating IEEE 802.11 test vectors

This version can generate CCMP and TKIP test vectors that match with
the IEEE Std 802.11-2012, Annex M.6.3 and M.6.4.

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

11 years agowlantest: Implement tkip_encrypt()
Jouni Malinen [Sat, 8 Sep 2012 11:03:10 +0000 (14:03 +0300)] 
wlantest: Implement tkip_encrypt()

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

11 years agoAP: Configure basic rates from iface and not conf
Arik Nemtsov [Thu, 6 Sep 2012 21:22:40 +0000 (00:22 +0300)] 
AP: Configure basic rates from iface and not conf

The conf doesn't contain any basic rates in some cases. Most notably,
when starting a P2P GO in 5 GHz. Use the iface rates which are
initialized in hostapd_prepare_rates() to the conf rates or set to
default values if no conf values exist. This fixes a bug introduced in
commit e5693c4775bae65faa960f80889f98b0a6cb2e1c.

Signed-hostap: Arik Nemtsov <arik@wizery.com>

11 years agoMake copies basic_rates list more useful
Jouni Malinen [Thu, 6 Sep 2012 21:15:53 +0000 (00:15 +0300)] 
Make copies basic_rates list more useful

Commit e5693c4775bae65faa960f80889f98b0a6cb2e1c added a copy of the
determined basic rate set into struct hostapd_iface, but did not
actually copy the terminating -1 value. This could be problematic if
something were to actually try to use this list since would be no way to
know what is the last entry in the list. Fix this by copying the
terminating value.

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

11 years agoatheros: Fix RSN capabilities debug print
Baruch Siach [Wed, 5 Sep 2012 16:01:11 +0000 (19:01 +0300)] 
atheros: Fix RSN capabilities debug print

Signed-hostap: Baruch Siach <baruch@tkos.co.il>

11 years agonl80211: Register read_sta_data() handler for station only builds
Jouni Malinen [Wed, 5 Sep 2012 14:07:03 +0000 (17:07 +0300)] 
nl80211: Register read_sta_data() handler for station only builds

This driver_op can now be used in station mode, too, to fetch
information about the connection with the AP, so allow this to be used
even if wpa_supplicant is built without AP mode support.

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

11 years agowpa_supplicant: Add PKTCNT_POLL command to get TX/RX packet counters
Yuhao Zheng [Wed, 5 Sep 2012 14:02:02 +0000 (17:02 +0300)] 
wpa_supplicant: Add PKTCNT_POLL command to get TX/RX packet counters

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoWFD: Properly match group for WFD element in Invitation Response
Jouni Malinen [Wed, 5 Sep 2012 13:39:19 +0000 (16:39 +0300)] 
WFD: Properly match group for WFD element in Invitation Response

The group matching should be done by comparing the P2P Interface Address
(which the group_bssid here is) to the group's BSSID and not the group
ID (which uses P2P Device Address and would have also needed the SSID).
Though, it should be noted that this case cannot really happen since a
GO in an active group would never be invited to join another group in
its GO role (i.e., if it receives an Invitation Request, it will reply
in P2P Device role). As such, this fix does not really change any
observable behavior, but anyway, it is good to keep the implementation
here consistent with the Invitation Request case.

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

11 years agoWFD: Properly match group for WFD element in Invitation Request
Jouni Malinen [Wed, 5 Sep 2012 13:27:07 +0000 (16:27 +0300)] 
WFD: Properly match group for WFD element in Invitation Request

When building the Invitation Request for WFD use cases, match the BSSID,
i.e., P2P Interface Address, of the group on the GO to avoid using
information from another group should the device be operating multiple
concurrent groups as GO.

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

11 years agoInterworking: Share ANQP data within homogenous ESS
Jouni Malinen [Tue, 4 Sep 2012 14:22:42 +0000 (17:22 +0300)] 
Interworking: Share ANQP data within homogenous ESS

If two BSS entries have the same HESSID and SSID, share the fetched ANQP
information between these BSS entries to save memory and GAS/ANQP
operations.

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

11 years agoInterworking: Store HESSID in BSS entry
Jouni Malinen [Tue, 4 Sep 2012 14:08:58 +0000 (17:08 +0300)] 
Interworking: Store HESSID in BSS entry

This makes it more convenient to match BSS entries that belong to the
same homogenous ESS.

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

11 years agoInterworking: Allow EAP-SIM/AKA/AKA' override in cred block
Jouni Malinen [Tue, 4 Sep 2012 13:50:52 +0000 (16:50 +0300)] 
Interworking: Allow EAP-SIM/AKA/AKA' override in cred block

The eap parameter in the cred block can now be used to override
automatic EAP-SIM/AKA/AKA' selection.

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

11 years agoInterworking: Move BSS ANQP information into separate struct
Jouni Malinen [Tue, 4 Sep 2012 13:02:29 +0000 (16:02 +0300)] 
Interworking: Move BSS ANQP information into separate struct

This is an initial step in allowing the ANQP responses to be shared
among multiple BSSes if the BSSes are determined to be operating under
identical configuration.

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

11 years agoFix REMOVE_NETWORK to not run operations with invalid current_ssid
Deepthi Gowri [Mon, 3 Sep 2012 08:55:38 +0000 (11:55 +0300)] 
Fix REMOVE_NETWORK to not run operations with invalid current_ssid

If the REMOVE_NETWORK command is used to delete the currently connected
network, some operations were run between removing the network and
clearing of wpa_s->current_ssid. This left wpa_s->current_ssid pointing
to freed memory and should any operation end up using it before the
pointer gets cleared, freed memory could be references. Avoid this by
removing the network only after having completed the operations that
clear wpa_s->current_ssid.

Signed-hostap: Deepthi Gowri <deepthi@codeaurora.org>
intended-for: hostap-1

11 years agoInterworking: Fetch only the needed ANQP information
Jouni Malinen [Sun, 2 Sep 2012 18:05:54 +0000 (21:05 +0300)] 
Interworking: Fetch only the needed ANQP information

Use configured credentials to figure out which ANQP information needs to
be fetched and only fetch those when using Interworking network
selection. The fetch_anqp command is still fetching all ANQP
information.

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

11 years agoInterworking: Skip extra scan after network auto-select
Jouni Malinen [Sun, 2 Sep 2012 17:18:48 +0000 (20:18 +0300)] 
Interworking: Skip extra scan after network auto-select

If the scan results from before ANQP fetch are fresh (less than five
seconds old), do not run a new scan when selecting the BSS after having
used Interworking network selection.

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

11 years agoUse BSS entries instead of scan results for BSS selection
Jouni Malinen [Sun, 2 Sep 2012 16:56:57 +0000 (19:56 +0300)] 
Use BSS entries instead of scan results for BSS selection

This allows the BSS selection functions to be called without having the
scan result data structure. This can be used to skip extra scans in
cases where previous results can be considered fresh.

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

11 years agoBSS: Add wpa_bss_get_vendor_ie_multi_beacon()
Jouni Malinen [Sun, 2 Sep 2012 16:54:42 +0000 (19:54 +0300)] 
BSS: Add wpa_bss_get_vendor_ie_multi_beacon()

This can be used to fetch vendor IEs from Beacon frames.

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

11 years agoMaintain list of BSS entries in last scan result order
Jouni Malinen [Sun, 2 Sep 2012 16:53:15 +0000 (19:53 +0300)] 
Maintain list of BSS entries in last scan result order

This allows last results to be used even after they have been freed
since the information is copied to the BSS entries anyway and this new
array provides the order in which scan results were processed.

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

11 years agoUse BSS table instead of scan results in need-to-roam determination
Jouni Malinen [Sun, 2 Sep 2012 14:39:35 +0000 (17:39 +0300)] 
Use BSS table instead of scan results in need-to-roam determination

The same information is available in the BSS table, so we can reduce the
need for using the raw scan results in wpa_supplicant_need_to_roam().

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

11 years agoEAP-SIM/AKA: Store pseudonym identity in configuration
Jouni Malinen [Sun, 2 Sep 2012 10:04:18 +0000 (13:04 +0300)] 
EAP-SIM/AKA: Store pseudonym identity in configuration

Use the anonymous_identity field to store EAP-SIM/AKA pseudonym identity
so that this can be maintained between EAP sessions (e.g., after
wpa_supplicant restart) even if fast re-authentication data was cleared.

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

11 years agoEAP-SIM DB: Remove unnecessary username prefix checks
Jouni Malinen [Sun, 2 Sep 2012 09:03:57 +0000 (12:03 +0300)] 
EAP-SIM DB: Remove unnecessary username prefix checks

The EAP-SIM/AKA code is already validating the prefix and the following
lookup would not find matches if the prefix is incorrect, so there is no
need for the extra checks here.

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

11 years agoEAP-AKA server: Skip AKA/Identity exchange if EAP identity recognized
Jouni Malinen [Sun, 2 Sep 2012 08:27:39 +0000 (11:27 +0300)] 
EAP-AKA server: Skip AKA/Identity exchange if EAP identity recognized

If EAP-Response/Identity includes a known pseudonym or re-auth username,
skip the AKA/Identity exchange since we already know the permanent
username of the peer.

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

11 years agohlr_auc_gw: Fix unknown-IMSI determination with SQLite
Jouni Malinen [Sun, 2 Sep 2012 08:24:59 +0000 (11:24 +0300)] 
hlr_auc_gw: Fix unknown-IMSI determination with SQLite

Need to explicitly check that the SQL query returns a match before
returning values.

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

11 years agoEAP-SIM server: Move subtype validation from check into process
Jouni Malinen [Sat, 1 Sep 2012 22:26:05 +0000 (01:26 +0300)] 
EAP-SIM server: Move subtype validation from check into process

This is needed to be able to use SIM-Notification round to indicate
failure per RFC 4186, chapter 6.3.3.

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

11 years agoEAP-SIM server: Use Notification before EAP-Failure
Jouni Malinen [Sat, 1 Sep 2012 22:20:29 +0000 (01:20 +0300)] 
EAP-SIM server: Use Notification before EAP-Failure

RFC 4186, chapter 6.3.3 mandates that EAP-Failure is used only after
Client-Error and Notification messages. Convert the direct jumps to the
FAILURE state with a notification round before sending out EAP-Failure.

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

11 years agoEAP-SIM/AKA peer: Note sending of Client-Error in debug log
Jouni Malinen [Sat, 1 Sep 2012 21:58:03 +0000 (00:58 +0300)] 
EAP-SIM/AKA peer: Note sending of Client-Error in debug log

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

11 years agoEAP-SIM peer: Fix AT_COUNTER_TOO_SMALL use
Jouni Malinen [Sat, 1 Sep 2012 21:39:48 +0000 (00:39 +0300)] 
EAP-SIM peer: Fix AT_COUNTER_TOO_SMALL use

The AT_NONCE_S value needs to be used in AT_MAC calculation for
SIM/Re-authentication response even if re-authentication is rejected
with AT_COUNTER_TOO_SMALL.

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

11 years agoEAP-SIM server: Add support for AT_COUNTER_TOO_SMALL
Jouni Malinen [Sat, 1 Sep 2012 21:38:39 +0000 (00:38 +0300)] 
EAP-SIM server: Add support for AT_COUNTER_TOO_SMALL

If the peer rejects re-authentication with AT_COUNTER_TOO_SMALL, fall
back to full authentication to allow the authentication session to be
completed.

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

11 years agoEAP-SIM DB: Use pointer to struct eap_sim_db_data instead of void*
Jouni Malinen [Sat, 1 Sep 2012 18:48:48 +0000 (21:48 +0300)] 
EAP-SIM DB: Use pointer to struct eap_sim_db_data instead of void*

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

11 years agoEAP-SIM DB: Add debug print for AKA reauth identity addition
Jouni Malinen [Sat, 1 Sep 2012 18:41:23 +0000 (21:41 +0300)] 
EAP-SIM DB: Add debug print for AKA reauth identity addition

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

11 years agoEAP-AKA server: Remove unnecessary protocol version check
Jouni Malinen [Sat, 1 Sep 2012 18:38:25 +0000 (21:38 +0300)] 
EAP-AKA server: Remove unnecessary protocol version check

This validation is done automatically as part of the prefix value
use in the username.

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

11 years agoEAP-SIM DB: Get rid of unnecessary wrapper functions
Jouni Malinen [Sat, 1 Sep 2012 18:37:17 +0000 (21:37 +0300)] 
EAP-SIM DB: Get rid of unnecessary wrapper functions

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

11 years agoEAP-SIM DB: Return pseudonym username instead of structure with it
Jouni Malinen [Sat, 1 Sep 2012 18:32:22 +0000 (21:32 +0300)] 
EAP-SIM DB: Return pseudonym username instead of structure with it

This cleans up the implemenation a bit.

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

11 years agoEAP-SIM DB: Remove unneeded SQLite value copying
Jouni Malinen [Sat, 1 Sep 2012 18:26:26 +0000 (21:26 +0300)] 
EAP-SIM DB: Remove unneeded SQLite value copying

These fields are used only as the search key, so the value is already
known and does not need to be copied from the database.

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

11 years agoEAP-SIM DB: Store permanent username as string in SQLite DB
Jouni Malinen [Sat, 1 Sep 2012 18:22:15 +0000 (21:22 +0300)] 
EAP-SIM DB: Store permanent username as string in SQLite DB

Store permanent username (i.e., including prefix character) instead of
IMSI in the SQLite DB. Convert the string to a string since the EAP-AKA
prefix can start with zero. This cleans up the field names since the
value was already with the prefix included instead of just IMSI. In
addition, this explicitly removes some theoretical cases where the
different identity types could have been mixed.

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

11 years agoEAP-SIM DB: Rename valid_pseudonym_string to valid_db_string
Jouni Malinen [Sat, 1 Sep 2012 18:17:48 +0000 (21:17 +0300)] 
EAP-SIM DB: Rename valid_pseudonym_string to valid_db_string

This will be used with other strings, too, so use a more generic
function name.

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

11 years agoEAP-SIM DB: Use char* strings instead of u8* pointer and length
Jouni Malinen [Sat, 1 Sep 2012 18:10:19 +0000 (21:10 +0300)] 
EAP-SIM DB: Use char* strings instead of u8* pointer and length

Since the EAP-SIM/AKA identities are ASCII strings, there is no need to
use more complex way for storing and passing them. In addition, be more
strict about enforcing username (i.e., no realm part) to be used in the
EAP-SIM DB API. Similarly, require specific username type instead of any
of the types to be used as the key in the pseudonym and reauth
operations. This allows simpler lookup operations to be used.

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

11 years agoEAP-SIM DB: Remove unused eap_sim_db_identity_known()
Jouni Malinen [Sat, 1 Sep 2012 17:12:40 +0000 (20:12 +0300)] 
EAP-SIM DB: Remove unused eap_sim_db_identity_known()

This function is not used anymore, so remove it.

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

11 years agoEAP-AKA server: Store permanent username in session data
Jouni Malinen [Sat, 1 Sep 2012 17:09:07 +0000 (20:09 +0300)] 
EAP-AKA server: Store permanent username in session data

This allows identity use to be cleaned up in various operations.

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

11 years agoEAP-AKA server: Split fullauth setup into a separate function
Jouni Malinen [Sat, 1 Sep 2012 16:37:49 +0000 (19:37 +0300)] 
EAP-AKA server: Split fullauth setup into a separate function

This is an initial cleanup step for AKA/Identity processing.

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

11 years agoEAP-AKA server: Require AKA/Identity response to include identity
Jouni Malinen [Sat, 1 Sep 2012 16:23:14 +0000 (19:23 +0300)] 
EAP-AKA server: Require AKA/Identity response to include identity

Since we always request an identity in the request, the response
has to include AT_IDENTITY. This allows the AKA/Identity response
processing to be simplified a bit.

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

11 years agoEAP-AKA server: Use simpler AKA/Identity request determination
Jouni Malinen [Sat, 1 Sep 2012 16:19:45 +0000 (19:19 +0300)] 
EAP-AKA server: Use simpler AKA/Identity request determination

There is no need to use eap_sim_db_identity_known() here since a new
AKA/Identity message is built only if the identity in the previous
response was not recognized. The first round is always used to request
AT_ANY_ID_REQ to meet the RFC 4187 recommendation on EAP method specific
identity request.

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

11 years agoEAP-SIM server: Store permanent username in session data
Jouni Malinen [Sat, 1 Sep 2012 16:10:33 +0000 (19:10 +0300)] 
EAP-SIM server: Store permanent username in session data

This allows identity use to be cleaned up in various operations.

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

11 years agoEAP-SIM server: Require SIM/Start response to include identity
Jouni Malinen [Sat, 1 Sep 2012 15:56:35 +0000 (18:56 +0300)] 
EAP-SIM server: Require SIM/Start response to include identity

Since we always request an identity in the request, the response
has to include AT_IDENTITY. This allows the SIM/Start response
processing to be simplified a bit.

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