Jouni Malinen [Tue, 12 Feb 2013 17:14:32 +0000 (19:14 +0200)]
Use more accurate timestamps for scan results
For various P2P use cases, it is useful to have more accurate timestamp
for the peer information update. This commit improves scan result
handling by using a single timestamp that is taken immediately after
fetching the results from the driver and then using that value to
calculate the time when the driver last updated the BSS entry. In
addition, more debug information is added for P2P peer updates to be
able to clearly see how old information is being used here.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 12 Feb 2013 16:24:56 +0000 (18:24 +0200)]
P2P: Postpone P2P-DEVICE-FOUND if config_methods not known
If we discover a P2P peer based on a Beacon frame from the GO role, we
do not get information about the supported configuration methods. This
can result in issues if the P2P managing entity above wpa_supplicant is
not prepared to handling config_methods=0x0. To avoid this, postpone
reporting of the P2P-DEVICE-FOUND event when this happens on one of the
social channels. It would be good to be able to this on all channels,
but that could result in issues of never indicating the event for a peer
that is operating a GO on a channel that requires passive scanning.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 12 Feb 2013 16:14:48 +0000 (18:14 +0200)]
P2P: Do not allow peer update to clear config_methods
It could be possible for the scan results to include two entries for a
peer, one from the Listen state and the second one from the GO role. The
latter could be based on a Beason frame. If that happens and the entry
from GO is processed last, the P2P peer config_methods value could
potentially get cleared since Beacon frames do not include this
information in either WPS or P2P element. Avoid this by allowing the
config_methods value for P2P peers to be updated only if the new value
is non-zero.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 11 Feb 2013 16:43:46 +0000 (18:43 +0200)]
WPS: Report NFC connection handover completion differently
Instead of reporting only one connection handover message, report
completion of NFC connection handover with carrier record from both the
request and select messages.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 11 Feb 2013 10:21:03 +0000 (12:21 +0200)]
P2P: Avoid concurrent scans during all steps of group formation
Previously, only some P2P states were considered to postpone concurrent
station mode scans during group formation. Especially the WPS
provisioning step was skipped due to issues to scans run on the P2P
client interface (see commit
fc6997b345d97c80965725b12c52b0d225f32a1a).
This is not ideal since a concurrent scan can slow down group formation
considerably and potentially make it time out. Enforce p2p-in-progress
through all steps of group formation on another interface to address
this.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 10 Feb 2013 21:36:52 +0000 (23:36 +0200)]
P2P: Cancel group formation timeout on group removal (on client)
Group formation timeout is normally canceled when 4-way handshake is
completed (WPA_COMPLETED -> wpas_p2p_completed). However, it is possible
for the GO to stop the group before this happens (i.e., send
Deauthentication frame with reason code 3 before 4-way handshake is
completed). This resulted in the group getting removed, but the group
formation timeout left behind. The unexpected timeout may then result in
undesired termination of the following operation. Fix this by canceling
the group formation timeout in wpas_p2p_group_delete() similarly to how
group idle timeout was canceled there.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 10 Feb 2013 16:49:20 +0000 (18:49 +0200)]
WPS: Change listen time to match nfcpy default (250 ms)
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 10 Feb 2013 16:42:43 +0000 (18:42 +0200)]
WPS: Report only the carrier record from NFC to wpa_supplicant
Since there could be multiple carrier records, it is cleaner to report
only the WPS carrier record instead of full NFC connection handover
select to wpa_supplicant.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 10 Feb 2013 16:19:59 +0000 (18:19 +0200)]
WPS: Fetch only the carrier record from wpa_supplicant for NFC
Since there could be multiple carrier records, it is cleaner to build
only the WPS carrier record instead of full NFC connection handover
request within wpa_supplicant.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 10 Feb 2013 15:14:11 +0000 (17:14 +0200)]
WPS: Update nfcpy script to support AP mode NFC connection handover
Initialize NFC connection handover as the server and reply with WPS
carrier record in connection select.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 10 Feb 2013 15:12:55 +0000 (17:12 +0200)]
WPS: Add command for fetching carrier record for NFC handover
Control interface command "NFC_GET_HANDOVER_SEL NDEF WPS-CR" can now be
used to fetch WPS carrier record from hostapd.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 10 Feb 2013 14:27:59 +0000 (16:27 +0200)]
WPS: Clean up debug prints with nfcpy
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 10 Feb 2013 14:27:14 +0000 (16:27 +0200)]
WPS: Remove 0.5 sec extra wait from NFC handover with nfcpy
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 10 Feb 2013 14:25:20 +0000 (16:25 +0200)]
WPS: Use alternating poll/listen for NFC peer discovery with nfcpy
This is needed to find the NFC peer to avoid cases where both devices
could be using the same operation.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 10 Feb 2013 14:20:25 +0000 (16:20 +0200)]
WPS: Configure logging to show nfcpy log message
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 9 Feb 2013 18:44:15 +0000 (20:44 +0200)]
WPS: Add an example python script for NFC operations with hostapd
wps-ap-nfc.py uses nfcpy and python-wpactrl to support NFC operations
with hostapd for WPS operations.
Signed-hostap: Jouni Malinen <j@w1.fi>
Johannes Berg [Sat, 9 Feb 2013 10:16:58 +0000 (12:16 +0200)]
hostapd: Do not change HT40 capability due to OBSS scan
The capability itself isn't really affected by an OBSS
scan, only the HT operation must then be restricted to
20 MHz. Change this, and therefore use the secondary
channel configuration to determine the setting of the
OP_MODE_20MHZ_HT_STA_ASSOCED flag.
This shouldn't really change anything functionally,
it just makes the code a little less confusing and
is also needed to implement more dynamic bandwidth
changes if ever desired.
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Peter Wu [Sat, 9 Feb 2013 10:13:54 +0000 (12:13 +0200)]
dbus: Add missing signal description for WPS (7)
Commit
caff399250311abfea3376b38530a88bb78b957d added a property named
"WPS" to the dbus interface. It did not add the new
WPAS_DBUS_BSS_PROP_WPS property to the function responsible for marking
changed properties though. This cause the following messages to be
printed repeatedly to syslog:
dbus: wpas_dbus_bss_signal_prop_changed: Unknown Property value 7
Signed-hostap: Peter Wu <lekensteyn@gmail.com>
Jouni Malinen [Fri, 8 Feb 2013 22:53:54 +0000 (00:53 +0200)]
EAP peer: Add Session-Id derivation to more EAP methods
This commit adds Session-Id derivation for EAP-SIM, EAP-AKA, EAP-AKA',
EAP-PSK, and EAP-SAK peer methods.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Stevent Li [Wed, 6 Feb 2013 16:52:33 +0000 (18:52 +0200)]
EAP peer: Add Session-Id derivation
This adds a new getSessionId() callback for EAP peer methods to allow
EAP Session-Id to be derived. This commits implements this for EAP-FAST,
EAP-GPSK, EAP-IKEv2, EAP-PEAP, EAP-TLS, and EAP-TTLS.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Feb 2013 22:44:13 +0000 (00:44 +0200)]
EAP-IKEV2 server: Fix invalid memory freeing operation
wpabuf needs to be freed with wpabuf_free(), not os_free().
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Feb 2013 23:17:43 +0000 (01:17 +0200)]
eap_proxy: Add a dummy implementation for compilation testing
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Deepthi Gowri [Wed, 6 Feb 2013 23:07:14 +0000 (01:07 +0200)]
Android: Enable EAP-AKA support in the build
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Deepthi Gowri [Wed, 6 Feb 2013 22:55:06 +0000 (00:55 +0200)]
eap_proxy: Add mechanism for allowing EAP methods to be offloaded
In addition to the offload mechanism, the Android configuration and
makefiles are extended to allow this to be configured for the build by
dropping in platform specific configuration files and makefile without
having to modify any existing files.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Deepthi Gowri [Wed, 6 Feb 2013 22:36:16 +0000 (00:36 +0200)]
Android: Allow setgroups to be overridden from build configuration
ANDROID_SETGROUPS_OVERRIDE macro can now be used to override setgroups()
values based on build configuration.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Deepthi Gowri [Fri, 8 Feb 2013 09:37:07 +0000 (11:37 +0200)]
P2P: Send p2p_stop_find event on failure to start pending p2p_find
When pending p2p_find fails we need to send p2p_stop_find event to
indicate the previous p2p_find command has been processed.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 7 Feb 2013 22:10:39 +0000 (00:10 +0200)]
P2P: Fix GO Probe Response IEs when Wi-Fi Display is enabled
Commit
1a9f6509b3a711071c12006ff7c3a9cb2a6691f2 added support for
fragmenting the P2P IE in Probe Response frames from a GO. However, it
did not take into account the possibility of Wi-Fi Display IE being
included in the same buffer and caused a regression for the cases where
Wi-Fi Display is enabled. Fix this by building the possibly fragmented
P2P IE first and then concatenating the separate IEs together.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Dmitry Shmidt [Thu, 7 Feb 2013 16:06:51 +0000 (18:06 +0200)]
Add 'SCAN TYPE=ONLY' functionality
Usual manual scan request may cause reassociation due to several
reasons. New command is intended to perform pure scan without taking any
automatic action based on the results.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Vladimir Kondratiev [Thu, 7 Feb 2013 14:20:18 +0000 (16:20 +0200)]
Capability matching for 60 GHz band
On the DMG (60 GHz) band, capability bits defined differently from
non-DMG ones. Adjust capability matching to cover both cases.
Also, for non-DMG bands, check ESS bit is set.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Raja Mani [Thu, 7 Feb 2013 13:24:53 +0000 (15:24 +0200)]
nl80211: Add ctrl_iface message for AP mode connection rejection
When AP mode operation reject the client, nl80211 layer advertises the
connect failed event with the reason for failures (for example, max
client reached, etc.) using NL80211_CMD_CONN_FAILED.
This patch adds some debug messages whenever such an event is received
from the nl80211 layer and also the same event is posted to the upper
layer via wpa_msg().
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Jouni Malinen [Thu, 7 Feb 2013 10:51:17 +0000 (12:51 +0200)]
P2P: Allow local configuration to use 5 GHz band 40 MHz channels
These channels were already enabled for P2P use, but the local
configuration parameter was not allowed to use the operating class in
which the 40 MHz channels are specified.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Amar Singhal [Thu, 7 Feb 2013 10:27:52 +0000 (12:27 +0200)]
Fix BSS RANGE command for no exact id match cases
The RANGE=N1-N2 command did not return any entries in some cases where
N1 does not match with any BSS entry. Fix this by allow entries to be
fetched even without knowing the exact id values.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Amar Singhal [Tue, 5 Feb 2013 22:31:34 +0000 (00:31 +0200)]
Add "BSS LAST ..." command
Add the "BSS LAST ..." command. This command helps in fetching the scan
entries iteratively from FIRST entry to LAST entry by ID.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Amar Singhal [Tue, 5 Feb 2013 22:28:48 +0000 (00:28 +0200)]
Fix the "BSS FIRST.." command
The "BSS FIRST.." command fails when additional parameters (e.g., MASK)
is used since the string comparsion does not take into account the
number of characters. Fix by comparing only 5 characters as in other
commands.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Feb 2013 15:40:09 +0000 (17:40 +0200)]
HS 2.0: Fix IE buffer length for extra scan IEs
The HS 2.0 Indication element is 7 (not 6) octets. The previous
implementation could result in wpabuf validation code stopping the
program if HS 2.0 was enabled without Interworking or P2P (which would
have created a large enough buffer to avoid hitting this) being enable.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Tue, 5 Feb 2013 11:36:36 +0000 (13:36 +0200)]
TDLS: Fix MIC calculation for teardown frame to depend on reason code
The reason code used for calculating the MIC should correspond to the
reason code with which the teardown frame is sent, as the receiver shall
use the one obtained in the frame for validating the MIC.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Tue, 5 Feb 2013 11:27:56 +0000 (13:27 +0200)]
TDLS: Remove link, if any, on an implicit set up request
If an implicit TDLS set up request is obtained on an existing link or an
to be established link, the previous link was not removed. This commit
disables the existing link on a new set up request. Also,
wpa_tdls_reneg() function was invoking wpa_tdls_start() on an already
existing peer for the case of internal setup, which is incorrect. Thus
the invocation of wpa_tdls_start() is removed in wpa_tdls_reneg() and
also this function is renamed to wps_tdls_remove() as it does not
renegotiation rather shall remove the link (if any) for the case of
external setup.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Feb 2013 11:16:35 +0000 (13:16 +0200)]
TDLS: Move existing-entry check into wpa_tdls_add_peer()
There is no need to have this check copied to each caller since this
needs to be done for every case when a new peer is being added.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Tue, 5 Feb 2013 11:10:34 +0000 (13:10 +0200)]
TDLS: Use existing peer entry if available when processing discovery
Peer entries were getting added on every discover request from the peer,
thus resulting in multiple entries with the same MAC address. Ensures
that a check is done for the presence of the peer entry and reuse the
existing entry instead of adding a new one.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 4 Feb 2013 13:52:53 +0000 (15:52 +0200)]
P2P: Fix P2P-GROUP-STARTED event for p2p_connect-join
Commit
50178335bff450829729c91c8af798a1d3a7b408 introduced a regression
for P2P-GROUP-STARTED event indication during p2p_connect-join when
using a separate P2P group interface. wpa_s->global->p2p_group_formation
was already set in that case to point to the group interface and this
commit changed this to point to incorrect interface. Fix this by setting
p2p_group_formation here only in case a separate group interface is not
used.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 4 Feb 2013 13:38:35 +0000 (15:38 +0200)]
P2P: Fix Action frame processing if Interworking is enabled
GAS server used the same public_action_cb mechanism as P2P to process
Action frames. This ended up overriding P2P processing of Action frames
while running an AP/GO interface with a build that enables Interworking
(e.g., for Hotspot 2.0) and a driver that uses hostapd for AP mode
SME/MLME. Fix this by adding a separate callback registration for the
GAS server. This should really be cleaned up by supporting arbitrary
number of callback handlers, but for now, this addresses the regression
with a minimal change.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jaewan Kim [Sun, 3 Feb 2013 19:22:59 +0000 (21:22 +0200)]
wpa_supplicant: Fix access to the freed memory when removing all networks
Commit
59ff6653aad1c228cb2e9ccfe02b9dd4e6fc7901 fixed this issue for
'removing a network', and we also need to take care of 'removing all
networks'.
Signed-hostap: Jaewan Kim <jaewan at google.com>
Mark Kettenis [Sun, 3 Feb 2013 19:16:29 +0000 (21:16 +0200)]
Add driver for OpenBSD net80211 layer
Very basic support for OpenBSD. No support for scanning yet, so this needs
ap_scan=0 and expects that the user has configured the interface manually
using ifconfig(8).
Signed-hostap: Mark Kettenis <kettenis@openbsd.org>
Jouni Malinen [Sun, 3 Feb 2013 19:13:07 +0000 (21:13 +0200)]
Make wpas_select_network_from_last_scan() static
Addition of wpa_supplicant_fast_associate() made it unnecessary to call
wpas_select_network_from_last_scan() directly from other files.
Signed-hostap: Jouni Malinen <j@w1.fi>
Paul Stewart [Sun, 3 Feb 2013 19:08:31 +0000 (21:08 +0200)]
wpa_supplicant: Implement fast-associate on SelectNetwork
If scan results are available when we perform a SelectNetwork, use
them to make an associate decision. This can save an entire scan
interval-worth of time in situations where something external to
wpa_supplicant (like a connection manager) has just previously
requested a scan before calling SelectNetwork.
Signed-hostap: Paul Stewart <pstew@chromium.org>
Pontus Fuchs [Sun, 3 Feb 2013 16:14:05 +0000 (18:14 +0200)]
Update scan interval gracefully
When the scan interval is changed the new interval is effective
after the old interval timer fires off one last time. This can cause
an unacceptable long delay when updating the interval.
Change this behaviour to use MIN(left of old interval, new interval)
for the scan interval following the interval change.
Signed-hostap: Pontus Fuchs <pontus.fuchs@gmail.com>
Pontus Fuchs [Sun, 3 Feb 2013 15:17:08 +0000 (17:17 +0200)]
eloop: Add a timer cancel that returns the remaining time
This new cancel timer will give back the remaining time if it was
pending.
Signed-hostap: Pontus Fuchs <pontus.fuchs@gmail.com>
Jouni Malinen [Sun, 3 Feb 2013 15:13:37 +0000 (17:13 +0200)]
eloop_win: Update to be closer to the current eloop.c
Some fixes had were made only in eloop.c.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Feb 2013 15:09:00 +0000 (17:09 +0200)]
eloop_win: Use struct dl_list for timeouts
This merges commit
eaa3f04b97f7bf3ffb91fe0acb2bb6bcb8f566fe changes from
eloop.c into eloop_win.c.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Feb 2013 14:50:45 +0000 (16:50 +0200)]
eloop_none: Update sample to be closer to the current eloop.c
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Feb 2013 14:45:05 +0000 (16:45 +0200)]
eloop_none: Use struct dl_list for timeouts
This merges commit
eaa3f04b97f7bf3ffb91fe0acb2bb6bcb8f566fe changes from
eloop.c into eloop_none.c.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Feb 2013 14:25:09 +0000 (16:25 +0200)]
eloop_none: Fix compilation
eloop.h API had been changed without updating eloop_none.c to match.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Feb 2013 14:23:13 +0000 (16:23 +0200)]
Fix compilation with PMKSA caching support disabled
Commit
6aaac006af7fd39d618c6546939bed9f0f0cea37 modified the
pmksa_cache_init() prototype, but forgot to update the empty wrapper
function which is used when PMKSA caching is not included in the build.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Feb 2013 13:46:47 +0000 (15:46 +0200)]
nl80211: Do not use void pointer for driver_ops used internally
This allows some more pointer type validation at compile time.
Signed-hostap: Jouni Malinen <j@w1.fi>
Ben Greear [Sun, 3 Feb 2013 11:51:54 +0000 (13:51 +0200)]
hostapd: Fix crash when scan fails
When scan failed, the wpa_driver_nl80211_scan method tried
to recursively call itself, but it passed in the wrong argument
for the void*, and so then it crashed accessing bad memory.
With this fix, hostapd still will not retry the scan later, but
at least it will exit cleanly and won't polute the file system
with core files.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Sunil Dutt [Tue, 22 Jan 2013 12:09:54 +0000 (14:09 +0200)]
TDLS: Disable the link also on driver request for teardown
The link was not disabled for the case of implicit trigger from the
driver unlike in the case of explicit trigger fromc ctrl_iface. Make the
tear down sequences match in these cases by adding the TDLS_DISABLE_LINK
tdls_oper to the driver when processing the TDLS_REQUEST_TEARDOWN event.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 17 Jan 2013 14:22:41 +0000 (16:22 +0200)]
wlantest: Add radiotap header when re-writing DLT_IEEE802_11 file
When using DLT_IEEE802_11 datalink type in a pcap file, wlantest will now
add a radiotap header to the re-written pcap file to make sure all frames
in the output file will include the radiotap header.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 17 Jan 2013 10:55:30 +0000 (12:55 +0200)]
wlantest: Add -F option for assuming FCS is included
When using DLT_IEEE802_11 datalink type in a pcap file, wlantest can now
be instructed to assume there is an FCS included in the frame by adding
the new -F command line argument. This will make wlantest validate the
FCS and strip it from the frame before processing.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 15 Jan 2013 10:03:29 +0000 (12:03 +0200)]
eapol_test: Remove unnecessary header file inclusion
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Pavan Kumar [Tue, 15 Jan 2013 09:52:20 +0000 (11:52 +0200)]
P2P: Send P2P-FIND-STOPPED event in the new continue-search states
The P2P-FIND-STOPPED event was sent only in the P2P_SEARCH state, but
this needs to be send also in the new continue-search-when-ready states
P2P_CONTINUE_SEARCH_WHEN_READY and P2P_SEARCH_WHEN_READY for consistent
behavior.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 13 Jan 2013 16:27:00 +0000 (18:27 +0200)]
Fix wpa_priv build
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 16:25:19 +0000 (18:25 +0200)]
Fix EAP-pwd server file name for wpa_supplicant AP builds
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 16:24:52 +0000 (18:24 +0200)]
Updated test_wpa to use new header file for WPA authenticator
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 16:24:17 +0000 (18:24 +0200)]
Add new binaries to .gitignore
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 16:02:20 +0000 (18:02 +0200)]
Move cipher to enum wpa_cipher conversion into wpa_common.c
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 15:41:40 +0000 (17:41 +0200)]
Use a helper function for selection group cipher for AP mode
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 15:31:36 +0000 (17:31 +0200)]
Use helper function for writing cipher suite names
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 15:10:38 +0000 (17:10 +0200)]
Define allowed pairwise/group cipher suites in a header file
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 15:06:22 +0000 (17:06 +0200)]
Use a common function for parsing cipher suites
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 14:58:54 +0000 (16:58 +0200)]
Move cipher suite selection into common helper functions
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Jan 2013 11:43:54 +0000 (13:43 +0200)]
P2P: Add some more details on Service Query TLV format
Signed-hostap: Jouni Malinen <j@w1.fi>
Paul Stewart [Sat, 12 Jan 2013 17:51:18 +0000 (19:51 +0200)]
wpa_supplicant: Add more DBus EAP status
Signal the start of EAP authentication as well as when additional
credentials are required to complete.
Signed-hostap: Paul Stewart <pstew@chromium.org>
Jouni Malinen [Sat, 12 Jan 2013 16:04:19 +0000 (18:04 +0200)]
Update ChangeLog files to match current implementation
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Jan 2013 07:54:54 +0000 (09:54 +0200)]
nl80211: Add MFP information for NL80211_CMD_CONNECT
This was previously included only with NL80211_CMD_ASSOCIATE, but the
information is as useful (if not even more useful) for
NL80211_CMD_CONNECT. It should be noted that cfg80211 does not yet use
this attribute with NL80211_CMD_CONNECT, but that can be added easily.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Wed, 9 Jan 2013 14:05:18 +0000 (16:05 +0200)]
P2P: Use the same Dialog Token value for every GO Negotiation retry
Each GO Negotiation Request is (re)tried with an unique dialog token and
a GO Negotiation Response / Confirmation from the peer with a mismatched
dialog token is ignored which could result in a failure in this group
formation attempt. Thus, the P2P device would continue retrying the GO
Negotiation Request frames till the GO Negotiation Response frame with a
matching dialog token is received. To avoid the failures due to the
dialog token mismatch in retry cases if the peer is too slow to reply
within the timeout, the same dialog token value is used for every retry
in the same group formation handshake.
It should be noted that this can result in different contents of the GO
Negotiation Request frame being sent with the same dialog token value
since the tie breaker bit in GO Intent is still toggled for each
attempt. The specification is not very clear on what would be the
correct behavior here. Tie breaker bit is not updated on
"retransmissions", but that is more likely referring to the layer 2
retransmission and not the retry at higher layer using a new MMPDU.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jan Vales [Sun, 6 Jan 2013 18:39:30 +0000 (20:39 +0200)]
Include session transfer stats into SIGUSR1 dump
Add the RX/TX packets/bytes into each station's SIGUSR1 dump
information.
Signed-off-by: Jan Vales <jan@jvales.net>
Jouni Malinen [Sun, 6 Jan 2013 17:26:27 +0000 (19:26 +0200)]
SAE: Move temporary data into a separate data structure
This allows even more memory to be freed when the SAE instance enters
Accepted state. This leaves only the minimal needed memory allocated
during the association which is especially helpful for the AP
implementation where multiple stations may be associated concurrently.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 17:06:59 +0000 (19:06 +0200)]
SAE: Free temporary buffers when moving to Accepted state
Most of the variables are not needed anymore once the SAE instance
has entered Accepted state. Free these to save memory.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 16:59:46 +0000 (18:59 +0200)]
SAE: Remove unnecessary sae_derive_k() wrapper
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 16:56:46 +0000 (18:56 +0200)]
SAE: Clean up exponent calculation for PWE
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 16:47:52 +0000 (18:47 +0200)]
SAE: Share more commit value derivation between FFC and ECC cases
The rand/mask values and commit scalar are derived using the exact same
operations, so only use a separate function for deriving the commit
element.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 16:38:17 +0000 (18:38 +0200)]
SAE: Replace comparison to one with crypto_bignum wrapper
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 16:30:11 +0000 (18:30 +0200)]
SAE: Rename and move ECC/FFC functions to be next to each other
This makes it easier to see where there is separate implementation for
ECC and FFC groups.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 16:18:01 +0000 (18:18 +0200)]
SAE: Remove duplicated SAE field debug dumps
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 16:12:58 +0000 (18:12 +0200)]
SAE: Store commit elements as EC point or bignum instead of octet string
This avoids unnecessary EC point and bignum initialization steps during
the SAE exchange.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 15:34:05 +0000 (17:34 +0200)]
SAE: Validate peer commit values as part of parsing the message
There is no need to postpone this validation step to a separate
processing operation for the commit message, so move the minimal
validation tasks into the parsing functions.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 15:03:09 +0000 (17:03 +0200)]
SAE: Split sae_parse_commit() into helper functions
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 14:57:53 +0000 (16:57 +0200)]
SAE: Store commit scalars as bignum instead of octet string
This avoids unnecessary bignum initialization steps during the SAE
exchange.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 14:10:48 +0000 (16:10 +0200)]
SAE: Store PWE as EC point or bignum instead of octet string
This avoids unnecessary EC point and bignum initialization steps during
the SAE exchange.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 13:47:37 +0000 (15:47 +0200)]
SAE: Use more generic random bignum generation
Move the bignum comparison part into the bignum library to allow a
single implementation of rand generation for both ECC and FCC based
groups.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 13:32:38 +0000 (15:32 +0200)]
SAE: Store rand value as bignum instead of octet string
This avoids unnecessary bignum initialization steps during the SAE
exchange.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 13:13:07 +0000 (15:13 +0200)]
SAE: Add support for FFC groups that do not use a safe prime
This allows DH groups 22, 23, 24 to be used with SAE.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 6 Jan 2013 11:22:44 +0000 (13:22 +0200)]
Add Diffie-Hellman group definitions for MODP groups in RFC 5114
The groups 22, 23, and 24 are not based on a safe prime and generate a
prime order subgroup. As such, struct dh_group is also extended to
include the order for previously defined groups (q=(p-1)/2 since these
were based on a safe prime).
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 5 Jan 2013 19:22:00 +0000 (21:22 +0200)]
SAE: Add support for FFC groups
This allows FFC groups to be used with SAE. Though, these groups are not
included in the default sae_groups value based on what is available
since the FFC groups have the additional requirement of using a safe
prime with the current implementation (or specification of the group
order).
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 5 Jan 2013 19:12:29 +0000 (21:12 +0200)]
SAE: Maintain bignum of group order and prime in context data
This simplifies operations by not having to create bignum instances
multiple times during SAE exchange.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 5 Jan 2013 18:59:46 +0000 (20:59 +0200)]
Add more crypto_bignum_*() wrappers
These operations will be needed for SAE FCC group operations.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 4 Jan 2013 10:19:02 +0000 (12:19 +0200)]
Allow AP mode deauth/disassoc reason code to be overridden
The optional "reason=<reason code>" parameter to the ctrl_iface
deauthenticate and disassociate commands can now be used to change the
reason code used in the disconnection frame. This can be used, e.g., by
P2P GO to disconnect a single P2P client from the group by sending it an
indication of the group getting terminated (Deauthentication frame with
reason code 3). It needs to be noted that the peer device is still in
possession on the PSK, so it can still reconnect to the group after this
if it does not follow the group termination indication.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Thu, 3 Jan 2013 15:28:50 +0000 (17:28 +0200)]
P2P: Publish more connected clients info in Probe Response frames
This commit increases the maximum buffer size for P2P Client Info
advertized by the Group Owner in the Probe Response frames.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 1 Jan 2013 18:35:10 +0000 (20:35 +0200)]
Extra validation to keep static analyzers happy
Use of two variables to track bounds checking seems to be a bit too much
for some static analyzers, so add an extra condition for buffer padding
to avoid incorrect warnings.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 1 Jan 2013 18:34:08 +0000 (20:34 +0200)]
TDLS: Use merge_byte_arrays() helper
This makes implementation simpler and easier for static analyzers to
understand.
Signed-hostap: Jouni Malinen <j@w1.fi>