libeap.git
13 years agoDisable AP PIN on all interfaces controlled by the same process
Jouni Malinen [Fri, 8 Oct 2010 14:24:58 +0000 (17:24 +0300)]
Disable AP PIN on all interfaces controlled by the same process

When a single hostapd process is used to manage multiple interfaces,
disable AP PIN on all interfaces if an attack is detected on any
interface.

13 years agoApply hostapd WPS commands to all interfaces on concurrent APs
Jouni Malinen [Fri, 8 Oct 2010 14:15:16 +0000 (17:15 +0300)]
Apply hostapd WPS commands to all interfaces on concurrent APs

When the same hostapd process is controlling multiple interfaces,
apply WPS commands (push button, add PIN, change AP PIN) to all
interfaces that are configured to use WPS.

13 years agoFix .gitignore files to not ignore subdirectory matches
Jouni Malinen [Thu, 7 Oct 2010 08:04:16 +0000 (11:04 +0300)]
Fix .gitignore files to not ignore subdirectory matches

The previous used .gitignore files were mathing some files that
were actually already in the repository (e.g.,
hostapd/logwatch/hostapd). Avoid this by listing the conflicting
entries in the root directory .gitignore with full path.

13 years agoAllow a postfix to be defined for the version number
Jouni Malinen [Thu, 7 Oct 2010 07:51:04 +0000 (10:51 +0300)]
Allow a postfix to be defined for the version number

A separate build number (etc.) version number postfix can now be
added to the build without having to modify source code files by
defining VERSION_STR_POSTFIX. This can be done, e.g., by adding
following line to .config:

CFLAGS += -DVERSION_STR_POSTFIX=\"-foo\"

13 years agoFix wpa_supplicant build without CONFIG_WPS and CONFIG_AP
Ben Greear [Thu, 7 Oct 2010 07:41:58 +0000 (10:41 +0300)]
Fix wpa_supplicant build without CONFIG_WPS and CONFIG_AP

13 years agoFix AP mode in wpa_supplicant with interface events
Johannes Berg [Wed, 6 Oct 2010 14:10:07 +0000 (17:10 +0300)]
Fix AP mode in wpa_supplicant with interface events

Needs to not trigger a scan here when the AP mode setup sets
interface down/up.

13 years agoFix wpa_supplicant AP mode with WPS not to crash
Jouni Malinen [Wed, 6 Oct 2010 13:46:43 +0000 (16:46 +0300)]
Fix wpa_supplicant AP mode with WPS not to crash

Commit 3379a3a795803335b3f464f34a15f06843369fb1 added a direct
iface->for_each_interface use without verification whether the
function is available. This works with hostapd, but not
wpa_supplicant (which crashes on segfault).

13 years agoFix build with CONFIG_WPS_OOB
Jouni Malinen [Wed, 6 Oct 2010 13:40:20 +0000 (16:40 +0300)]
Fix build with CONFIG_WPS_OOB

13 years agoFix AP mode 40 MHz pri/sec channel parsing in overlap determination
Jouni Malinen [Wed, 6 Oct 2010 11:09:44 +0000 (14:09 +0300)]
Fix AP mode 40 MHz pri/sec channel parsing in overlap determination

The previous implementation ended up incorrectly assuming that all
40 MHz use cases have secondary channel above the primary one. Fix this
by properly masking the secondary channel offset field and checking its
value.

13 years agoPreparations for 0.7.3 release
Jouni Malinen [Tue, 7 Sep 2010 16:48:50 +0000 (19:48 +0300)]
Preparations for 0.7.3 release

13 years agowext: Fix scan result signal levels when driver reports in dBm
David A Benjamin [Sun, 5 Sep 2010 16:04:10 +0000 (19:04 +0300)]
wext: Fix scan result signal levels when driver reports in dBm

wpa_supplicant showed signal levels incorrectly with some drivers:
Jun  6 16:29:36 rupert wpa_supplicant[18945]: Current BSS: 00:0d:97:11:40:d6
level=190
Jun  6 16:29:36 rupert wpa_supplicant[18945]: Selected BSS: 00:0d:97:11:50:09
level=192

Judging from output from other tools (iwlist) and the min_diff block
at the end of wpa_supplicant_need_to_roam, it seems these values
should actually be negative. Specifically, if one treats that number
as a signed char instead of unsigned, everything matches up.

To be honest, I've little to no understanding of wireless, but looking
at the source code for wireless-tools (iw_print_stats in iwlib.c), it
seems that the fields of the iw_quality struct need to be decoded
differently depending on various flags. I guess
src/drivers/driver_wext.c should have similar logic in
wext_get_scan_qual.

I wrote a patch that attempts to replicate some of that logic,
although it may be more complicated than is necessary; I think some of
the complexity is for backwards-compatibility, which might not be
necessary depending on wpa_supplicant's dependencies? In any case, it
is attached. Again, I don't know how any of this works, so it's likely
the patch is a bit off. But I think at least the logic to determine
min_diff in wpa_supplicant_need_to_roam would be more accurate if
level were determined correctly.

13 years agonl80211: Include linux/rtnetlink.h explicitly
Jouni Malinen [Thu, 30 Sep 2010 04:52:51 +0000 (21:52 -0700)]
nl80211: Include linux/rtnetlink.h explicitly

This is needed with libnl-tiny to get various definitions that
get included implicitly with libnl.

13 years agonl80211: Sync the header file with wireless-testing.git
Jouni Malinen [Thu, 30 Sep 2010 04:39:40 +0000 (21:39 -0700)]
nl80211: Sync the header file with wireless-testing.git

13 years agoatheros: Prefer WSC IE in (Re)Association Request frame
Jouni Malinen [Sat, 25 Sep 2010 00:01:03 +0000 (17:01 -0700)]
atheros: Prefer WSC IE in (Re)Association Request frame

This is needed to work properly with WPS stations that may include
both WPA/RSN IE and WSC IE when associating for WPS provisioning.

13 years agoWPS ER: Add more debug info on initialization errors
Jouni Malinen [Fri, 24 Sep 2010 23:05:58 +0000 (16:05 -0700)]
WPS ER: Add more debug info on initialization errors

13 years agoMark ctrl_iface RX debug for PING commands excessive
Jouni Malinen [Fri, 24 Sep 2010 22:50:13 +0000 (15:50 -0700)]
Mark ctrl_iface RX debug for PING commands excessive

This cleans up debug log from unnecessary entries when using
wpa_cli/hostapd_cli or other ctrl_iface monitors that PING
periodically to check connectivity.

13 years agoWPS: Documented wps_er_pin MAC address option
Jouni Malinen [Fri, 24 Sep 2010 22:44:26 +0000 (15:44 -0700)]
WPS: Documented wps_er_pin MAC address option

13 years agoWPS 2.0: Disable WPS if ignore_broadcast_ssid or WEP is used
Jouni Malinen [Fri, 24 Sep 2010 22:17:03 +0000 (15:17 -0700)]
WPS 2.0: Disable WPS if ignore_broadcast_ssid or WEP is used

These combinations are disallowed in WPS 2.0 (and do not work well
(or at all) with many deployed WPS 1.0 devices either).

13 years agoWPS ER: Make sure PIN timeout does not interrupt PBC operation
Jouni Malinen [Thu, 23 Sep 2010 21:45:55 +0000 (14:45 -0700)]
WPS ER: Make sure PIN timeout does not interrupt PBC operation

We need to clear the selected registrar timeout from wps_er_learn
when stopping the protocol run at M7 (previously, this was done only
when WSC_Done was being processed). In addition, we need to cancel
the timeout when a new PBC operation is started.

13 years agoWPS: Add hostapd_cli get_config command
Jouni Malinen [Thu, 23 Sep 2010 19:02:28 +0000 (12:02 -0700)]
WPS: Add hostapd_cli get_config command

This can be used by a WPS UI to display the current AP configuration.

13 years agoWPS: Add wps_check_pin command for processing PIN from user input
Jouni Malinen [Thu, 23 Sep 2010 17:30:52 +0000 (10:30 -0700)]
WPS: Add wps_check_pin command for processing PIN from user input

UIs can use this command to process a PIN entered by a user and to
validate the checksum digit (if present).

13 years agoWPS: Fix hostapd reconfig to update WPS UPnP string pointers
Jouni Malinen [Thu, 23 Sep 2010 02:34:32 +0000 (19:34 -0700)]
WPS: Fix hostapd reconfig to update WPS UPnP string pointers

This is needed to update the pointers maintained within WPS code
to use the new configuration data instead of maintaining pointers
to the old configuration which will be freed. This fixes strings in
UPnP discovery after reconfig (they used to be random freed memory..).

13 years agoWPS: Add more debug details for Credential building
Jouni Malinen [Thu, 23 Sep 2010 02:20:01 +0000 (19:20 -0700)]
WPS: Add more debug details for Credential building

13 years agoWPS ER: Fix debug message for protocol run done case
Jouni Malinen [Thu, 23 Sep 2010 02:19:33 +0000 (19:19 -0700)]
WPS ER: Fix debug message for protocol run done case

This is not a failure and should not be indicated as such in the
debug log.

13 years agoWPS: Fix strict validation of encrypted data for WSC 2.0-only case
Jouni Malinen [Thu, 23 Sep 2010 02:17:13 +0000 (19:17 -0700)]
WPS: Fix strict validation of encrypted data for WSC 2.0-only case

Need to figure out whether the message is from a WSC 2.0 -based
device based on the unencrypted attributes, not the contents of the
encrypted data since the Version2 subelement is only included in the
unencrypted area.

13 years agohostapd: Add virt/phy flag for Display/PushButton if needed (WPS 2.0)
Jouni Malinen [Thu, 23 Sep 2010 00:45:43 +0000 (17:45 -0700)]
hostapd: Add virt/phy flag for Display/PushButton if needed (WPS 2.0)

This seems to be the easiest way of making sure the Config Methods
value is compliant with the WSC 2.0 specification without having
to modify the configuration file. However, this will only add the
virtual flag, so the configuration files should really be updated
to specify values that match the AP design.

13 years agoWPS: Use blacklist more aggressively during WPS provisioning
Jouni Malinen [Wed, 22 Sep 2010 18:50:15 +0000 (11:50 -0700)]
WPS: Use blacklist more aggressively during WPS provisioning

This allows more APs to be tried during the WPS timeout.

13 years agoWPS: Making some parsing messages use excessive debug level
Jouni Malinen [Wed, 22 Sep 2010 18:39:58 +0000 (11:39 -0700)]
WPS: Making some parsing messages use excessive debug level

This makes it easier to read -dd debug logs in environments that
have multiple WPS or P2P devices.

13 years agoWPS: Fix strict validation of (Re)Association Response
Jouni Malinen [Wed, 22 Sep 2010 18:13:18 +0000 (11:13 -0700)]
WPS: Fix strict validation of (Re)Association Response

This frame is supposed to include Response Type, not Request Type
attribute.

13 years agoWPS 2.0: Provide (Re)Association Response WPS IE to driver
Jouni Malinen [Wed, 22 Sep 2010 17:46:44 +0000 (10:46 -0700)]
WPS 2.0: Provide (Re)Association Response WPS IE to driver

WPS 2.0 mandates the AP to include WPS IE in (Re)Association Response
if the matching (Re)Association Request included WPS IE. Provide the
needed WPS IE information to the driver_ops API for drivers that
process association frames internally.

Note: This modifies the driver_ops API by adding a new argument to
set_ap_wps_ie().

13 years agoWPS: Add MAC address to validation error message for Probe Request
Jouni Malinen [Wed, 22 Sep 2010 17:07:20 +0000 (10:07 -0700)]
WPS: Add MAC address to validation error message for Probe Request

This makes it easier to figure out which device is sending invalid
Probe Request frames.

13 years agoWPS: Make testing operations configurable at runtime
Jouni Malinen [Wed, 22 Sep 2010 02:51:23 +0000 (19:51 -0700)]
WPS: Make testing operations configurable at runtime

Instead of build time options (CONFIG_WPS_TESTING_EXTRA_CRED and
CONFIG_WPS_EXTENSIBILITY_TESTING), use a single build option
(CONFIG_WPS_TESTING) and runtime configuration of which testing
operations are enabled. This allows a single binary to be used
for various tests.

The runtime configuration can be done through control interface
with wpa_cli/hostapd_cli commands:
Enable extensibility tests:
set wps_version_number 0x57
Disable extensibility tests (WPS2 build):
set wps_version_number 0x20
Enable extra credential tests:
set wps_testing_dummy_cred 1
Disable extra credential tests:
set wps_testing_dummy_cred 0

13 years agoWPS 2.0: Fix AuthorizedMACs check to accept wildcard address
Jouni Malinen [Wed, 22 Sep 2010 02:36:44 +0000 (19:36 -0700)]
WPS 2.0: Fix AuthorizedMACs check to accept wildcard address

We need to accept both our own address and the ff:ff:ff:ff:ff:ff
as an indication of the AP having authorized us.

13 years agoP2P: Fill in default Config Methods in Invitation Request
Jouni Malinen [Wed, 22 Sep 2010 01:26:01 +0000 (18:26 -0700)]
P2P: Fill in default Config Methods in Invitation Request

If the peer is not authorized for GO Negotiation, wps_method is not
actually set. In that case, it is better to fill in our default
config methods rather than end up leaving the field to be zero.

13 years agoWPS: Fix Beacon WPS IE on concurrent dualband AP in PBC mode
Jouni Malinen [Mon, 20 Sep 2010 22:32:29 +0000 (15:32 -0700)]
WPS: Fix Beacon WPS IE on concurrent dualband AP in PBC mode

The Beacon frame must include UUID-E and RF Bands attributes when
in active PBC mode to allow stations to figure out that two BSSes in
PBC mode is not a PBC session overlap.

13 years agoWPS: Add more verbose debug info on PBC session overlap detection
Jouni Malinen [Mon, 20 Sep 2010 22:08:52 +0000 (15:08 -0700)]
WPS: Add more verbose debug info on PBC session overlap detection

13 years agoWPS: Add BSSID to strict validation error messages
Jouni Malinen [Mon, 20 Sep 2010 21:54:22 +0000 (14:54 -0700)]
WPS: Add BSSID to strict validation error messages

This makes it easier to figure out which AP is sending invalid
Beacon or Probe Response frames.

13 years agoWPS: Use same UUID in multi-interface case
Jouni Malinen [Mon, 20 Sep 2010 21:28:43 +0000 (14:28 -0700)]
WPS: Use same UUID in multi-interface case

When generating the UUID based on MAC address, share the same UUID
with all interfaces. This fixes a potential issue with concurrent
dualband APs where the UUID needs to be same for PBC to work properly.

13 years agoWPS: Fix CONFIG_WPS_OOB build
Jouni Malinen [Mon, 20 Sep 2010 00:18:43 +0000 (17:18 -0700)]
WPS: Fix CONFIG_WPS_OOB build

The Version2 attribute was previous changed to a subelement and
the OOB code was missed during the change.

13 years agoWPS: Cancel WPS operation on PBC session overlap detection
Jouni Malinen [Mon, 20 Sep 2010 00:04:04 +0000 (17:04 -0700)]
WPS: Cancel WPS operation on PBC session overlap detection

Previously, wpa_supplicant remaining in scanning state without
trying to connect, but there is no particular need to do that.
Instead, cancel WPS operation completely whenever PBC session
overlap is detected.

13 years agoEAP-pwd: Fix couple of memory leaks
Jouni Malinen [Wed, 15 Sep 2010 08:16:17 +0000 (22:16 -1000)]
EAP-pwd: Fix couple of memory leaks

13 years agoEAP-pwd: Move bnctx into per-protocol instance structure
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.

13 years agoEAP-pwd: Add support for EAP-pwd server and peer functionality
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.

13 years agoAllow auto-connect to request scan in associating state
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.

13 years agoP2P: Add option for disabling intra BSS distribution
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).

13 years agoAdd option for disabling automatic reconnection on disconnection
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.

13 years agoP2P: Fix invitation_received callback to use NULL bssid (if not known)
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.

13 years agoP2P: Do not process configuration changes on non-P2P interfaces
Kuko Li [Tue, 7 Sep 2010 14:08:52 +0000 (17:08 +0300)]
P2P: Do not process configuration changes on non-P2P interfaces

13 years agoP2P: Make sure parsed Device Name gets null terminated
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).

13 years agoP2P: Stop connection attempt on PBC session overlap
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.

13 years agoP2P: Use group formation timeout (but longer one) with join-a-group
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.

13 years agoP2P: Add peer timeout into group formation 15 second timeout
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.

13 years agoWPS: Allow pending WPS operation to be cancelled
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.

13 years agoP2P: Provide local event on GO Neg Req rejection
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).

13 years agoWPS: Fix timeout event to be sent over ctrl_interface
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.

13 years agoP2P: Process Invitation Request from previously unknown peer
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.

13 years agoAllow bssid parameter to be cleared through ctrl_interface
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.

13 years agowpa_cli action: Add WPS_EVENT_SUCCESS and WPS_EVENT_FAIL handlers
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

13 years agoP2P: Add frequency into group started ctrl_interface events
Ardong Chen [Mon, 6 Sep 2010 13:57:19 +0000 (16:57 +0300)]
P2P: Add frequency into group started ctrl_interface events

13 years agoP2P: Add peer entry based on Provision Discovery Request
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.

13 years agoFix build without CONFIG_P2P=y
Jouni Malinen [Thu, 9 Sep 2010 14:20:28 +0000 (07:20 -0700)]
Fix build without CONFIG_P2P=y

13 years agoP2P: Use SSID from GO Negotiation to limit WPS provisioning step
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.

13 years agoP2P: Deinit GO group data before global P2P deinit
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().

13 years agoP2P: Use operating frequency from peer table as backup for join
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.

13 years agoP2P: Fix connect-to-running-group if Action TX status is delayed
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.

13 years agoP2P: Add a workaround for Extended Listen Timing getting stuck
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.

13 years agoP2P: Add some more debug information for Action frame TX
Jouni Malinen [Tue, 3 Aug 2010 03:53:56 +0000 (20:53 -0700)]
P2P: Add some more debug information for Action frame TX

13 years agoP2P: Clear pending Action TX frame on p2p_stop_find and p2p_listen
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.

13 years agoP2P: Fix cross connection allowed parser to use correct field
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.

13 years agoP2P: Allow P2P IE without Device Info in (Re)Assoc Req
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.

13 years agoAdd test command for disabling/enabling A-MPDU aggregation
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.

13 years agoP2P: For now, do not use channels 12-14 in P2P groups
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.

13 years agoP2P: Add an example p2p-action script for udhcpc/udhcpd
Jouni Malinen [Fri, 30 Jul 2010 01:35:26 +0000 (18:35 -0700)]
P2P: Add an example p2p-action script for udhcpc/udhcpd

13 years agoCopy WPS strings into AP configuration when using wpa_supplicant AP
Jouni Malinen [Fri, 30 Jul 2010 00:25:54 +0000 (17:25 -0700)]
Copy WPS strings into AP configuration when using wpa_supplicant AP

13 years agoTrigger WPS configuration update on string changes
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.

13 years agoP2P: Avoid segfault on AP deinit after failed AP start
Jouni Malinen [Thu, 29 Jul 2010 23:41:14 +0000 (16:41 -0700)]
P2P: Avoid segfault on AP deinit after failed AP start

13 years agoP2P: Fix code order to avoid potential NULL pointer dereference
Jouni Malinen [Thu, 29 Jul 2010 23:20:02 +0000 (16:20 -0700)]
P2P: Fix code order to avoid potential NULL pointer dereference

13 years agoP2P: Fix P2P IE generation for AssocReq when BSS info is not available
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.

13 years agoP2P: Allow driver wrapper to indicate how many stations are supported
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.

13 years agoFix AP mode wps_pin command to return the entered PIN
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.

13 years agoP2P: Add mechanism for configuring UAPSD parameters for group
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

13 years agoP2P: Fix build after WSC 2.0 change to use WFA vendor extension
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

13 years agoWPS: Fix ER PBC overlap detection build with P2P changes
Jouni Malinen [Thu, 29 Jul 2010 17:44:11 +0000 (10:44 -0700)]
WPS: Fix ER PBC overlap detection build with P2P changes

13 years agoP2P: Fix GAS fragmentation to match with IEEE 802.11u
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.

13 years agoP2P: Add Device Password ID to GO Neg Request RX event
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

13 years agoP2P: Fix p2p_connect join with interface address
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.

13 years agoP2P: Add support for cross connection
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.

13 years agoP2P: Add defined values for P2P Manageability Bitmap
Jouni Malinen [Sat, 10 Jul 2010 15:59:19 +0000 (08:59 -0700)]
P2P: Add defined values for P2P Manageability Bitmap

13 years agoP2P: Fix device discoverability to not wait before sending GO Neg Req
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.

13 years agoP2P: Disable periodic NoA when non-P2P STA is connected
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.

13 years agoP2P: Include P2P IE in (Re)AssocReq to infra AP if it uses P2P IE
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.

13 years agoP2P: Include Extended Listen Timing attribute in (Re)AssocReq
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.

13 years agoP2P: Add forgotten allow_cross_connection example
Jouni Malinen [Wed, 7 Jul 2010 03:44:47 +0000 (20:44 -0700)]
P2P: Add forgotten allow_cross_connection example

13 years agoTrigger scan on reload-config only if there are enabled networks
Jouni Malinen [Wed, 7 Jul 2010 03:37:52 +0000 (20:37 -0700)]
Trigger scan on reload-config only if there are enabled networks

13 years agoP2P: Wait on operating channel between invitation requests
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.

13 years agoP2P: Fix invitation to active group to use correct operating 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.

13 years agoWPS: Fix configuration strings on config reload
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.

13 years agoP2P: Use 'Enrollee info' WPS request type in P2P scans
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.

13 years agoP2P: Fix WSC IE not to include two Device Name attrs with 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

13 years agoP2P: Fix channel forcing for p2p_connect auth
Jouni Malinen [Fri, 2 Jul 2010 15:27:00 +0000 (08:27 -0700)]
P2P: Fix channel forcing for p2p_connect auth