mech_eap.git
12 years agoAdd SSID as a separate item in AP mode Beacon setup
Jouni Malinen [Wed, 10 Aug 2011 10:29:32 +0000 (13:29 +0300)]
Add SSID as a separate item in AP mode Beacon setup

This makes it easier for drivers that need the SSID to get it from the
Beacon setup operation without having to parse the Beacon IEs.

12 years agoReplace set_beacon() driver op with set_ap()
Jouni Malinen [Wed, 10 Aug 2011 10:22:37 +0000 (13:22 +0300)]
Replace set_beacon() driver op with set_ap()

This change is a first step in better supporting different driver
architectures for AP mode operations with nl80211. This commit in
itself does not add new functionality, but it makes it easier to add
new AP mode parameters to address needs of drivers that have more of
the MLME/SME in firmware or kernel.

12 years agonl80211: Fix hostapd build
Jouni Malinen [Tue, 9 Aug 2011 20:32:26 +0000 (23:32 +0300)]
nl80211: Fix hostapd build

12 years agoAP: Reorder WPA/Beacon initialization
Jouni Malinen [Tue, 9 Aug 2011 11:56:16 +0000 (14:56 +0300)]
AP: Reorder WPA/Beacon initialization

Split WPA initialization into two parts so that the Beacon frames can be
configured fully before the initial keys (GTK/IGTK) are configured. This
makes it easier for drivers that depend on the AP security mode being
fully set before the keys are configured.

12 years agoWPS: Do not update Beacon IEs before initial IE set
Jouni Malinen [Tue, 9 Aug 2011 11:40:06 +0000 (14:40 +0300)]
WPS: Do not update Beacon IEs before initial IE set

This avoids a request to the driver to first start beaconing before
the WPA/RSN IE has been generated and then immediately changing the
beacon IEs once the WPA/RSN IE is ready.

12 years agonl80211: Add l2_packet for AP mode EAPOL TX without monitor iface
Jouni Malinen [Tue, 9 Aug 2011 11:04:53 +0000 (14:04 +0300)]
nl80211: Add l2_packet for AP mode EAPOL TX without monitor iface

This can be used with drivers that do not support monitor interface
when transmitting EAPOL frames in AP mode.

12 years agonl80211: Do not include NL80211_ATTR_DURATION in TX frame if zero
Jouni Malinen [Tue, 9 Aug 2011 11:01:31 +0000 (14:01 +0300)]
nl80211: Do not include NL80211_ATTR_DURATION in TX frame if zero

When offloading of the offchannel TX wait is not used, it is better to
not include NL80211_ATTR_DURATION to avoid confusing nl80211/cfg80211.

12 years agonl80211: Fix connect command to not claim WPA if WPS is used
Jouni Malinen [Tue, 9 Aug 2011 10:59:43 +0000 (13:59 +0300)]
nl80211: Fix connect command to not claim WPA if WPS is used

Such using params->wpa_ie to figure out whether the connection is for
WPA/WPA2 is not correct since that buffer is used also to add WPS IE. In
case of WPS, do not add NL80211_ATTR_WPA_VERSIONS to avoid confusing
drivers.

12 years agonl80211: Add more debug information on frame TX command failures
Jouni Malinen [Tue, 9 Aug 2011 10:59:12 +0000 (13:59 +0300)]
nl80211: Add more debug information on frame TX command failures

12 years agodbus: Do not segfault if P2P is disabled
Dan Williams [Fri, 29 Jul 2011 19:59:54 +0000 (14:59 -0500)]
dbus: Do not segfault if P2P is disabled

Various pieces of the P2P code assume that P2P is enabled, so make
the D-Bus code not call the P2P stuff if P2P is disabled. Also
ensures that if P2P is disabled a suitable error is returned to
the D-Bus caller.

Signed-off-by: Dan Williams <dcbw@redhat.com>
12 years agodbus: Remove separate access variable from properties
Jouni Malinen [Sun, 7 Aug 2011 08:16:05 +0000 (11:16 +0300)]
dbus: Remove separate access variable from properties

The read, write, read-write permissions can be figured out from
getter/setter function pointers, so there is no need for maintaining
that information separately.

12 years agowpa_supplicant AP: Enable uapsd in P2P GO mode if go_apsd was set
Eliad Peller [Sun, 31 Jul 2011 18:45:05 +0000 (21:45 +0300)]
wpa_supplicant AP: Enable uapsd in P2P GO mode if go_apsd was set

If uapsd is explicitly enabled, set conf->bss->wmm_enabled and
conf->bss->wmm_uapsd to enable (and advertise) uapsd.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
12 years agoDBus/P2P: Return Primary and Secondary device types as bytes
Jayant Sane [Sat, 6 Aug 2011 18:34:11 +0000 (21:34 +0300)]
DBus/P2P: Return Primary and Secondary device types as bytes

These properties are already correctly treated as bytes for the local
device, we need to do same for peers.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
12 years agorandom: Check fwrite return value to avoid warnings
Jouni Malinen [Sat, 6 Aug 2011 18:16:31 +0000 (21:16 +0300)]
random: Check fwrite return value to avoid warnings

Some compilers complain about fwrite calls if the return value is
not checked, so check the value even if it does not really make
much of a difference in this particular case.

12 years agoTLS: Reorder certificates if needed when reading them
Jouni Malinen [Thu, 4 Aug 2011 19:39:03 +0000 (22:39 +0300)]
TLS: Reorder certificates if needed when reading them

The internal TLS implementation assumes that the certificate chain
is ordered by issuer certificate following the certificate that it
signed. Add the certificates to the chain in suitable order when
loading multiple certificates.

12 years agoDispatch more WPS events through hostapd ctrl_iface
Anish Nataraj [Thu, 4 Aug 2011 13:56:41 +0000 (16:56 +0300)]
Dispatch more WPS events through hostapd ctrl_iface

12 years agoP2P: Fix 802.11b-only rate validation for Probe Request frames
Jouni Malinen [Tue, 2 Aug 2011 08:18:03 +0000 (11:18 +0300)]
P2P: Fix 802.11b-only rate validation for Probe Request frames

Commit e1d526293b27f5123777e695750a0d38bdfe936a added code for verifying
whether the receive Probe Request frame was indicating support for only
802.11b rates, but it missed the for loop for the extended supported
rates element. Add that to fix the validation code for cases where
non-802.11b rates are in the extended supported rates element.

12 years agoClarify hostapd error message on unsupported hw_mode value
Jouni Malinen [Sat, 30 Jul 2011 21:51:34 +0000 (00:51 +0300)]
Clarify hostapd error message on unsupported hw_mode value

12 years agoChange example hostapd.conf to use 2.4 GHz channel
Jouni Malinen [Sat, 30 Jul 2011 21:47:49 +0000 (00:47 +0300)]
Change example hostapd.conf to use 2.4 GHz channel

This is more likely to work if someone tests the example file with
no or minimal changes.

12 years agodbus: clean up new D-Bus interface getters and setters
Dan Williams [Fri, 29 Jul 2011 18:25:39 +0000 (21:25 +0300)]
dbus: clean up new D-Bus interface getters and setters

A number of fixes/improvements here:

1) Remove casting of getter/setter function types which allows
us to change the prototypes in the future and not have hard-to-find
runtime segfaults

2) Instead of having the getters create a fake reply message which
then gets its arguments copied into the real reply message, and is
then disposed, just pass message iters around and have them add
their arguments to the message itself

3) For setters, just pass in the message iter positioned at the
start of the argument list, instead of each setter having to skip
over the standard interface+property name

4) Convert error handling to use DBusError and return the error
back down through the call stacks to the function that will
actually send the error back to the caller, instead of having a
fake DBusMessage of type DBUS_MESSAGE_TYPE_ERROR that then
needs to have the error extracted from it.

But most of all, this fixes various segfaults (like rh #725517
and #678625) which were caused by some functions deep down in the
getter callpaths wanting a source DBusMessage* when the getters were
used for two things: signals (which don't have a source DBusMessage)
and methods (which will have a source DBusMessage that's being
replied to).  This duality made the code fragile when handling
errors like invalid IEs over the air.

Signed-off-by: Dan Williams <dcbw@redhat.com>
12 years agomadwifi: Implement set_freq for hostapd, adjust hostapd.conf
Pavel Roskin [Fri, 29 Jul 2011 17:49:45 +0000 (20:49 +0300)]
madwifi: Implement set_freq for hostapd, adjust hostapd.conf

Signed-off-by: Pavel Roskin <proski@gnu.org>
12 years agohostap: Remove unused variable in handle_frame()
Pavel Roskin [Fri, 29 Jul 2011 17:43:10 +0000 (20:43 +0300)]
hostap: Remove unused variable in handle_frame()

Signed-off-by: Pavel Roskin <proski@gnu.org>
12 years agohostap: Add channel selection support in hostapd
Pavel Roskin [Fri, 29 Jul 2011 17:39:32 +0000 (20:39 +0300)]
hostap: Add channel selection support in hostapd

Signed-off-by: Pavel Roskin <proski@gnu.org>
12 years agoIncrease maximum number of SSIDs per scan with ProbeReq to 10
Dmitry Shmidt [Tue, 19 Jul 2011 05:55:46 +0000 (08:55 +0300)]
Increase maximum number of SSIDs per scan with ProbeReq to 10

12 years agoFix hostapd_cli linking without CONFIG_WPA_TRACE=y
Vladimir [Tue, 19 Jul 2011 05:45:33 +0000 (08:45 +0300)]
Fix hostapd_cli linking without CONFIG_WPA_TRACE=y

12 years agoAdd CONFIG_IEEE80211N to wpa_supplicant defconfig
Jouni Malinen [Mon, 18 Jul 2011 18:34:25 +0000 (21:34 +0300)]
Add CONFIG_IEEE80211N to wpa_supplicant defconfig

This is needed for AP mode functionality with some drivers.

12 years agoP2P: Set p2p auth/assoc parameter based on connection type
Jouni Malinen [Sun, 17 Jul 2011 17:52:49 +0000 (20:52 +0300)]
P2P: Set p2p auth/assoc parameter based on connection type

Fix the previous code that was hardcoding the p2p parameter based
on the driver P2P capability regardless of whether the connection
was really used for P2P or not.

12 years agonl80211: Change vif type to P2P_CLI upon P2P authentication
Eliad Peller [Sun, 17 Jul 2011 17:25:58 +0000 (20:25 +0300)]
nl80211: Change vif type to P2P_CLI upon P2P authentication

Currently, wpa_driver_nl80211_authenticate() changes the interface type
to station. However, in case of P2P, we need to change the interface
type to P2P_CLI.

Add p2p field to the authentication params, and consider it for choosing
the correct interface type.

Signed-off-by: Eliad Peller <eliad@wizery.com>
12 years agonl80211: Consider P2P when changing vif type
Eliad Peller [Sun, 17 Jul 2011 17:22:11 +0000 (20:22 +0300)]
nl80211: Consider P2P when changing vif type

Commit 9f51b11395646efeb5d6a75d2cabc0bf7626496f added support for P2P
interfaces when adding a new interface. However, it didn't handle the
case in which the same interface is being used and its type is being
changed. Add support for this case.

Consequently, when doing "ap_scan_as_station" we now need to save the
actual AP interface type (AP/P2P GO) in order to restore it properly.
For that, change ap_scan_as_station type from int to nl80211_iftype, and
set it to NL80211_IFTYPE_UNSPECIFED when not used.

Signed-off-by: Eliad Peller <eliad@wizery.com>
12 years agonl80211: Do not re-set iftype when initializing added interface
Jouni Malinen [Sun, 17 Jul 2011 17:03:25 +0000 (20:03 +0300)]
nl80211: Do not re-set iftype when initializing added interface

There is no need to force the interface into station mode when
wpa_supplicant adds a new interface (e.g., P2P group) with the correct
iftype.

12 years agonl80211: Add more debug info for iftype changes
Jouni Malinen [Sun, 17 Jul 2011 16:47:41 +0000 (19:47 +0300)]
nl80211: Add more debug info for iftype changes

12 years agonl80211: Ignore ifdown event if mode change triggered it
Jouni Malinen [Sun, 17 Jul 2011 10:56:34 +0000 (13:56 +0300)]
nl80211: Ignore ifdown event if mode change triggered it

When driver_nl80211.c has to set the netdev down to change iftype, an
RTM_NEWLINK event is generated. Do not generate
EVENT_INTERFACE_DISABLED event based on that.

12 years agohostapd_cli: Start using src/utils/edit*.c
Jouni Malinen [Sat, 16 Jul 2011 14:37:18 +0000 (17:37 +0300)]
hostapd_cli: Start using src/utils/edit*.c

This brings hostapd_cli closer to the design used in wpa_cli
and allows command history and editing mechanisms to be added.

12 years agoDeauthenticate on reconfiguration
Jouni Malinen [Sat, 16 Jul 2011 13:57:11 +0000 (16:57 +0300)]
Deauthenticate on reconfiguration

This makes sure that the old connection is not maintained if the new
configuration does not allow it anymore. In addition, it is better to
use wpa_supplicant_clear_connection() instead of just clearing
wpa_s->current_ssid here to keep things in sync.

12 years agoDrop oldest unknown BSS table entries first
Jouni Malinen [Sat, 16 Jul 2011 10:22:58 +0000 (13:22 +0300)]
Drop oldest unknown BSS table entries first

When the BSS table size limit has been reached, drop first the oldest
BSS entries for which there is not a matching network in the
configuration based on SSID (wildcards are ignored). This makes it
less likely to hit connection issues in environments with huge number
of visible APs.

12 years agoFT: Share IE parser implementation for Authenticator and Supplicant
Jouni Malinen [Sat, 16 Jul 2011 08:13:39 +0000 (11:13 +0300)]
FT: Share IE parser implementation for Authenticator and Supplicant

These are almost identical, so there is no point in using separate
implementations.

12 years agoFT: Fix FT IE parser to not count TIE as protected IE
Jouni Malinen [Sat, 16 Jul 2011 08:05:28 +0000 (11:05 +0300)]
FT: Fix FT IE parser to not count TIE as protected IE

12 years agoFT: Fix the calculation of MIC Control field in FTIE
Hong Wu [Sat, 16 Jul 2011 07:57:17 +0000 (10:57 +0300)]
FT: Fix the calculation of MIC Control field in FTIE

Reassociation Request/Response frame validation need to count all IEs in
the RIC. In addition, TIE is not protected, so it should not be included
in the count.

Signed-off-by: Hong Wu <hong.wu@dspg.com>
12 years agoP2P: Do not reply to Probe Request frame indicating only 802.11b rates
Jouni Malinen [Fri, 15 Jul 2011 18:49:50 +0000 (21:49 +0300)]
P2P: Do not reply to Probe Request frame indicating only 802.11b rates

Per P2P specification 2.4.1, P2P Device shall shall not respond to
Probe Request frames that indicate support for only 802.11b rates.

12 years agoP2P: Check Device ID match in Probe Request frames in Listen state
Jouni Malinen [Fri, 15 Jul 2011 17:48:06 +0000 (20:48 +0300)]
P2P: Check Device ID match in Probe Request frames in Listen state

Do not reply to Probe Request frames that include a Device ID that
does not match with our own P2P Device Address.

12 years agoP2P: Filter Probe Request frames based on DA and BSSID in Listen state
Jouni Malinen [Fri, 15 Jul 2011 17:25:53 +0000 (20:25 +0300)]
P2P: Filter Probe Request frames based on DA and BSSID in Listen state

Only accept Probe Request frames that have a Wildcard BSSID and a
destination address that matches with our P2P Device Address or is the
broadcast address per P2P specification 3.1.2.1.1.

12 years agoCheck random_get_bytes() result before writing entropy file
Jouni Malinen [Fri, 15 Jul 2011 14:17:48 +0000 (17:17 +0300)]
Check random_get_bytes() result before writing entropy file

12 years agoP2P: Fix p2p_intra_bss with nl80211
Johannes Berg [Fri, 15 Jul 2011 14:13:44 +0000 (17:13 +0300)]
P2P: Fix p2p_intra_bss with nl80211

The current implementation of p2p_intra_bss doesn't work since the flag
isn't propagated into the corresponding hostapd config, so AP code will
never enable AP isolation and will in fact disable it again after it had
been enabled by the P2P code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoP2P: Remove unused SearchOnly parameter from D-Bus p2p_find
Jouni Malinen [Fri, 15 Jul 2011 13:59:05 +0000 (16:59 +0300)]
P2P: Remove unused SearchOnly parameter from D-Bus p2p_find

12 years agoP2P: Fix memory leak in D-Bus p2p_find handler
Jouni Malinen [Fri, 15 Jul 2011 13:33:21 +0000 (16:33 +0300)]
P2P: Fix memory leak in D-Bus p2p_find handler

12 years agoP2P: Coding style cleanup
Jouni Malinen [Fri, 15 Jul 2011 11:41:01 +0000 (14:41 +0300)]
P2P: Coding style cleanup

12 years agoP2P: Fix error path not to build error message twice
Jouni Malinen [Fri, 15 Jul 2011 11:40:04 +0000 (14:40 +0300)]
P2P: Fix error path not to build error message twice

12 years agoP2P: Clear entry.key to avoid use of uninitialized value on error path
Jouni Malinen [Fri, 15 Jul 2011 11:39:07 +0000 (14:39 +0300)]
P2P: Clear entry.key to avoid use of uninitialized value on error path

12 years agoWPS: Check malloc success on workaround path
Jouni Malinen [Fri, 15 Jul 2011 11:21:50 +0000 (14:21 +0300)]
WPS: Check malloc success on workaround path

ssid->ssid could be NULL here if malloc failed, so better check that
consistently.

12 years agoP2P: Use consistent checking of ssid != NULL
Jouni Malinen [Fri, 15 Jul 2011 11:20:31 +0000 (14:20 +0300)]
P2P: Use consistent checking of ssid != NULL

12 years agoP2P: Coding style cleanup for D-Bus handlers
Jouni Malinen [Fri, 15 Jul 2011 11:18:29 +0000 (14:18 +0300)]
P2P: Coding style cleanup for D-Bus handlers

12 years agoP2P: Fix D-Bus error path (potential NULL pointer deref)
Jouni Malinen [Fri, 15 Jul 2011 11:03:41 +0000 (14:03 +0300)]
P2P: Fix D-Bus error path (potential NULL pointer deref)

The paths pointer could have been NULL when going through the shared
freeing path in error case. Avoid the NULL pointer dereference by
checking whether that is the case. In addition, remove unnecessary
gotos to make the function more readable.

12 years agoP2P: Remove dead code from wpas_p2p_connect()
Jouni Malinen [Fri, 15 Jul 2011 10:57:31 +0000 (13:57 +0300)]
P2P: Remove dead code from wpas_p2p_connect()

The case of joining a running group is handled before this location
and the P2P client iftype is assigned at a callback function for that
case.

12 years agoMD5: Fix clearing of temporary stack memory to use correct length
Jouni Malinen [Fri, 15 Jul 2011 10:42:06 +0000 (13:42 +0300)]
MD5: Fix clearing of temporary stack memory to use correct length

sizeof of the structure instead of the pointer was supposed to be used
here. Fix this to clear the full structure at the end of MD5Final().

12 years agowpa_supplicant: Edit BINDIR in dbus and systemd service files
Henry Gebhardt [Fri, 15 Jul 2011 09:25:02 +0000 (12:25 +0300)]
wpa_supplicant: Edit BINDIR in dbus and systemd service files

This is useful, since in Gentoo BINDIR=/usr/sbin.

12 years agowpa_supplicant: Add systemd support
Henry Gebhardt [Fri, 15 Jul 2011 09:13:40 +0000 (12:13 +0300)]
wpa_supplicant: Add systemd support

12 years agonl80211: fix interface address assignment
Johannes Berg [Fri, 15 Jul 2011 09:05:19 +0000 (12:05 +0300)]
nl80211: fix interface address assignment

When a new interface is created and already has a separate MAC address
assigned by the kernel, then we need to use that address, not just when
we've created a locally administered address.

This fixes use_p2p_group_interface=1 for iwlagn as it already makes
mac80211 assign an address for a second interface since the hardware has
two addresses assigned.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agonl80211: Support GTK rekey offload
Johannes Berg [Tue, 12 Jul 2011 18:22:51 +0000 (21:22 +0300)]
nl80211: Support GTK rekey offload

Add support to wpa_supplicant for device-based GTK rekeying. In order to
support that, pass the KEK, KCK, and replay counter to the driver, and
handle rekey events that update the latter.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoSync with linux/nl80211.h from wireless-testing.git
Jouni Malinen [Tue, 12 Jul 2011 17:53:32 +0000 (20:53 +0300)]
Sync with linux/nl80211.h from wireless-testing.git

12 years agonl80211: Send STA flags to kernel on station addition
Arik Nemtsov [Tue, 12 Jul 2011 17:28:31 +0000 (20:28 +0300)]
nl80211: Send STA flags to kernel on station addition

Send STA flags to kernel when adding a new station. This ensures
stations are added with up to date flags by kernel drivers.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
12 years agohostapd: Set STA flags when adding a new station
Arik Nemtsov [Tue, 12 Jul 2011 17:26:52 +0000 (20:26 +0300)]
hostapd: Set STA flags when adding a new station

When adding a new station, set the STA flags as part of the sta_add()
command. This ensures the flags are up to date when the station is added
by lower level drivers.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
12 years agoFix non D-Bus builds by removing 'void void' in return value
Mikael Wikström [Tue, 12 Jul 2011 12:39:33 +0000 (15:39 +0300)]
Fix non D-Bus builds by removing 'void void' in return value

12 years agoFT: Clear SME ft_used/ft_ies when disconnecting
Hong Wu [Tue, 5 Jul 2011 18:17:31 +0000 (21:17 +0300)]
FT: Clear SME ft_used/ft_ies when disconnecting

Previous ft_ies needs to be removed before supplicant starts a new FT
initial association and this requires the ft_used state to be cleared
here.

Signed-off-by: Hong Wu <hong.wu@dspg.com>
12 years agoFT: Disable PMKSA cache for FT-IEEE8021X
Hong Wu [Tue, 5 Jul 2011 17:49:51 +0000 (20:49 +0300)]
FT: Disable PMKSA cache for FT-IEEE8021X

wpa_supplicant uses XXKEY instead of PMK to derive PMK-R0 and PMK-R1 for
FT-IEEE8021X key mgmt.

Signed-off-by: Hong Wu <hong.wu@dspg.com>
12 years agoAllow PMKSA caching to be disabled on Authenticator
Jouni Malinen [Tue, 5 Jul 2011 14:13:04 +0000 (17:13 +0300)]
Allow PMKSA caching to be disabled on Authenticator

A new hostapd configuration parameter, disable_pmksa_caching=1, can now
be used to disable PMKSA caching on the Authenticator. This forces the
stations to complete EAP authentication on every association when WPA2
is being used.

12 years agowpa_s AP mode: Enable HT20 if driver supports it
Angie Chinchilla [Tue, 5 Jul 2011 13:49:28 +0000 (16:49 +0300)]
wpa_s AP mode: Enable HT20 if driver supports it

If the driver supports HT20, set the config parameter ieee80211n
to enable it. This does not enable HT40.

Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
12 years agowpa_supplicant AP: Disable AP mode on disassoc paths
Jouni Malinen [Tue, 5 Jul 2011 13:38:30 +0000 (16:38 +0300)]
wpa_supplicant AP: Disable AP mode on disassoc paths

Regardless of how the AP mode is disabled, wpa_supplicant_ap_deinit()
must be called. Make sure this happens on all paths by calling the
deinit function from wpa_supplicant_mark_disassoc().

12 years agoMove peer certificate wpa_msg() calls to notify.c
Jouni Malinen [Tue, 5 Jul 2011 09:40:37 +0000 (12:40 +0300)]
Move peer certificate wpa_msg() calls to notify.c

This type of wpa_supplicant specific message construction does not need
to be at the EAP implementation, so better move it up to notify.c.

12 years agoAdd dbus signal for information about server certification
Michael Chang [Tue, 5 Jul 2011 09:22:32 +0000 (12:22 +0300)]
Add dbus signal for information about server certification

In general, this patch attemps to extend commit
00468b4650998144f794762206c695c962c54734 with dbus support.

This can be used by dbus client to implement subject match text
entry with preset value probed from server. This preset value, if
user accepts it, is remembered and passed to subject_match config
for any future authentication.

Signed-off-by: Michael Chang <mchang@novell.com>
12 years agohostapd: Clear keys configured when hostapd reloads configuration
Yogesh Ashok Powar [Tue, 5 Jul 2011 08:39:26 +0000 (11:39 +0300)]
hostapd: Clear keys configured when hostapd reloads configuration

Data path is broken when hostapd reloads its configuration
disabling the security which was previously enabled (WEP/WPA),
using kill -1, as old keys were not cleared.

The patch clears the keys configured when hostapd reloads
its configuration.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
12 years agoTLS: Add support for tls_disable_time_checks=1 in client mode
Jouni Malinen [Tue, 5 Jul 2011 08:29:42 +0000 (11:29 +0300)]
TLS: Add support for tls_disable_time_checks=1 in client mode

This phase1 parameter for TLS-based EAP methods was already supported
with GnuTLS and this commit extends that support for OpenSSL and the
internal TLS implementation.

12 years agowpa_supplicant: Respect PKG_CONFIG variable if set in the environment
Paul Stewart [Mon, 4 Jul 2011 17:35:38 +0000 (20:35 +0300)]
wpa_supplicant: Respect PKG_CONFIG variable if set in the environment

This is required for cross-compilation support on certain
platforms to avoid changing the pkg-config files themselves.

Signed-off-by: David James <davidjames@chromium.org>
Signed-off-by: Paul Stewart <pstew@chromium.org>
12 years agowpa_cli: Add missing parameter for P2P_GROUP_ADD command
Marcin Klimczewski [Mon, 4 Jul 2011 17:32:15 +0000 (20:32 +0300)]
wpa_cli: Add missing parameter for P2P_GROUP_ADD command

Both freq and persistent parameters of P2P_GROUP_ADD could be passed at
one time.

12 years agoP2P: Only call dev_lost() for devices that have been dev_found()
Angie Chinchilla [Mon, 4 Jul 2011 17:30:16 +0000 (20:30 +0300)]
P2P: Only call dev_lost() for devices that have been dev_found()

Fix a bug with the current dev_found()/dev_lost() usage. Previously
in p2p_device_free() dev_lost() was invoked for devices that had
not been dev_found(). This caused dbus related msgs to stderr like:
"Attempted to unregister path (path[0] = fi path[1] = w1) which isn't
registered"

Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
12 years agoDBus/P2P: Rectified type of SecondaryDeviceTypes in device property Get
Jayant Sane [Mon, 4 Jul 2011 17:27:53 +0000 (20:27 +0300)]
DBus/P2P: Rectified type of SecondaryDeviceTypes in device property Get

To be consistent with what it expected in corresponding Set property as
byte[][].

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agoDBus/P2P: Adding decl for PersistentGroupRemoved signal
Jayant Sane [Mon, 4 Jul 2011 17:24:45 +0000 (20:24 +0300)]
DBus/P2P: Adding decl for PersistentGroupRemoved signal

Minor - for completeness sake.

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agonl80211: Process association/disassociation events in AP mode
Jouni Malinen [Fri, 1 Jul 2011 15:44:09 +0000 (18:44 +0300)]
nl80211: Process association/disassociation events in AP mode

This allows non-mac80211 drivers that implement AP mode SME/MLME
in firmware or driver to notify hostapd/wpa_supplicant of AP mode
association events.

12 years agonl80211: Allow AP mode to be started without monitor interface
Jouni Malinen [Tue, 28 Jun 2011 18:59:44 +0000 (21:59 +0300)]
nl80211: Allow AP mode to be started without monitor interface

This is in preparation for supporting AP mode with SME/MLME in the
driver/firmware.

12 years agoFix D-Bus build without CONFIG_P2P=y
Jouni Malinen [Mon, 27 Jun 2011 18:23:22 +0000 (21:23 +0300)]
Fix D-Bus build without CONFIG_P2P=y

12 years agoClear WPA and EAPOL state machine config pointer on network removal
Jouni Malinen [Mon, 27 Jun 2011 16:02:24 +0000 (19:02 +0300)]
Clear WPA and EAPOL state machine config pointer on network removal

Make sure that the WPA and EAPOL state machines do not hold a pointer
to a network configuration that is about to be freed. This can fix
potential issues with references to freed memory.

12 years agoatheros: Fix glibc 'invalid pointer' error when WPA_TRACE is enabled
Baruch Siach [Sat, 25 Jun 2011 12:41:46 +0000 (15:41 +0300)]
atheros: Fix glibc 'invalid pointer' error when WPA_TRACE is enabled

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
12 years agoP2P: Fix WpsFailed signal in P2P D-Bus
Jean-Michel.Bachot [Sat, 25 Jun 2011 12:26:04 +0000 (15:26 +0300)]
P2P: Fix WpsFailed signal in P2P D-Bus

Fix a NULL pointer dereference in commit
3734552f15856f3247f8bc484ffdb6d2a7d08113 in the case of PBC overlap and
timeout case.

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
12 years agoP2P: Update listen and operating channel from P2P D-Bus
Jayant Sane [Sat, 25 Jun 2011 09:08:43 +0000 (12:08 +0300)]
P2P: Update listen and operating channel from P2P D-Bus

Some P2PDevice properties were not updated in p2p->cfg structure:
reg_class, channel, op_reg_class, and op_channel. Hence, update p2p->cfg
parameters through p2p core calls in wpas_p2p_update_config().

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agoP2P: Add WpsFailed signal in P2P D-Bus
Jayant Sane [Sat, 25 Jun 2011 08:47:04 +0000 (11:47 +0300)]
P2P: Add WpsFailed signal in P2P D-Bus

Signal is triggered if an error occurs during WPS provisioning phase.

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agoP2P: More complete persistent group management over D-Bus
Jayant Sane [Fri, 24 Jun 2011 08:20:19 +0000 (11:20 +0300)]
P2P: More complete persistent group management over D-Bus

Extend commit c2762e410fa319f75a174aeb12343beddf99fce4 to allow
applications to manage (add/remove) persistent groups and accepted
network object paths while invoking a persistent group.

12 years agoP2P: Add dissasoc_low_ack in P2P device properties
Jayant Sane [Thu, 23 Jun 2011 18:35:20 +0000 (21:35 +0300)]
P2P: Add dissasoc_low_ack in P2P device properties

This can be used to activate the keep alive mechanism enabled in
mac80211. Allows to trigger Peer Disconnected signal if signal is lost
on a P2P peer.

Signed-off-by: Jean-Michel Bachot <jean-michelx.bachot@linux.intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agoP2P: Fix P2P device signal level type in D-Bus
Jayant Sane [Thu, 23 Jun 2011 18:31:22 +0000 (21:31 +0300)]
P2P: Fix P2P device signal level type in D-Bus

Signed-off-by: Fabien Marotte <fabienx.marotte@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agoP2P: Show P2P peer signal level in D-Bus P2P device properties
Jayant Sane [Thu, 23 Jun 2011 18:29:10 +0000 (21:29 +0300)]
P2P: Show P2P peer signal level in D-Bus P2P device properties

Move level parameter from p2p_device to p2p_device_info in order to
expose this information and modify D-Bus P2P handler to return this new
parameter through the P2P device properties.

Signed-off-by: Fabien Marotte <fabienx.marotte@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agoP2P: Update D-Bus network object semantics during group formation
Jayant Sane [Thu, 23 Jun 2011 18:25:13 +0000 (21:25 +0300)]
P2P: Update D-Bus network object semantics during group formation

Do not emit network objects during P2P group formation since such
network objects can confuse certain apps. Instead, a persistent group
object is created to allow apps to keep track of persistent groups.
Persistent group objects only represent the info needed to recreate the
group.

Also fixes a minor bug in the handling of persistent group objects
during WPS operations.

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agoP2P: Enable P2P capability advertisement on D-Bus
Jayant Sane [Thu, 23 Jun 2011 17:51:27 +0000 (20:51 +0300)]
P2P: Enable P2P capability advertisement on D-Bus

Append "P2P" to capability information if supported by device.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
12 years agohostapd: Don't mask out non-symmetric STA HT caps
Helmut Schaa [Thu, 23 Jun 2011 17:18:21 +0000 (20:18 +0300)]
hostapd: Don't mask out non-symmetric STA HT caps

Previously hostapd just masked the STAs HT caps with its own. However,
some HT caps are not symmetric and as such need to be handled
different.

hostapd shouldn't overwrite the STAs SMPS mode as otherwise the driver
cannot know it has to use RTS/CTS to wake the receiver from dynamic
SMPS for MCS rates > 7.

hostapd shouldn't mask the RX and TX STBC caps with it's own. They are
already handled in a special case below.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
12 years agoFix CONFIG_NO_WPA_PASSPHRASE=y build
Jouni Malinen [Thu, 23 Jun 2011 16:53:45 +0000 (19:53 +0300)]
Fix CONFIG_NO_WPA_PASSPHRASE=y build

Need to define CONFIG_NO_PBKDF2 even though the crypto cleanup moved
the function to a separate file since there is conditional code in
wpa_supplicant/config.c. In addition, wpa_passphrase should not be
built at all if passphrase functionality is removed.

12 years agoAdd notes for CONFIG_WPS_ER build configuration option
Jouni Malinen [Thu, 23 Jun 2011 16:30:13 +0000 (19:30 +0300)]
Add notes for CONFIG_WPS_ER build configuration option

[Bug 407]

12 years agoUse nl80211 as an example instead of WEXT
Jouni Malinen [Thu, 23 Jun 2011 16:28:14 +0000 (19:28 +0300)]
Use nl80211 as an example instead of WEXT

12 years agoAdd a copyright and license statement for a radiotap header file
Jouni Malinen [Thu, 23 Jun 2011 13:39:26 +0000 (16:39 +0300)]
Add a copyright and license statement for a radiotap header file

This file is a part of the radiotap parser that Andy Green agreed to
relicense under the BSD license (per email, 11 Aug 2007 07:42:05
+0100). The copyright/license statement was updated in radiotap.c,
but this radiotap_iter.h file was forgotten at that point.

12 years agobsd: Fix set_key() sequence number endian issue
Zhu Yi [Thu, 23 Jun 2011 12:47:21 +0000 (15:47 +0300)]
bsd: Fix set_key() sequence number endian issue

In set_key handler, the seq[8] is in little endian order defined by
WPA. BSD kernel uses a u_int64_t value ik_keyrsc to represent it
internally. The kernel expects the native endian order for the value.
Thus, we need to detect the endian order and swap bytes when
necessary.

12 years agoFix AP selection to check privacy mismatch and IBSS with WPA/RSN IE
Jouni Malinen [Thu, 23 Jun 2011 12:39:00 +0000 (15:39 +0300)]
Fix AP selection to check privacy mismatch and IBSS with WPA/RSN IE

These checks were previously skipped if the scan result included WPA
or RSN IE. However, that can result in selecting a network that does
not match local configuration in some cases.

12 years agoFix hostapd build without NEED_AP_MLME=y
Jouni Malinen [Wed, 22 Jun 2011 18:45:14 +0000 (21:45 +0300)]
Fix hostapd build without NEED_AP_MLME=y

12 years agoAdd EVENT_RX_ACTION handler for hostapd
Jouni Malinen [Tue, 21 Jun 2011 17:55:46 +0000 (20:55 +0300)]
Add EVENT_RX_ACTION handler for hostapd

This fixes an issue with SA Query Response frames not being processed
anymore after wpa_supplicant started registering a handler for those.
This handler registration is in generic driver_nl80211.c code, so
hostapd uses it, too.

12 years agoRemove a compiler warning on uninitialized variable
Jouni Malinen [Tue, 21 Jun 2011 17:54:17 +0000 (20:54 +0300)]
Remove a compiler warning on uninitialized variable

This is not really ever used, but better keep the compiler output
cleaner.