libeap.git
13 years agoP2P: Save a copy of P2P IE(s) data from (Re)Association Request
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Save a copy of P2P IE(s) data from (Re)Association Request

13 years agoP2P: Do not register l2_packet on dedicated P2P device interface
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Do not register l2_packet on dedicated P2P device interface

13 years agoP2P: Add TODO note for Group Formation bit use in AP selection
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Add TODO note for Group Formation bit use in AP selection

13 years agoP2P: Remove 802.11b rates from wpa_supplicant AP mode operations
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Remove 802.11b rates from wpa_supplicant AP mode operations

TODO: do this only for P2P group interface

13 years agoP2P: Use config block with disabled==2 to store persistent groups
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
P2P: Use config block with disabled==2 to store persistent groups

13 years agonl80211: Add P2P operations
Jouni Malinen [Sun, 18 Jul 2010 21:30:25 +0000 (14:30 -0700)]
nl80211: Add P2P operations

13 years agodriver_test: Add functionality for allowing P2P testing
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
driver_test: Add functionality for allowing P2P testing

13 years agoP2P: Add driver operations for P2P use
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Add driver operations for P2P use

13 years agoP2P: Do not save temporary networks
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Do not save temporary networks

13 years agoP2P: Do not filter BSSes based on SSID during P2P Provisioning
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Do not filter BSSes based on SSID during P2P Provisioning

TODO: Use group id from GO Neg instead(?)

13 years agoP2P: Let WPS code know if it is used in a P2P group
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Let WPS code know if it is used in a P2P group

13 years agoP2P: Add global configuration parameters for P2P
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Add global configuration parameters for P2P

13 years agoP2P: Add dynamic network config block parameters for P2P
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Add dynamic network config block parameters for P2P

13 years agoP2P: Do no process Probe Request with P2P wildcard SSID in WPS
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Do no process Probe Request with P2P wildcard SSID in WPS

The Probe Request frames used in P2P Device Discovery should not be
processed by the WPS implementation.

13 years agoP2P: Enable use of WPS Requested Device Type without WPS 2.0
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Enable use of WPS Requested Device Type without WPS 2.0

13 years agoP2P: Add Device Name into WPS IE in Probe Request frames
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Add Device Name into WPS IE in Probe Request frames

13 years agoMake IEEE 802.11 IE parser aware of P2P IE
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
Make IEEE 802.11 IE parser aware of P2P IE

This does not handle fragmented IEs and is only used to check quickly
whether the IE blob includes any P2P IE(s).

13 years agoP2P: Wi-Fi Direct frame format definitions
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
P2P: Wi-Fi Direct frame format definitions

13 years agoAllow ctrl_iface SET command to change global config parameters
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
Allow ctrl_iface SET command to change global config parameters

13 years agoAdd flag indicating which global configuration parameters have changed
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
Add flag indicating which global configuration parameters have changed

13 years agoMove global configuration parser into config.c
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
Move global configuration parser into config.c

This makes it easier to provide support for dynamic updates of the
global configuration parameters while wpa_supplicant is running.

13 years agoWPS 2.0: Convert new attributes into WFA vendor extension
Jouni Malinen [Thu, 29 Jul 2010 17:23:20 +0000 (10:23 -0700)]
WPS 2.0: Convert new attributes into WFA vendor extension

The WSC 2.0 specification moved to use another design for the new
attributes to avoid backwards compatibility issues with some
deployed implementations.

13 years agoWPS 2.0: Fix strict mode validation of UPnP MAC Address format
Jouni Malinen [Thu, 22 Jul 2010 20:29:52 +0000 (13:29 -0700)]
WPS 2.0: Fix strict mode validation of UPnP MAC Address format

This was supposed to only reject the message from WPS 2.0 ER, not from
WPS 1.0 ER.

13 years agoWPS: Make fragment size configurable for EAP-WSC peer
Jouni Malinen [Thu, 22 Jul 2010 17:24:23 +0000 (10:24 -0700)]
WPS: Make fragment size configurable for EAP-WSC peer

"wpa_cli set wps_fragment_size <val>" can now be used to configure the
fragment size limit for EAP-WSC.

13 years agoWPS: Add more debug prints for authorized MACs operations
Jouni Malinen [Thu, 22 Jul 2010 16:37:22 +0000 (09:37 -0700)]
WPS: Add more debug prints for authorized MACs operations

13 years agoWPS ER: Use PBC overlap detection
Jouni Malinen [Thu, 22 Jul 2010 02:19:53 +0000 (19:19 -0700)]
WPS ER: Use PBC overlap detection

ER should follow same rules as internal Registrar in an AP for
session overlap detection.

13 years agoWPS 2.0: Only reject Probe Request frames from WPS 2.0 devices
Jouni Malinen [Thu, 22 Jul 2010 02:13:31 +0000 (19:13 -0700)]
WPS 2.0: Only reject Probe Request frames from WPS 2.0 devices

13 years agoWPS 2.0: By default, use strict validation reject only with WPS 2.0
Jouni Malinen [Wed, 21 Jul 2010 05:18:17 +0000 (22:18 -0700)]
WPS 2.0: By default, use strict validation reject only with WPS 2.0

13 years agoWPS: Fix CONFIG_WPS_STRICT build option
Jouni Malinen [Wed, 21 Jul 2010 05:15:06 +0000 (22:15 -0700)]
WPS: Fix CONFIG_WPS_STRICT build option

This was not supposed to be depending on CONFIG_WPS_NFC.

13 years agoWPS: Fix strict validation to mandate Network Index attribute
Jouni Malinen [Wed, 21 Jul 2010 05:14:00 +0000 (22:14 -0700)]
WPS: Fix strict validation to mandate Network Index attribute

While this attribute is is now deprecated, it is still required
for backwards compatibility. Better check this if strict validation
is enabled.

13 years agoWPS 2.0: Use strict validation of NewWLANEventMAC only with WPS 2.0
Jouni Malinen [Wed, 21 Jul 2010 05:07:52 +0000 (22:07 -0700)]
WPS 2.0: Use strict validation of NewWLANEventMAC only with WPS 2.0

This avoids some testing issues with WPS 1.0 implementations while
maintaining strict validation for WPS 2.0 implementations.

13 years agoWPS ER: Do not use SetSelectedRegistrar when learning/configuring AP
Jouni Malinen [Wed, 21 Jul 2010 05:06:28 +0000 (22:06 -0700)]
WPS ER: Do not use SetSelectedRegistrar when learning/configuring AP

13 years agoWPS 2.0: Make sure PHY/VIRT flag gets set for PBC
Jouni Malinen [Mon, 19 Jul 2010 05:53:15 +0000 (22:53 -0700)]
WPS 2.0: Make sure PHY/VIRT flag gets set for PBC

13 years agoWPS 2.0: Add strict validation of SetSelectedRegistrar attributes
Jouni Malinen [Mon, 19 Jul 2010 01:54:58 +0000 (18:54 -0700)]
WPS 2.0: Add strict validation of SetSelectedRegistrar attributes

13 years agoWPS 2.0: Add wildcard AuthorizedMACs if Enrollee address is not known
Jouni Malinen [Sun, 18 Jul 2010 01:12:00 +0000 (18:12 -0700)]
WPS 2.0: Add wildcard AuthorizedMACs if Enrollee address is not known

13 years agoWPS 2.0: Make WSC 2.0 support to be build option (CONFIG_WPS2)
Jouni Malinen [Fri, 18 Jun 2010 01:35:18 +0000 (18:35 -0700)]
WPS 2.0: Make WSC 2.0 support to be build option (CONFIG_WPS2)

For now, the default build will only include WSC 1.0 support.
CONFIG_WPS2=y can be used to add support for WSC 2.0.

13 years agoWPS 2.0: Add tool for testing protocol extensibility
Jouni Malinen [Fri, 11 Jun 2010 05:25:51 +0000 (22:25 -0700)]
WPS 2.0: Add tool for testing protocol extensibility

This is disabled by default and can be enabled by defining
CONFIG_WPS_EXTENSIBILITY_TESTING.

13 years agoWPS: Add a test mechanism for adding an extra credential into M8
Jouni Malinen [Fri, 4 Jun 2010 06:34:34 +0000 (23:34 -0700)]
WPS: Add a test mechanism for adding an extra credential into M8

This can be used to build a test version of ER that adds an extra
Credential attribute into M8.

13 years agoWPS 2.0: Validate WPS attributes in management frames and WSC messages
Jouni Malinen [Wed, 26 May 2010 14:16:14 +0000 (17:16 +0300)]
WPS 2.0: Validate WPS attributes in management frames and WSC messages

If CONFIG_WPS_STRICT is set, validate WPS IE(s) in management frames and
reject the frames if any of the mandatory attributes is missing or if an
included attribute uses an invalid value. In addition, verify that all
mandatory attributes are included and have valid values in the WSC
messages.

13 years agoatheros: Use larger buffer for WSC IE changes
Jouni Malinen [Fri, 4 Jun 2010 06:35:34 +0000 (23:35 -0700)]
atheros: Use larger buffer for WSC IE changes

This resolves issues in updating Beacon/Probe Response frame IEs
in a case where the value may be long enough to get fragmented
into multiple IEs.

13 years agoWPS 2.0: Ignore WEP Credentials as station Enrollee
Jouni Malinen [Sat, 29 May 2010 19:19:33 +0000 (22:19 +0300)]
WPS 2.0: Ignore WEP Credentials as station Enrollee

Ignore Credential if it is for a WEP network. Reject the message if
no valid Credential is found.

13 years agoWPS 2.0: Enforce new security policy of received AP Settings
Jouni Malinen [Sat, 29 May 2010 09:41:15 +0000 (12:41 +0300)]
WPS 2.0: Enforce new security policy of received AP Settings

When receiving new AP Settings from ER, reject WEP configuration
and upgrade WPA-Personal/TKIP only to mixed mode (i.e., add
WPA2-Personal/CCMP).

13 years agoWPS 2.0: Fix Probe Request WPS IE building to be able to fragment data
Jouni Malinen [Wed, 26 May 2010 16:11:55 +0000 (19:11 +0300)]
WPS 2.0: Fix Probe Request WPS IE building to be able to fragment data

If all the device information attributes use their maximum lengths,
a single WPS IE is not enough to fit in all the data and as such,
we must be able to fragment the data. In addition, the wpabuf needs
to be allocated larger to fit in maximum data.

13 years agoWPS 2.0: Disable WPS workarounds if CONFIG_WPS_STRICT is defined
Jouni Malinen [Wed, 26 May 2010 08:16:54 +0000 (11:16 +0300)]
WPS 2.0: Disable WPS workarounds if CONFIG_WPS_STRICT is defined

13 years agoWPS 2.0: Modify empty-string workaround to meet 2.0 rules
Jouni Malinen [Wed, 26 May 2010 06:46:48 +0000 (09:46 +0300)]
WPS 2.0: Modify empty-string workaround to meet 2.0 rules

Instead of using 0x00 as the extra character, use space (' ') to
avoid failing tests that verify that the variable length string
attributes are not null terminated. In addition, this workaround
can now be disabled by defining CONFIG_WPS_STRICT for the build.
This can be done by adding following line to .config:
CFLAGS += -DCONFIG_WPS_STRICT

However, it should be noted that such a build may not interoperate
with some deployed WPS 1.0 -based implementations and as such, is
mainly designed for testing.

13 years agoWPS 2.0: Add virtual/physical display and pushbutton config methods
Jouni Malinen [Tue, 22 Dec 2009 23:21:12 +0000 (01:21 +0200)]
WPS 2.0: Add virtual/physical display and pushbutton config methods

13 years agoWPS 2.0: Add device attributes into Probe Request
Jouni Malinen [Tue, 22 Dec 2009 23:10:25 +0000 (01:10 +0200)]
WPS 2.0: Add device attributes into Probe Request

Add Manufacturer, Model Name, Model Number, and Device Name attributes
into the WSC IE in the Probe Request frames.

13 years agoWPS 2.0: Add Request to Enroll attribute into Probe Request
Jouni Malinen [Tue, 22 Dec 2009 23:03:15 +0000 (01:03 +0200)]
WPS 2.0: Add Request to Enroll attribute into Probe Request

Whenever wpa_supplication is using Request Type Enrollee, it is trying
to enroll into a network. Indicate this with the explicit inclusion of
Request to Enroll attribute with value TRUE.

13 years agoWPS 2.0: Add support for AuthorizedMACs attribute
Jouni Malinen [Sat, 12 Dec 2009 14:40:10 +0000 (16:40 +0200)]
WPS 2.0: Add support for AuthorizedMACs attribute

Advertize list of authorized enrollee MAC addresses in Beacon and
Probe Response frames and use these when selecting the AP. In order
to provide the list, the enrollee MAC address should be specified
whenever adding a new PIN. In addition, add UUID-R into
SetSelectedRegistrar action to make it potentially easier for an AP
to figure out which ER sent the action should there be multiple ERs
using the same IP address.

13 years agoWPS 2.0: Add new attributes and update version negotiation
Jouni Malinen [Fri, 11 Dec 2009 16:00:10 +0000 (18:00 +0200)]
WPS 2.0: Add new attributes and update version negotiation

This adds definitions and parsing of the new attributes that were added
in WPS 2.0. In addition, the version negotiation is updated to use the
new mechanism, i.e., accept everything received and use the new Version2
attribute in transmitted messages.

13 years agobgscan learn: Fix build
Jouni Malinen [Thu, 9 Sep 2010 12:59:06 +0000 (05:59 -0700)]
bgscan learn: Fix build

Commit 9ff80a10e8009c0dc65a4b7e08dcf1655cd2a483 forgot to include the
new scan variable in the coded copied from bgscan_simple.c. Add that
here to fix the build.

13 years agoIndicate Barker Preamble Mode in ERP IE also based on local configuration
Jouni Malinen [Sun, 5 Sep 2010 10:11:42 +0000 (13:11 +0300)]
Indicate Barker Preamble Mode in ERP IE also based on local configuration

While this is not strictly speaking required based on dynamic
configuration (i.e., dot11ShortPreambleOptionImplemented is static
value based on implementation, not runtime configuration), it is better
to follow local configuration parameter for short preamble in addition
to the associated station capabilities.

13 years agoatheros: Fix driver deinit function to be run
Jouni Malinen [Sun, 5 Sep 2010 10:04:03 +0000 (13:04 +0300)]
atheros: Fix driver deinit function to be run

hostapd uses hapd_deinit(), not deinit() wpa_driver_ops.

13 years agoatheros: Deinit l2_packet sock_xmit on error path
Jouni Malinen [Sun, 5 Sep 2010 10:03:26 +0000 (13:03 +0300)]
atheros: Deinit l2_packet sock_xmit on error path

13 years agoFix segfault in hostapd_eid_ht_capabilities() with some drivers
Jouni Malinen [Sun, 5 Sep 2010 09:47:16 +0000 (12:47 +0300)]
Fix segfault in hostapd_eid_ht_capabilities() with some drivers

This function is not really needed in case of drivers that build the
HT IEs internally. However, since this can get called if ieee80211n=1
is set in hostapd.conf, we better not segfault even if the driver
does not provide hw info (hapd->iface->current_mode == NULL).

13 years agoFix hostapd build with CONFIG_IEEE80211N but without NEED_AP_MLME
Jouni Malinen [Sun, 5 Sep 2010 09:41:15 +0000 (12:41 +0300)]
Fix hostapd build with CONFIG_IEEE80211N but without NEED_AP_MLME

13 years agoWPS: Fix hostapd build without CONFIG_WPS_UPNP
Jouni Malinen [Sun, 5 Sep 2010 09:34:04 +0000 (12:34 +0300)]
WPS: Fix hostapd build without CONFIG_WPS_UPNP

Commit 5a1cc30f1a04eb19d315680928927651024e172e added code that was
assuming CONFIG_WPS_UPNP is enabled whenever CONFIG_WPS is. Fix this
by making the UPnP calls conditional on CONFIG_WPS_UPNP define.

13 years agodbus: Verify WPA/RSN IE parser result before returning data
Jouni Malinen [Sat, 4 Sep 2010 19:01:29 +0000 (22:01 +0300)]
dbus: Verify WPA/RSN IE parser result before returning data

13 years agowpa_supplicant AP: Make sure deauth/disassoc event is valid
Jouni Malinen [Sat, 4 Sep 2010 18:50:12 +0000 (21:50 +0300)]
wpa_supplicant AP: Make sure deauth/disassoc event is valid

Verify that the driver wrapper is using a valid deauth/disassoc
event before dereferencing the addr pointer. The address is required
to be set in AP mode, but it is safer to verify this here than to
trust on all driver wrappers doing the correct thing.

13 years agoWPS: Use more defensive design to avoid theoretical NULL deref
Jouni Malinen [Sat, 4 Sep 2010 18:37:36 +0000 (21:37 +0300)]
WPS: Use more defensive design to avoid theoretical NULL deref

Prior to commit 6195adda9b4306cda2b06b930c59c95832d026a9 the sm->user
dereference did not exist here. While this is in practice non-NULL,
better use more defensive construction here to avoid NULL pointer
dereference should this ever change.

13 years agowpa_gui-qt4: Update copyright years to include 2010
Jouni Malinen [Sat, 4 Sep 2010 14:39:33 +0000 (17:39 +0300)]
wpa_gui-qt4: Update copyright years to include 2010

13 years agoUpdate WinPcap to the latest stable version 4.1.2
Jouni Malinen [Sat, 4 Sep 2010 14:37:57 +0000 (17:37 +0300)]
Update WinPcap to the latest stable version 4.1.2

13 years agoNDIS: Fix association for WPS provisioning with protected AP
Jouni Malinen [Sat, 4 Sep 2010 10:56:12 +0000 (13:56 +0300)]
NDIS: Fix association for WPS provisioning with protected AP

Some NDIS drivers require a workaround to allow them to associate
with a WPS AP that is already using protection (Privacy field = 1).
Let driver_ndis.c know if the AP is already using Privacy and if so,
configure a dummy WEP key to force the driver to associate.

13 years agoAdd libgcc_s_dw2-1.dll to the Windows installation package
Jouni Malinen [Sat, 4 Sep 2010 09:55:55 +0000 (12:55 +0300)]
Add libgcc_s_dw2-1.dll to the Windows installation package

This seems to be needed for wpa_gui.exe with the new Qt version.

13 years agol2_packet_ndis: Fix overlapped write not to corrupt stack
Jouni Malinen [Thu, 2 Sep 2010 10:23:14 +0000 (13:23 +0300)]
l2_packet_ndis: Fix overlapped write not to corrupt stack

When using overlapped write, we must have the provided memory
areas available during the operation and cannot just use stack
unless we wait for the completion within the function. In the case
of TX here, we can easily wait for the completion since it is likely
to happen immediately. In addition, this provides more reliable
success/failure return value for l2_packet_send(). [Bug 328]

13 years agowinreg: Get rid of compiler warning
Jouni Malinen [Thu, 2 Sep 2010 10:22:52 +0000 (13:22 +0300)]
winreg: Get rid of compiler warning

13 years agohostapd: enable STBC only for STBC capable STAs
Helmut Schaa [Sat, 28 Aug 2010 09:25:44 +0000 (12:25 +0300)]
hostapd: enable STBC only for STBC capable STAs

hostapd simply used its own STBC configuration in the STA's HT caps. This
resulted in TX STBC being used for STAs not supporting RX STBC, which in
turn resulted in the STA not receiving anything.

Fix this by handling the STBC flags in the same way mac80211 does. Mask
out RX STBC if we don't support TX STBC and vice versa.

Tested only with the nl80211 driver and a STBC incapable STA.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
13 years agoFix BSS selection with multiple configured networks
Jouni Malinen [Sat, 28 Aug 2010 09:04:21 +0000 (12:04 +0300)]
Fix BSS selection with multiple configured networks

Commit d8d940b7469e505aec4d71a02d3f7ebab412eeae broke the logic on
iterating through all configured network blocks. This was supposed
to continue the loop on mismatch to allow other than the first
configured network to be found.

13 years agoSolaris: Add support for wired IEEE 802.1X client
Masashi Honma [Sat, 28 Aug 2010 08:40:07 +0000 (11:40 +0300)]
Solaris: Add support for wired IEEE 802.1X client

This patch adds support for wired IEEE 802.1X client on the Solaris.

I have tested with these:
OS : OpenSolaris 2009.06
EAP : EAP-MD5
Switch : Cisco Catalyst 2950

13 years agobgscan learn: Skip immediate scan on initial signal event
Jouni Malinen [Fri, 27 Aug 2010 17:30:19 +0000 (20:30 +0300)]
bgscan learn: Skip immediate scan on initial signal event

The driver is likely to indicate an immediate signal event when the
threshold value is configured. Since we do this immediately after
association, there is not much point in requesting a new scan to be
started based on this event.

13 years agobgscan simple: Skip immediate scan on initial signal event
Jouni Malinen [Fri, 27 Aug 2010 17:29:02 +0000 (20:29 +0300)]
bgscan simple: Skip immediate scan on initial signal event

The driver is likely to indicate an immediate signal event when the
threshold value is configured. Since we do this immediately after
association, there is not much point in requesting a new scan to be
started based on this event.

13 years agoMerge WPA and non-WPA network selection routines
Jouni Malinen [Fri, 27 Aug 2010 17:05:49 +0000 (20:05 +0300)]
Merge WPA and non-WPA network selection routines

This removes quite a bit of duplicated code and allows network block
priority configuration to be used to prefer unprotected networks and
also allows use on open network with good signal strength even if
scan results show a protected network with marginal signal strength
that does not allow it to be used.

13 years agoAdd current signal strength into signal quality change events
Jouni Malinen [Fri, 27 Aug 2010 13:58:06 +0000 (16:58 +0300)]
Add current signal strength into signal quality change events

13 years agotrace: Fix void pointer arithmetic
Masashi Honma [Thu, 26 Aug 2010 15:35:55 +0000 (18:35 +0300)]
trace: Fix void pointer arithmetic

The arithmetic on void pointer exists in trace routine. On GNU C, it
works because void pointer size is 1, but not all compilers behave like
this. So this patch specifies the size of the pointer.

13 years agoShare common code in wpa_supplicant_{disassociate,deauthenticate}()
Jouni Malinen [Thu, 26 Aug 2010 10:43:38 +0000 (13:43 +0300)]
Share common code in wpa_supplicant_{disassociate,deauthenticate}()

13 years agoCancel authentication timeout on local deauth/disassoc request
Jouni Malinen [Thu, 26 Aug 2010 10:39:58 +0000 (13:39 +0300)]
Cancel authentication timeout on local deauth/disassoc request

Without this, the timeout may be left behind even when we are not
connected and may result in unwanted operation when the timeout
triggers.

13 years agoRemove unused ieee802_11_send_deauth()
Jouni Malinen [Wed, 25 Aug 2010 18:18:54 +0000 (21:18 +0300)]
Remove unused ieee802_11_send_deauth()

13 years agoWPS: Optimize M2 processing in AP Setup Locked case
Jouni Malinen [Tue, 24 Aug 2010 13:42:26 +0000 (16:42 +0300)]
WPS: Optimize M2 processing in AP Setup Locked case

There is no need to process the public key and generate keys if
the AP is going to reject this M2 anyway. This limits effect of
potential CPU DoS attacks in cases where AP PIN is disabled.

13 years agoWPS: Add support for dynamic AP PIN management
Jouni Malinen [Tue, 24 Aug 2010 13:35:37 +0000 (16:35 +0300)]
WPS: Add support for dynamic AP PIN management

A new hostapd_cli command, wps_ap_pin, can now be used to manage
AP PIN at runtime. This can be used to generate a random AP PIN and
to only enable the AP PIN for short period (e.g., based on user
action on the AP device). Use of random AP PIN that is only enabled
for short duration is highly recommended to avoid security issues
with a static AP PIN.

13 years agoWPS: Do not disable AP PIN permanently, only slow down attacks
Jouni Malinen [Tue, 24 Aug 2010 12:24:05 +0000 (15:24 +0300)]
WPS: Do not disable AP PIN permanently, only slow down attacks

As a compromise between usability and security, do not disable
AP PIN permanently based on failed PIN validations. Instead, go to
AP Setup Locked state for increasing amount of time between each
failure to slow down brute force attacks against the AP PIN.

This avoids problems with some external Registrars that may try
to use the same PIN multiple times without user input. Now, the
user will still be able to fix the PIN and try again later while
a real attack is delayed enough to make it impractical.

13 years agoWPS: Use WSC_NACK if no device password is known on M2 RX
Jouni Malinen [Tue, 24 Aug 2010 09:56:11 +0000 (12:56 +0300)]
WPS: Use WSC_NACK if no device password is known on M2 RX

This can happen on the AP if the AP PIN is not configured and
the client tries to go through the protocol instead of just using
Registrar mode to receive M1 from the AP. It is cleaner to send
out the WSC_NACK instead of just stopping the protocol.

13 years agoWPS: Fix unused variable warning
Masashi Honma [Fri, 20 Aug 2010 06:44:50 +0000 (09:44 +0300)]
WPS: Fix unused variable warning

The wpa_supplicant compilation without CONFIG_WPS option results in
messages below.

scan.c: In function 'wpa_supplicant_scan':
scan.c:246: warning: unused variable 'wps'

This trivial patch erases this warning.

13 years agoEAP-FAST server: Add I-ID into PAC-Info
Jouni Malinen [Thu, 19 Aug 2010 18:16:19 +0000 (21:16 +0300)]
EAP-FAST server: Add I-ID into PAC-Info

This indicates that the peer identity is associated with the
credential and will be required to match with the identity used
during authentication when the PAC is used (RFC 5422, 4.2.4).

13 years agodbus: Deauthenticate instead of disassociate on disconnect command
Jouni Malinen [Wed, 18 Aug 2010 18:27:30 +0000 (21:27 +0300)]
dbus: Deauthenticate instead of disassociate on disconnect command

This clears up authentication state in the driver and in case of
cfg80211, unlocks the BSS entry for the previously used AP. The
previous commit cf4783e35fb4861181c275a3dbd607b58c7d4067 changed
only the ctrl_iface DISCONNECT command behavior; this new commit
does the same for D-Bus commands.

13 years agosme: Check for prev_bssid from sme_event_disassoc
Samuel Ortiz [Wed, 18 Aug 2010 18:23:26 +0000 (21:23 +0300)]
sme: Check for prev_bssid from sme_event_disassoc

wpa_s->bssid is already cleared by mark_disassoc() when we're getting the
disassociation event for the case where wpa_supplicant requested
disassociation. wpa_s->sme.prev_bssid holds the BSSID we need to check
for, so use that instead.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoAdd more debug info on deauth/disassoc events and commands
Jouni Malinen [Tue, 17 Aug 2010 18:04:38 +0000 (21:04 +0300)]
Add more debug info on deauth/disassoc events and commands

13 years agoFix memory leak in AP WEP key configuration
Jouni Malinen [Tue, 17 Aug 2010 18:04:07 +0000 (21:04 +0300)]
Fix memory leak in AP WEP key configuration

13 years agosme: Try all authentication algorithms when the first one fails
Samuel Ortiz [Tue, 17 Aug 2010 13:39:33 +0000 (16:39 +0300)]
sme: Try all authentication algorithms when the first one fails

When passing several authentication algorithms through auth_alg, we
should try all of them when the first one fails. The wext driver goes
through the connect nl80211 command and the retries are then handled by
the kernel. The nl80211 doesn't and we have to handle that from
userspace.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agonl80211: Ignore "DEAUTH" messages from APs we are not associated to
Paul Stewart [Mon, 16 Aug 2010 18:27:26 +0000 (21:27 +0300)]
nl80211: Ignore "DEAUTH" messages from APs we are not associated to

DEAUTH messages can come from a number of different sources. The one
that's hurting us currently is DEAUTH netlink messages coming to us
from compat-wireless in response to local_state_change DEAUTH messages
we sent as a part of cleaning up state in driver_nl80211's
clear_state_mismatch() function. However, DEAUTH messages can come
from a variety of unwanted sources, including directed denial-of-service
attacks (although MAC verification doesn't place that high a barrier),
so this validation is actually generically useful, I think.

The downside to this method is that without a kernel based approach
"iw dev wlan0 link" no longer works correctly after clear_state_mismatch()
is done.  This will be pursued with the kernel folks.

13 years agoFix RSN preauth candidate list clearing to avoid segfaults
Daniel Gryniewicz [Sat, 14 Aug 2010 16:01:14 +0000 (19:01 +0300)]
Fix RSN preauth candidate list clearing to avoid segfaults

Commit c5b26e33c1829c62c3b5872865ca202f6c42436e broke the processing
of the candidate list entries when an old entry was either removed or
reused. The entry needs to be removed from the list to avoid leaving
pointers to freed memory.

http://bugs.gentoo.org/show_bug.cgi?id=330085
http://w1.fi/bugz/show_bug.cgi?id=372

13 years agonl80211: Don't pass ctx to wpa_driver_nl80211_init_nl
Johannes Berg [Wed, 11 Aug 2010 09:55:51 +0000 (11:55 +0200)]
nl80211: Don't pass ctx to wpa_driver_nl80211_init_nl

Currently, we don't use the sock_ctx that we get passed by eloop, so
don't assign it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agonl80211: Remove unused pending_send_action
Johannes Berg [Wed, 11 Aug 2010 10:20:51 +0000 (12:20 +0200)]
nl80211: Remove unused pending_send_action

This variable is assigned only once and never tested, so basically
unused.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoAdd a mechanism to insert notes to wpa_supplicant debug log
Jouni Malinen [Wed, 4 Aug 2010 16:11:32 +0000 (09:11 -0700)]
Add a mechanism to insert notes to wpa_supplicant debug log

This can be used to insert information from external programs to the
wpa_supplicant debug log.

13 years agoWPS: Make DH debug prints easier to understand
Jouni Malinen [Sun, 27 Jun 2010 04:06:44 +0000 (21:06 -0700)]
WPS: Make DH debug prints easier to understand

13 years agonl80211: Show remain-on-channel duration in debug output
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
nl80211: Show remain-on-channel duration in debug output

13 years agonl80211: Try mode changes multiple times to avoid some races
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
nl80211: Try mode changes multiple times to avoid some races

cfg80211/mac80211 seems to be unwilling to change interface mode in
some cases. Make these less likely to cause problems by trying the
changes up to 10 times with 100 msec intervals.

13 years agowpa_cli: Clean up redrawing and filter out BSS added/removed events
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
wpa_cli: Clean up redrawing and filter out BSS added/removed events

13 years agoWPS: Allow AP to start in Enrollee mode without AP PIN for probing
Jouni Malinen [Tue, 27 Jul 2010 01:12:08 +0000 (18:12 -0700)]
WPS: Allow AP to start in Enrollee mode without AP PIN for probing

In theory, this should not really be needed, but Windows 7 uses
Registrar mode to probe AP's WPS capabilities before trying to use
Enrollee and fails if the AP does not allow that probing to happen.
This allows the AP to start as an Enrollee and send M1, but refuse
to continue beyond that (M3 will not be sent if AP PIN is not known).

13 years agoFT: Send RRB data directly when managed by same hostapd process
Jouni Malinen [Mon, 26 Jul 2010 03:30:12 +0000 (20:30 -0700)]
FT: Send RRB data directly when managed by same hostapd process

This makes it easier (and a bit faster) to handle multiple local
radios with FT. There is no need to depend on l2_packet in that
case since the frame can be delivered as a direct function call.

13 years agoWPS: Limit WPS ER event_id < 2^31 bits to avoid issues with atoi()
Jouni Malinen [Tue, 20 Jul 2010 01:53:57 +0000 (18:53 -0700)]
WPS: Limit WPS ER event_id < 2^31 bits to avoid issues with atoi()

Previously, large event_id values (> 2^31) resulted in integer
overflow that would make ER drop all events from the AP.