Jouni Malinen [Wed, 15 Sep 2010 08:16:17 +0000 (22:16 -1000)]
EAP-pwd: Fix couple of memory leaks
Jouni Malinen [Wed, 15 Sep 2010 08:04:09 +0000 (22:04 -1000)]
EAP-pwd: Move bnctx into per-protocol instance structure
This avoids double frees of bnctx and related crashes.
Dan Harkins [Wed, 15 Sep 2010 07:51:40 +0000 (21:51 -1000)]
EAP-pwd: Add support for EAP-pwd server and peer functionality
This adds an initial EAP-pwd (RFC 5931) implementation. For now,
this requires OpenSSL.
Jouni Malinen [Tue, 14 Sep 2010 07:07:54 +0000 (00:07 -0700)]
Allow auto-connect to request scan in associating state
Disconnection event may be received while in associating state.
Previously, wpa_supplicant could get stuck not trying to reconnect
in that case at least with nl80211. Allow scan request in this
state to avoid the issue. This helps especially with APs that do
load balancing by sending Deauthentication frame as a response to
Reassociation Request frame after successful Authentication frame
exchange.
Sudhakar Swaminathan [Wed, 8 Sep 2010 18:18:10 +0000 (21:18 +0300)]
P2P: Add option for disabling intra BSS distribution
p2p_intra_bss configuration parameter can now be used to
disable/enable intra BSS distribution (bridging of frames between
the clients in a group).
Ardong Chen [Mon, 6 Sep 2010 14:28:45 +0000 (17:28 +0300)]
Add option for disabling automatic reconnection on disconnection
ctrl_interface STA_AUTOCONNECT command can now be used to disable
automatic reconnection on receiving disconnection event. The default
behavior is for wpa_supplicant to try to reconnect automatically, i.e.,
to maintain previous behavior.
Ardong Chen [Tue, 7 Sep 2010 14:35:42 +0000 (17:35 +0300)]
P2P: Fix invitation_received callback to use NULL bssid (if not known)
Previously, the storage buffer for the Group BSSID was returned
regardless of whether it was included in the invitation or not.
Kuko Li [Tue, 7 Sep 2010 14:08:52 +0000 (17:08 +0300)]
P2P: Do not process configuration changes on non-P2P interfaces
Jouni Malinen [Tue, 7 Sep 2010 14:07:57 +0000 (17:07 +0300)]
P2P: Make sure parsed Device Name gets null terminated
If the msg->device_name buffer is filled from two different sources,
the copy from the P2P Device Info attribute needs to make sure that
the values gets null terminated to match the length of the correct
string should the other place use another string (which is not really
allowed by the spec, but could happen).
Jouni Malinen [Tue, 7 Sep 2010 10:42:55 +0000 (13:42 +0300)]
P2P: Stop connection attempt on PBC session overlap
The overlap condition cannot disappear before group formation timeout
hits, so there is no point in continuing in this case and failure can
be indicated immediately.
Jouni Malinen [Tue, 7 Sep 2010 10:21:33 +0000 (13:21 +0300)]
P2P: Use group formation timeout (but longer one) with join-a-group
This allows the pending group interface to be removed if we fail
to join a running group. A longer than 15 second timeout is needed
here since the GO may not have authorized our connection yet.
Jouni Malinen [Mon, 6 Sep 2010 18:04:01 +0000 (21:04 +0300)]
P2P: Add peer timeout into group formation 15 second timeout
This adds some more time for WPS provisioning step in case the peer
takes long time to start group interface operations.
Ardong Chen [Mon, 6 Sep 2010 17:51:06 +0000 (20:51 +0300)]
WPS: Allow pending WPS operation to be cancelled
A new ctrl_interface command, WPS_CANCEL, can now be used to cancel
a pending or ongoing WPS operation. For now, this is only available
with wpa_supplicant (either in station or AP mode). Similar
functionality should be added for hostapd, too.
Jouni Malinen [Mon, 6 Sep 2010 16:00:43 +0000 (19:00 +0300)]
P2P: Provide local event on GO Neg Req rejection
If an authorized (p2p_connect used locally) GO Negotiation is
rejected when receiving GO Negotiation Request from the peer,
indicate the failure with a ctrl_interface P2P-GO-NEG-FAILURE
event. Previously, this event was only shown on the peer (i.e.,
the device receiving the GO Negotiation Response with non-zero
Status code).
Ardong Chen [Mon, 6 Sep 2010 15:13:18 +0000 (18:13 +0300)]
WPS: Fix timeout event to be sent over ctrl_interface
This was supposed to be sent to external event monitors, i.e., to
use wpa_msg instead of wpa_printf.
Ardong Chen [Mon, 6 Sep 2010 15:10:55 +0000 (18:10 +0300)]
P2P: Process Invitation Request from previously unknown peer
Since this message now includes P2P Device Info attribute, it is
reasonable to learn the peer data and process the message instead of
rejecting the message.
Wei-Jen Lin [Mon, 6 Sep 2010 15:00:04 +0000 (18:00 +0300)]
Allow bssid parameter to be cleared through ctrl_interface
Setting bssid to an empty string, "", or any can now be used to
clear the bssid_set flag in a network block, i.e., to remove bssid
filtering.
Ardong Chen [Mon, 6 Sep 2010 14:16:25 +0000 (17:16 +0300)]
wpa_cli action: Add WPS_EVENT_SUCCESS and WPS_EVENT_FAIL handlers
Ardong Chen [Mon, 6 Sep 2010 13:57:19 +0000 (16:57 +0300)]
P2P: Add frequency into group started ctrl_interface events
Ardong Chen [Mon, 6 Sep 2010 13:51:46 +0000 (16:51 +0300)]
P2P: Add peer entry based on Provision Discovery Request
Add (or complete Probe Request only) P2P peer entry when receiving
Provision Discovery Request from a previously unknown peer. This is
especially of use for a GO when a P2P client is requesting to join
a running group.
Jouni Malinen [Thu, 9 Sep 2010 14:20:28 +0000 (07:20 -0700)]
Fix build without CONFIG_P2P=y
Jouni Malinen [Thu, 5 Aug 2010 16:15:11 +0000 (09:15 -0700)]
P2P: Use SSID from GO Negotiation to limit WPS provisioning step
In order to avoid picking incorrect SSID from old scan results, use
SSID from GO Negotiation to select the AP.
Jouni Malinen [Thu, 5 Aug 2010 02:13:00 +0000 (19:13 -0700)]
P2P: Deinit GO group data before global P2P deinit
This avoids issues with using freed memory in p2p_group_deinit().
Jouni Malinen [Wed, 4 Aug 2010 23:00:21 +0000 (16:00 -0700)]
P2P: Use operating frequency from peer table as backup for join
The scan operation before Provision Discovery Request may not include
the GO. However, we are likely to have the GO in our P2P peer table,
so use that information to figure out the operating channel if BSS
table entry is not available.
Jouni Malinen [Wed, 4 Aug 2010 21:34:56 +0000 (14:34 -0700)]
P2P: Fix connect-to-running-group if Action TX status is delayed
The following operations (scan and associate) were not run if the
Provisioning Discovery Response is received before the TX Action
status.
Jouni Malinen [Wed, 4 Aug 2010 16:02:27 +0000 (09:02 -0700)]
P2P: Add a workaround for Extended Listen Timing getting stuck
This should not really happen, but it looks like the Listen command
may fail is something else (e.g., a scan) was running at an
inconvenient time. As a workaround, allow new Extended Listen
operation to be started if this state is detected.
Jouni Malinen [Tue, 3 Aug 2010 03:53:56 +0000 (20:53 -0700)]
P2P: Add some more debug information for Action frame TX
Jouni Malinen [Tue, 3 Aug 2010 03:40:54 +0000 (20:40 -0700)]
P2P: Clear pending Action TX frame on p2p_stop_find and p2p_listen
This is needed to avoid issues with the previous TX command from
stopping long Listen state.
Jouni Malinen [Mon, 2 Aug 2010 23:02:18 +0000 (16:02 -0700)]
P2P: Fix cross connection allowed parser to use correct field
The previous version had a bug that could result in NULL pointer
dereference if the P2P IE included Manageability attribute, but no
Capability attribute.
Jouni Malinen [Sun, 1 Aug 2010 23:47:38 +0000 (16:47 -0700)]
P2P: Allow P2P IE without Device Info in (Re)Assoc Req
This can happen, e.g., when a P2P client connects to a P2P group
using the infrastructure WLAN interface instead of P2P group
interface. In that case, the P2P client may behave as if the GO
would be a P2P Manager WLAN AP.
Jouni Malinen [Sun, 1 Aug 2010 23:19:31 +0000 (16:19 -0700)]
Add test command for disabling/enabling A-MPDU aggregation
ctrl_iface command "SET ampdu <0/1>" can now be used to
disable/enable A-MPDU aggregation.
Jouni Malinen [Fri, 30 Jul 2010 23:33:40 +0000 (16:33 -0700)]
P2P: For now, do not use channels 12-14 in P2P groups
This is needed to make sure we do not try to accidentally enable GO
in channels that may not be allowed. In addition, this may help with
some driver that do not like channel 14 even as a passive scan
channel.
Jouni Malinen [Fri, 30 Jul 2010 01:35:26 +0000 (18:35 -0700)]
P2P: Add an example p2p-action script for udhcpc/udhcpd
Jouni Malinen [Fri, 30 Jul 2010 00:25:54 +0000 (17:25 -0700)]
Copy WPS strings into AP configuration when using wpa_supplicant AP
Jouni Malinen [Fri, 30 Jul 2010 00:13:11 +0000 (17:13 -0700)]
Trigger WPS configuration update on string changes
Previously, only Device Name string was handled, but similar trigger
is needed on Manufacturer, Model Name, Model Number, and Serial Number
changes.
Jouni Malinen [Thu, 29 Jul 2010 23:41:14 +0000 (16:41 -0700)]
P2P: Avoid segfault on AP deinit after failed AP start
Jouni Malinen [Thu, 29 Jul 2010 23:20:02 +0000 (16:20 -0700)]
P2P: Fix code order to avoid potential NULL pointer dereference
Jouni Malinen [Thu, 29 Jul 2010 23:09:38 +0000 (16:09 -0700)]
P2P: Fix P2P IE generation for AssocReq when BSS info is not available
This code could segfault on NULL pointer dereference at least when
ap_scan=2 is used.
Jouni Malinen [Thu, 29 Jul 2010 22:32:33 +0000 (15:32 -0700)]
P2P: Allow driver wrapper to indicate how many stations are supported
This can be used to limit the number of clients allowed to connect
to the group on the GO.
Jouni Malinen [Thu, 29 Jul 2010 00:56:37 +0000 (17:56 -0700)]
Fix AP mode wps_pin command to return the entered PIN
This command is supposed to return the PIN value that was generated
or passed in as an argument. In the AP case, the entered PIN was not
being returned.
Jouni Malinen [Wed, 28 Jul 2010 17:18:52 +0000 (10:18 -0700)]
P2P: Add mechanism for configuring UAPSD parameters for group
This is needed to be able to change parameters for dynamically
created interfaces between the creation of the interface and
association/start AP commands.
Following ctrl_interface commands can now be used:
P2P_SET client_apsd disable
- disable configuration (i.e., use driver default) in client mode
P2P_SET client_apsd <BE>,<BK>,<VI>,<VO>;<max SP Length>
- enable UASPD with specific trigger configuration (0/1) per AC
(max SP Length is currently ignored)
P2P_SET go_apsd disable
- disable configuration (i.e., use driver default) in AP mode
P2P_SET go_apsd <0/1>
- disable/enable APSD in AP mode
Jouni Malinen [Thu, 29 Jul 2010 17:51:49 +0000 (10:51 -0700)]
P2P: Fix build after WSC 2.0 change to use WFA vendor extension
Jouni Malinen [Thu, 29 Jul 2010 17:44:11 +0000 (10:44 -0700)]
WPS: Fix ER PBC overlap detection build with P2P changes
Jouni Malinen [Tue, 27 Jul 2010 01:54:29 +0000 (18:54 -0700)]
P2P: Fix GAS fragmentation to match with IEEE 802.11u
P2P specification v1.15 fixed the description of the GAS fragmentation
to not duplicate NQP Query Response Field header in all fragments. This
change makes the fragmentation match with the description in IEEE
802.11u. The change is not backwards compatible with previous P2P
specification versions as far as fragmented SD responses are concerned.
Jouni Malinen [Mon, 26 Jul 2010 22:31:19 +0000 (15:31 -0700)]
P2P: Add Device Password ID to GO Neg Request RX event
This event indicates the Device Password ID that the peer tried
to use in GO Negotiation. For example:
P2P-GO-NEG-REQUEST 02:40:61:c2:f3:b7 dev_passwd_id=4
Jouni Malinen [Sat, 10 Jul 2010 20:07:08 +0000 (13:07 -0700)]
P2P: Fix p2p_connect join with interface address
Need to fetch P2P Device Address from the peers table in case the
p2p_connect join command uses interface address.
Jouni Malinen [Sat, 10 Jul 2010 17:19:34 +0000 (10:19 -0700)]
P2P: Add support for cross connection
If enabled, cross connection allows GO to forward IPv4 packets
using masquerading NAT from the P2P clients in the group to an
uplink WLAN connection. This is disabled by default and can be
enabled with "wpa_cli p2p_set cross_connect 1" on the P2P device
interface.
Jouni Malinen [Sat, 10 Jul 2010 15:59:19 +0000 (08:59 -0700)]
P2P: Add defined values for P2P Manageability Bitmap
Jouni Malinen [Sat, 10 Jul 2010 00:23:11 +0000 (17:23 -0700)]
P2P: Fix device discoverability to not wait before sending GO Neg Req
When we receive Device Discoverability Response, we need to initiate
new GO Negotiation as quickly as possible to avoid the target client
from going back to sleep. Make sure we do not end up in
P2P_CONNECT_LISTEN state (short Listen mode) in this case.
Jouni Malinen [Fri, 9 Jul 2010 00:14:24 +0000 (17:14 -0700)]
P2P: Disable periodic NoA when non-P2P STA is connected
For now, this applies to the test command that can be used to set
periodic NoA (p2p_set noa). The value are stored and periodic NoA
is enabled whenever there are no non-P2P STAs connected to the GO.
Jouni Malinen [Wed, 7 Jul 2010 04:37:20 +0000 (21:37 -0700)]
P2P: Include P2P IE in (Re)AssocReq to infra AP if it uses P2P IE
While this is not strictly speaking required by the P2P specification
for a not-P2P Managed Device, this can provide useful information for
the P2P manager AP and may be needed to pass certification tests.
Jouni Malinen [Wed, 7 Jul 2010 04:36:08 +0000 (21:36 -0700)]
P2P: Include Extended Listen Timing attribute in (Re)AssocReq
If extended listen timing is enabled, it should be advertised in
(Re)Association Request frames sent to GOs.
Jouni Malinen [Wed, 7 Jul 2010 03:44:47 +0000 (20:44 -0700)]
P2P: Add forgotten allow_cross_connection example
Jouni Malinen [Wed, 7 Jul 2010 03:37:52 +0000 (20:37 -0700)]
Trigger scan on reload-config only if there are enabled networks
Jouni Malinen [Wed, 7 Jul 2010 03:22:31 +0000 (20:22 -0700)]
P2P: Wait on operating channel between invitation requests
If running in active GO mode to invite a device to join the group,
wait on operating channel instead of listen channel.
Jouni Malinen [Wed, 7 Jul 2010 03:07:46 +0000 (20:07 -0700)]
P2P: Fix invitation to active group to use correct operating channel
Invitation Request must use the current operating frequency of the
group, not the default operating channel.
Jouni Malinen [Tue, 6 Jul 2010 23:32:55 +0000 (16:32 -0700)]
WPS: Fix configuration strings on config reload
Previously, freed memory could be used as device name (and other similar
parameters) when building WPS IE after SIGHUP.
Jouni Malinen [Tue, 6 Jul 2010 23:32:14 +0000 (16:32 -0700)]
P2P: Use 'Enrollee info' WPS request type in P2P scans
This avoids setting explicit Request-to-Enrollee request when
WPS 2.0 is used.
Jouni Malinen [Tue, 6 Jul 2010 23:31:46 +0000 (16:31 -0700)]
P2P: Fix WSC IE not to include two Device Name attrs with WPS 2.0 is used
Jouni Malinen [Fri, 2 Jul 2010 15:27:00 +0000 (08:27 -0700)]
P2P: Fix channel forcing for p2p_connect auth
Jouni Malinen [Fri, 2 Jul 2010 06:39:34 +0000 (23:39 -0700)]
P2P: Use 0-timeout when inviting to running group as client
Jouni Malinen [Fri, 2 Jul 2010 05:57:03 +0000 (22:57 -0700)]
P2P: Allow pre-authorization of invitation to apply to src addr
For client-invites-device case, the pre-authorization of an invitation
to running group will need to allow Invitation Request from specified
address, too. This is for testing uses only.
Jouni Malinen [Wed, 30 Jun 2010 14:39:29 +0000 (07:39 -0700)]
Add P2P Interface Address into ctrl_iface status output
Jouni Malinen [Tue, 29 Jun 2010 23:29:14 +0000 (16:29 -0700)]
P2P: Add Device Info attribute to Invitation Request
This was added as a mandatory attribute in one of the recent spec
updates.
Jouni Malinen [Tue, 29 Jun 2010 17:45:39 +0000 (10:45 -0700)]
P2P: Add Group Info attr into Probe Response in GO without clients
While there is no real value in this, the spec seems to mark this
attribute as mandatory from GO, so better included it regardless
of whether we have clients or not (the attribute is empty in case
no clients are connected).
Jouni Malinen [Tue, 29 Jun 2010 05:11:39 +0000 (22:11 -0700)]
P2P: Add test command for filtering which peers are discovered
"wpa_cli p2p_set peer_filter <MAC address>" can now be used to
only allow a single P2P Device (based on P2P Device Address) to be
discovered for testing. Setting the address to 00:00:00:00:00:00
disables the filter.
Jouni Malinen [Tue, 29 Jun 2010 03:44:01 +0000 (20:44 -0700)]
P2P: Add test mode for SD to force fragmented response
Jouni Malinen [Mon, 28 Jun 2010 21:32:17 +0000 (14:32 -0700)]
P2P: Fix country string mismatch validation off-by-one offset
0x04 was being checked from incorrect location when skipping country
code validation.
Jouni Malinen [Mon, 28 Jun 2010 16:24:17 +0000 (09:24 -0700)]
P2P: Initial support for SD fragmentation (GAS Comeback Request/Response)
Jouni Malinen [Mon, 28 Jun 2010 06:26:47 +0000 (23:26 -0700)]
P2P: Fix memory leak in SD service entries
Need to flush stored service entries when wpa_supplicant is being
terminated.
Jouni Malinen [Sun, 27 Jun 2010 18:46:44 +0000 (11:46 -0700)]
P2P: Rename SD info not available define to match with spec change
Jouni Malinen [Sun, 27 Jun 2010 07:27:08 +0000 (00:27 -0700)]
P2P: Stop early when processing not-persistent invitation result
Jouni Malinen [Sun, 27 Jun 2010 07:13:14 +0000 (00:13 -0700)]
P2P: Fix Group ID in Invitation Request from active GO
Need to get P2P Device Address, not the Interface Address.
Jouni Malinen [Sun, 27 Jun 2010 07:11:42 +0000 (00:11 -0700)]
P2P: Add command for pre-authorizing an invitation to an active group
This is mainly designed for testing and allows p2p_connect join auth
to be used to accept a specific invitation to an active group that
may be received in the future.
Jouni Malinen [Sun, 27 Jun 2010 05:49:41 +0000 (22:49 -0700)]
P2P: Set Device Password ID in WPS M1/M2 per new rules
If the P2P client (WPS Enrollee) uses a PIN from the GO (Registrar),
Device Password ID in M1 & M2 is set to Registrar-specified.
Jouni Malinen [Sat, 26 Jun 2010 23:20:57 +0000 (16:20 -0700)]
P2P: Run a scan before provision discovery in p2p_connect join
This is needed to make sure we have fresh BSS information for the GO.
Jouni Malinen [Thu, 24 Jun 2010 06:04:21 +0000 (23:04 -0700)]
P2P: Implement power save configuration
wpa_cli p2p_set ps <0/1/2>
wpa_cli p2p_set oppps <0/1>
wpa_cli p2p_set ctwindow <0..> msec
Jouni Malinen [Thu, 24 Jun 2010 05:37:27 +0000 (22:37 -0700)]
P2P: Handle p2p_scan tracking in SEARCH state
Previously, only the initial p2p_scan was used to delay starting new
P2P operations. However, this should have applied to the SEARCH state
scans, too.
Jouni Malinen [Thu, 24 Jun 2010 04:51:38 +0000 (21:51 -0700)]
P2P: Do not schedule new remain-on-channel if waiting for drv event
The driver event for remain-on-channel may be delayed in a way that
allows management-frame-received event to be received before
wpa_supplicant knows that the driver is actually already on the
previously requested channel. We should not request a new
remain-on-channel to send a response to just a frame if we are waiting
for the driver to get to the same channel. Instead, just continue
waiting for the driver event.
Jouni Malinen [Wed, 23 Jun 2010 03:08:14 +0000 (20:08 -0700)]
P2P: Fix infinite loop on interface selection for Action frame TX
When the first wpa_supplicant interface is not the correct one for
transmitting an Action frame (e.g., P2P Presence Request frame
uses a group interface), the code got stuck in an infinite busy
loop. Fix the iteration to go through the interfaces properly.
Jouni Malinen [Sun, 18 Jul 2010 21:30:26 +0000 (14:30 -0700)]
P2P: Add preliminary P2P Manager AP support for hostapd
Jouni Malinen [Sun, 18 Jul 2010 21:30:26 +0000 (14:30 -0700)]
P2P: wpa_qui-qt4: Add P2P functionality into the GUI
Jouni Malinen [Sun, 18 Jul 2010 21:30:26 +0000 (14:30 -0700)]
P2P: Document new control interface commands and events
Jouni Malinen [Sun, 18 Jul 2010 21:30:26 +0000 (14:30 -0700)]
P2P: wpa_cli action calls for P2P group started/removed events
Jouni Malinen [Sun, 18 Jul 2010 21:30:26 +0000 (14:30 -0700)]
wpa_cli: Add P2P commands
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add disassociation/deauthentication IE notifications
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add group notification from (re)association request
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Map driver events to P2P event notifications
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Show P2P info in ctrl_iface scan results
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Show P2P Device Address in wpa_cli status
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add control interface commands for P2P
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Optimize scan timeouts for group formation
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add P2P IE into (Re)Association Request frames
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add P2P IE into Probe Request frames
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Use PSK format in WPS Credential
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Let the driver wrapper know if association is for P2P group
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add group notifications
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add P2P configuration and callbacks in hostapd code
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add initial version of P2P Module
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Preparations for adding P2P IE into Beacon/Probe Response frames