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.
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>
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>
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.
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>
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.
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>
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>
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>
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.
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.
Jouni Malinen [Mon, 27 Jun 2011 18:23:22 +0000 (21:23 +0300)]
Fix D-Bus build without CONFIG_P2P=y
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.
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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.
Jouni Malinen [Thu, 23 Jun 2011 16:30:13 +0000 (19:30 +0300)]
Add notes for CONFIG_WPS_ER build configuration option
[Bug 407]
Jouni Malinen [Thu, 23 Jun 2011 16:28:14 +0000 (19:28 +0300)]
Use nl80211 as an example instead of WEXT
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.
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.
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.
Jouni Malinen [Wed, 22 Jun 2011 18:45:14 +0000 (21:45 +0300)]
Fix hostapd build without NEED_AP_MLME=y
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.
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.
Jouni Malinen [Tue, 21 Jun 2011 08:47:03 +0000 (11:47 +0300)]
P2P: Start GO without extra scan step
There are some corner cases, where the wpa_supplicant_req_scan() call
may end up scheduling a scan even if we are about to start a GO. Avoid
this by explicitly marking the GO network to be selected for the next
connection.
Jouni Malinen [Mon, 20 Jun 2011 07:17:33 +0000 (10:17 +0300)]
nl80211: Add support for driver-based PMKSA cache
Implement PMKSA cache operations add, remove, and flush using nl80211
commands NL80211_CMD_{SET,DEL,FLUSH}_PMKSA to support PMKSA caching
with drivers that select the AP and generate the RSN IE internally.
Jouni Malinen [Mon, 20 Jun 2011 06:02:41 +0000 (09:02 +0300)]
Fix non-P2P D-Bus build
Jouni Malinen [Mon, 20 Jun 2011 05:58:32 +0000 (08:58 +0300)]
Fix CONFIG_AP=y build without CONFIG_P2P=y
Jouni Malinen [Sun, 12 Jun 2011 22:09:32 +0000 (15:09 -0700)]
DBus: Fix some typos on comments
Johannes Berg [Sun, 12 Jun 2011 22:08:19 +0000 (15:08 -0700)]
DBus: Add support for P2P primitives
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Sun, 12 Jun 2011 21:47:49 +0000 (14:47 -0700)]
DBus: Refactor array adding, add binary arrays
Some new code we're working on will require the dbus type "aay" (an
array of arrays of bytes). To add this, refactor the array code to
reduce code duplication by given a type string to the array starting
code, and also add code to create and parse such arrays from or into an
array of struct wpabuf respectively.
Since there's no unique DBus type for this, add a "fake"
WPAS_DBUS_TYPE_BINARRAY type that is separate from the regular DBus
types for parsing.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fabien Marotte [Sun, 12 Jun 2011 21:41:41 +0000 (14:41 -0700)]
DBus: Move wpas_dbus_new_decompose_object_path()
Moved wpas_dbus_new_decompose_object_path from dbus_new_handlers.c
to dbus_new_helpers.c.
Signed-off-by: Fabien Marotte <fabienx.marotte@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jean-Michel Bachot [Sun, 12 Jun 2011 21:35:37 +0000 (14:35 -0700)]
P2P: Add group started notification
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Sun, 12 Jun 2011 21:31:56 +0000 (14:31 -0700)]
P2P: Add wpas_notify_p2p_provision_discovery()
Add a notification for P2P provision discovery status/result.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jayant Sane [Sun, 12 Jun 2011 21:26:22 +0000 (14:26 -0700)]
P2P: Add callback for provision discovery failure
When provision discovery fails, this new callback will be called
so P2P users can react to the failure.
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jayant Sane [Sun, 12 Jun 2011 21:20:39 +0000 (14:20 -0700)]
P2P: Retry provision discovery requests in IDLE state
Since the peer may not be in Listen state when the provision discovery
request is sent, try to send the request again number of times when in
IDLE state. This was already done when p2p_find is in progress, but this
commit adds retries to the case where no other P2P operations are in
progress.
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Tue, 31 May 2011 17:11:25 +0000 (20:11 +0300)]
Fix a compiler warning on WPS-AP-without-UPnP builds
Jouni Malinen [Tue, 31 May 2011 17:07:11 +0000 (20:07 +0300)]
random: Add support for maintaining internal entropy store over restarts
This can be used to avoid rejection of first two 4-way handshakes every
time hostapd (or wpa_supplicant in AP/IBSS mode) is restarted. A new
command line parameter, -e, can now be used to specify an entropy file
that will be used to maintain the needed state.
Jouni Malinen [Fri, 27 May 2011 16:06:05 +0000 (19:06 +0300)]
Remove compiler warning for non-P2P builds
Jouni Malinen [Fri, 27 May 2011 16:02:04 +0000 (19:02 +0300)]
nl80211: Re-order functions to group AP/hostapd specific code
Get rid of separate ifdef/endif blocks for AP specific and hostapd
specific code, i.e., only have one main block of code for each case.
Jouni Malinen [Fri, 27 May 2011 15:54:36 +0000 (18:54 +0300)]
nl80211: Enable more AP callbacks for non-hostapd AP mode
Some of these are required for proper functionality (like
get_seqnum); others may not be needed yet, but including them
allows some extra ifdef/endif blocks to be removed.
Eliad Peller [Fri, 27 May 2011 15:41:46 +0000 (18:41 +0300)]
nl80211: Implement set_rate_sets for non-hostapd AP case
.set_rate_sets is not defined for non-hostapd, which prevents
configuring basic_rates when working as P2P GO.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Ken Zhu [Fri, 20 May 2011 15:27:53 +0000 (18:27 +0300)]
atheros: Fix auth_alg configuration for static WEP
When IEEE 802.1X is not enabled, driver_atheros.c needs to know how
to set authentication algorithms for static WEP.
Jouni Malinen [Thu, 19 May 2011 14:52:46 +0000 (17:52 +0300)]
Fix regression in RSN pre-authentication candidate list generation
Processing of the scan results for RSN pre-authentication candidates
was moved to happen before the network was selected. This resulted in
all candidates being dropped due to no SSID having been configured.
Fix this by moving the processing to happen after the network has
been selected. Since the raw scan results are not available at that
point, use the BSS table instead of scan results to fetch the
information.
Vinay Adella [Thu, 19 May 2011 09:55:47 +0000 (12:55 +0300)]
WPS UPnP: Fix UPnP initialization for non-bridge case with some drivers
If the driver wrapper is setting up the interface up only at commit(),
UPnP initialization fails. Fix that by moving UPnP setup to happen after
the driver commit() call.
Jouni Malinen [Tue, 17 May 2011 16:53:02 +0000 (19:53 +0300)]
WPS: Add a workaround for Windows 7 capability discovery for PBC
Windows 7 uses incorrect way of figuring out AP's WPS capabilities by
acting as a Registrar and using M1 from the AP. The config methods
attribute in that message is supposed to indicate only the configuration
method supported by the AP in Enrollee role, i.e., to add an external
Registrar. For that case, PBC shall not be used and as such, the
PushButton config method is removed from M1 by default. If pbc_in_m1=1
is included in the configuration file, the PushButton config method is
left in M1 (if included in config_methods parameter) to allow Windows 7
to use PBC instead of PIN (e.g., from a label in the AP).
Dmitry Shmidt [Mon, 16 May 2011 19:29:43 +0000 (22:29 +0300)]
Add TDLS support to Android.mk
Ben Greear [Mon, 16 May 2011 19:01:11 +0000 (22:01 +0300)]
Better messages when channel cannot be used in AP mode
Log messages letting user know that the channel cannot
be used because it is flagged unusable.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Jouni Malinen [Mon, 16 May 2011 18:07:47 +0000 (21:07 +0300)]
Include nl80211 driver wrapper in default configuration for hostapd
Jouni Malinen [Mon, 16 May 2011 18:07:05 +0000 (21:07 +0300)]
P2P: Include operating class 124 (channels 149,153,157,161)
When using the p2p_oper_reg_class configuration option instead of
p2p_group_add freq parameter, the operating class 124 was not
processed correctly. Include that class in the list of 5 GHz classes
for the p2p_oper_reg_class to resolve this.
Jouni Malinen [Mon, 16 May 2011 18:06:08 +0000 (21:06 +0300)]
WPS: Remove obsolete note about lack for WPS ER support
Jouni Malinen [Mon, 16 May 2011 16:19:30 +0000 (19:19 +0300)]
Update BSS table entry if roaming event indicates frequency change
This is needed to make sure the frequency in the BSS table entry
remains up-to-date if the AP changes its operating frequency.
Jouni Malinen [Mon, 16 May 2011 16:18:42 +0000 (19:18 +0300)]
nl80211: Filter out duplicated BSS table entries from scan results
cfg80211 maintains separate BSS table entries for APs if the same
BSSID,SSID pair is seen on multiple channels. wpa_supplicant does
not use frequency as a separate key in the BSS table, so filter out
duplicated entries. Prefer associated BSS entry in such a case in
order to get the correct frequency into the BSS table.
Jouni Malinen [Mon, 16 May 2011 15:35:42 +0000 (18:35 +0300)]
nl80211: Fetch assoc_freq from scan table for connect event
When kernel-based SME is used, use the scan table to find a BSS entry
for the associated AP when processing connected event.
Jouni Malinen [Thu, 21 Apr 2011 17:41:01 +0000 (20:41 +0300)]
Enable CONFIG_DRIVER_NL80211=y in the default configuration
nl80211 should be preferred over WEXT with any recent Linux kernel
version.
Jouni Malinen [Fri, 15 Apr 2011 16:26:28 +0000 (19:26 +0300)]
Add workaround for race condition with AssocResp TX status
It may take some time for the TX status to be delivered for a
(Re)Association Response frame and if any Data frames are received
during that time, they may end up getting dropped as Class 3 frames in
not-associated state. This results in a Disassociation frame being sent
to the station and it assuming that the association has been lost.
Work around the issue by remembering that the (Re)Association Request
has already been accepted and skip the Deauth/Disassoc sending because
of the possible Class 3 frames before the TX status callback is
received.
Dmitry Shmidt [Fri, 15 Apr 2011 15:52:01 +0000 (18:52 +0300)]
Add 'signal_poll' command interface
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Fri, 15 Apr 2011 15:40:29 +0000 (18:40 +0300)]
Prevent explicit scan command during scan or association
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Guy Eilam [Fri, 15 Apr 2011 15:13:04 +0000 (18:13 +0300)]
hostapd: Fix interfaces.iface initialization
Set all the interfaces.iface pointers to NULL after the allocation of
that memory block for cases those pointers are accessed during each of
the interfaces initialization process (hostapd_interface_init()). One
example for such case is during WPS initialization when the code tries
to fetch the uuid from each of the interfaces.
Signed-off-by: Guy Eilam <guy@wizery.com>
Jouni Malinen [Fri, 15 Apr 2011 14:00:01 +0000 (17:00 +0300)]
Update driver country info on 'SET country <value>'
Yi Zhu [Thu, 14 Apr 2011 19:22:24 +0000 (22:22 +0300)]
bsd: Add support for setting HT values in IFM_MMASK
Jouni Malinen [Thu, 14 Apr 2011 17:22:21 +0000 (20:22 +0300)]
Add sanity checks for fseek and ftell return values
In theory, these calls could fail, but it is not really likely to
happen in practice in the use case here. Anyway, check that they do
not return an error before accepting the length of the file.
Jouni Malinen [Thu, 14 Apr 2011 17:18:12 +0000 (20:18 +0300)]
IBSS RSN: peer->addr is an array so it cannot be NULL
Jouni Malinen [Thu, 14 Apr 2011 17:02:31 +0000 (20:02 +0300)]
WPS: Fix off-by-one check in vendor extension parsing
Jouni Malinen [Thu, 14 Apr 2011 16:52:26 +0000 (19:52 +0300)]
driver_test: Check set_ssid len before trying to hexdump the SSID
Jouni Malinen [Thu, 14 Apr 2011 16:50:26 +0000 (19:50 +0300)]
TDLS: Verify that scan results for BSS are available before using them
Jouni Malinen [Wed, 13 Apr 2011 23:58:35 +0000 (02:58 +0300)]
WPS: Use strict validation of (Re)AssocReq only if IEs are known
Jouni Malinen [Wed, 13 Apr 2011 23:55:38 +0000 (02:55 +0300)]
WPS: Use strict validation of (Re)AssocResp only if IEs are known
Jouni Malinen [Wed, 13 Apr 2011 23:50:52 +0000 (02:50 +0300)]
OpenSSL: Use consistent SSL_get_app_data validation in tls_verify_cb
The returned value cannot really be NULL, but better keep this
function consistent on whether the returned value is checked or not.
Jouni Malinen [Wed, 13 Apr 2011 23:45:14 +0000 (02:45 +0300)]
Avoid theoretical NULL pointer dereference during TLS reassemble
This function does not get called with in_data == NULL in practice, but
it seems to be at least partly prepared for that case, so better make it
consistent by handling the NULL value throughout the function.
Jouni Malinen [Wed, 13 Apr 2011 23:39:25 +0000 (02:39 +0300)]
Add sanity checks to EVENT_RX_PROBE_REQ event data
Both the SA and IEs from the received Probe Request frames must be
included and the Probe Request RX callback functions may assume that
these are not NULL.
Jouni Malinen [Wed, 13 Apr 2011 23:32:07 +0000 (02:32 +0300)]
Avoid theoretical NULL pointer dereference from debug code
The change to use wpa_dbg() in wpa_sm_parse_own_wpa_ie() could result
in a NULL pointer dereference if the function were called when WPA
state machine has not been initialized. While this cannot really
happen in practice, it is better to be prepared for that since that
was the case before the wpa_dbg() change.
Jouni Malinen [Wed, 13 Apr 2011 23:25:43 +0000 (02:25 +0300)]
Distinguish empty concatenated vendor-specific IE from missing one
When comparing BSS table entries, handle empty concatenated
vendor-specific IE differently from completely missing IE. This
does not change anything for the only currently compared IE that
can be fragmented (WPS IE), but it is better to have the generic
code here ready for any possible new IE that could be used in
with zero-length data.
Jouni Malinen [Wed, 13 Apr 2011 22:33:26 +0000 (01:33 +0300)]
P2P: Fix memory leak in UPnP service discovery request processing
Jouni Malinen [Wed, 13 Apr 2011 22:27:38 +0000 (01:27 +0300)]
Use type cast to get rid of implicit sign extension
The size_t value here can be 64-bit and result in implicit sign
extension. In this particular case, that gets masked out by
host_to_be32(), so there is no practical difference, but it is better
to get rid of the 64-bit variable explicitly.
Jouni Malinen [Wed, 13 Apr 2011 20:10:21 +0000 (23:10 +0300)]
TNC: Fix TNC_{TNCC,TNCS}_ReportMessageTypes copy type
The supportedTypes parameter is a list of TNC_MessageType values
and the buffer to be copied should use size of TNC_MessageType, not
TNC_MessageTypeList. In practice, these are of same length on most
platforms, so this is not a critical issue, but anyway, the correct
type should be used.
Jouni Malinen [Wed, 13 Apr 2011 19:14:22 +0000 (22:14 +0300)]
TDLS: Validate FTIE length before processing it
This avoids reading past the end of the IE buffer should the FTIE
be too short. In addition, one debug hexdump was using uninitialized
pointer to the FTIE buffer, so fixed it to use the pointer from the
parse data.
Jouni Malinen [Wed, 13 Apr 2011 19:03:52 +0000 (22:03 +0300)]
P2P: Clear go_dev_addr for group started events if it is not known
Better make sure the address value included in the event message gets
cleared in case the GO Device Address is not known for some reason.
Previously, this could potentially have been some random data from
stack should we ever hit the case where wpa_s->current_ssid is not
set (which should not really happen in normal use cases).
Jouni Malinen [Wed, 13 Apr 2011 16:55:34 +0000 (19:55 +0300)]
Make the example action script less likely to result in failures
Use "=" instead of "==" and add an example statement between "then"
and "fi".
Yi Zhu [Tue, 12 Apr 2011 20:09:14 +0000 (23:09 +0300)]
bsd: Fix buffer size for routing socket with IPv6 disabled
AF_INET6 is not always enabled by default, so use AF_INET instead. In
addition, use the old fixed length, 2048, as a failover value if the
sysctl fails for any reason.
Dmitry Shmidt [Mon, 11 Apr 2011 20:14:38 +0000 (23:14 +0300)]
Make scan interval configurable
It is now possible to configure the the time in seconds that
wpa_supplicant waits before requesting a new scan after failing to find
a suitable network in scan results.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Jouni Malinen [Mon, 11 Apr 2011 16:22:49 +0000 (19:22 +0300)]
Fix WPS AP mode regression
Commit
03d3f28a698ec2c269fed35b88be30373595eee2 broke initialization of
EAPOL authenticator state machines since an error value from
wpa_auth_sta_key_mgmt() (-1) was not handled properly and the fixed
wpa_key_mgmt_wpa_psk() identified the value as a PSK-based AKM because
of all bits being set to 1. The special error value needs to handled
separately to avoid skipping EAPOL state machine initialization.
Adam Kent [Mon, 11 Apr 2011 15:37:12 +0000 (18:37 +0300)]
Fix #ifdef check for older openssl versions
Small compile fix for older versions of openssl that do not have SHA256
support and hence do not define OPENSSL_NO_SHA256.
Per Ekman [Mon, 11 Apr 2011 15:33:48 +0000 (18:33 +0300)]
Remove references to time_t/time()/random()
Replace direct calls in AP mode code with os_*() wrappers.
Jouni Malinen [Fri, 8 Apr 2011 16:16:20 +0000 (19:16 +0300)]
Return NULL instead of 0 as the pointer on error case
Jouni Malinen [Fri, 8 Apr 2011 16:13:58 +0000 (19:13 +0300)]
Fix WPA/WPA2 AP rejection on parameter mismatch
If WPA/WPA2 was enabled in the configuration, the non-WPA exception
could allow an incorrect AP to be selected from scan results. Do
not use the exception if WPA/WPA2 is enabled in configuration.
Jouni Malinen [Fri, 8 Apr 2011 16:11:54 +0000 (19:11 +0300)]
Fix wpa_key_mgmt_*() helper functions to handle multiple bits
These can be used in some cases with a bitfield having multiple
AKMs enabled (e.g., WPA-PSK and WPA-PSK-SHA256). Address those
cases by checking whether any of the matching AKM are included.
Mahesh Palivela [Fri, 8 Apr 2011 09:06:27 +0000 (12:06 +0300)]
atheros: Add support for IEEE 802.11w configuration
Jouni Malinen [Thu, 7 Apr 2011 11:53:40 +0000 (14:53 +0300)]
nl80211: Add support for auth_alg auto-selection with connect command
When the SME is in the driver or cfg80211, the automatic selection
of auth_alg is done by leaving out the NL80211_ATTR_AUTH_TYPE
attribute from the NL80211_CMD_CONNECT command.
Jouni Malinen [Thu, 7 Apr 2011 11:48:46 +0000 (14:48 +0300)]
TDLS: Disable teardown MIC validation workaround
This MIC is required to be correct if the keys are set, so reject
the message if it does not have a valid MIC.
Sam Leffler [Mon, 4 Apr 2011 22:24:26 +0000 (01:24 +0300)]
dbus: Add support to get/set the country code
Add an Interface.Country property and support to get/set the value.
Signed-off-by: Sam Leffler <sleffler@chromium.org>