mech_eap.git
13 years agoIBSS RSN: Add for_each_sta handler for authenticator
Xi Chen [Wed, 16 Mar 2011 14:28:32 +0000 (16:28 +0200)]
IBSS RSN: Add for_each_sta handler for authenticator

13 years agoIBSS RSN: Add supp_get_state handler
Xi Chen [Wed, 16 Mar 2011 14:27:08 +0000 (16:27 +0200)]
IBSS RSN: Add supp_get_state handler

13 years agoIBSS RSN: Do not start if not yet connected to IBSS
Xi Chen [Wed, 16 Mar 2011 14:26:26 +0000 (16:26 +0200)]
IBSS RSN: Do not start if not yet connected to IBSS

This is used to avoid starting IBSS RSN processing with a peer before
the IBSS connection itself has been completed.

13 years agonl80211: Implement deauth/disassoc for non-HOSTAPD case
Johannes Berg [Wed, 16 Mar 2011 14:11:05 +0000 (16:11 +0200)]
nl80211: Implement deauth/disassoc for non-HOSTAPD case

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agowpa_s AP mode: Add notification functions for STA authorized
Johannes Berg [Wed, 16 Mar 2011 13:58:41 +0000 (15:58 +0200)]
wpa_s AP mode: Add notification functions for STA authorized

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agodbus: Fix interface list getter with multiple interfaces
Catalin Drula [Wed, 16 Mar 2011 10:30:09 +0000 (12:30 +0200)]
dbus: Fix interface list getter with multiple interfaces

There's a bug in the getter for the 'Interfaces' property
of /fi/w1/wpa_supplicant1 (new D-Bus interface) which causes a
'Segmentation Fault' when there are multiple interfaces.

13 years agohostapd: Don't force HT Mixed Mode for non-GF STAs
Helmut Schaa [Wed, 16 Mar 2011 09:56:39 +0000 (11:56 +0200)]
hostapd: Don't force HT Mixed Mode for non-GF STAs

Currently hostapd will force HT Mixed Mode if at least one non-GF STA is
associated. This will force _all_ HT transmissions to be protected.

802.11n-2009 doesn't require HT Mixed Mode to be used in case of non-GF
STAs but instead the HT information element contains a flag if non-GF
STAs are present. All STAs are required to protect GF transmissions in
that case. Hence, setting HT Mixed mode if non-GF STAs are present is
superfluous.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
13 years agoHT: Skip ht_capab validation if ieee80211n=0
Sujith Manoharan [Wed, 16 Mar 2011 09:22:40 +0000 (11:22 +0200)]
HT: Skip ht_capab validation if ieee80211n=0

There is no point in running through the 40 MHz scan if HT is
actually disabled regardless of whether the ht_capab parameter
is set.

13 years agoMove .config to the toplevel .gitignore
Jouni Malinen [Tue, 15 Mar 2011 15:52:13 +0000 (17:52 +0200)]
Move .config to the toplevel .gitignore

13 years agoCheck select() return value in wpa_ctrl_request()
Dmitry Shmidt [Tue, 15 Mar 2011 13:54:21 +0000 (15:54 +0200)]
Check select() return value in wpa_ctrl_request()

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoAndroid: Use /data/system/wpa_supplicant path as default in wpa_cli
Jouni Malinen [Tue, 15 Mar 2011 13:27:17 +0000 (15:27 +0200)]
Android: Use /data/system/wpa_supplicant path as default in wpa_cli

13 years agowpa_cli: Allow wpa_supplicant control interface default to be changed
Jouni Malinen [Tue, 15 Mar 2011 13:26:27 +0000 (15:26 +0200)]
wpa_cli: Allow wpa_supplicant control interface default to be changed

CONFIG_CTRL_IFACE_DIR can now be defined to modify the default directory
wpa_cli uses for the wpa_supplicant control interface.

13 years agowpa_cli: Add Android socket support
Dmitry Shmidt [Tue, 15 Mar 2011 13:18:07 +0000 (15:18 +0200)]
wpa_cli: Add Android socket support

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoAdd DBus state change notification for AuthMode property
Paul Stewart [Tue, 15 Mar 2011 11:54:59 +0000 (13:54 +0200)]
Add DBus state change notification for AuthMode property

Signed-off-by: Paul Stewart <pstew@google.com>
13 years agodbus: Add D-Bus method for current authentication mode
Paul Stewart [Tue, 15 Mar 2011 11:53:56 +0000 (13:53 +0200)]
dbus: Add D-Bus method for current authentication mode

Chooses between EAP and non-EAP authentication modes and
uses the appropriate method to retrieve the name.

Signed-off-by: Paul Stewart <pstew@google.com>
13 years agowpa_supplicant: Add wpa_supplicant_get_eap_mode method
Paul Stewart [Tue, 15 Mar 2011 11:53:08 +0000 (13:53 +0200)]
wpa_supplicant: Add wpa_supplicant_get_eap_mode method

Signed-off-by: Paul Stewart <pstew@google.com>
13 years agoeapol_supp: Request EAP method from EAP state machine
Paul Stewart [Tue, 15 Mar 2011 11:49:26 +0000 (13:49 +0200)]
eapol_supp: Request EAP method from EAP state machine

Signed-off-by: Paul Stewart <pstew@google.com>
13 years agoeap_peer: Add method to return current method name
Paul Stewart [Tue, 15 Mar 2011 11:47:33 +0000 (13:47 +0200)]
eap_peer: Add method to return current method name

If there is an active EAP method, return its name.

Signed-off-by: Paul Stewart <pstew@google.com>
13 years agonl80211: Extend bridge add/del operations for secondary BSSes
Jouni Malinen [Tue, 15 Mar 2011 11:02:49 +0000 (13:02 +0200)]
nl80211: Extend bridge add/del operations for secondary BSSes

Previously, only the main interface was added to a bridge. Extend this
to apply to all configured BSSes.

13 years agowlantest: Use source address of TDLS Setup Confirm failure for matching
Jouni Malinen [Mon, 14 Mar 2011 19:35:40 +0000 (21:35 +0200)]
wlantest: Use source address of TDLS Setup Confirm failure for matching

This is needed to be able to find the correct TDLS entry for the
frame regardless of whether a FromDS or ToDS frame is being processed.

13 years agowlantest: Fix source address for FromDS frames
Jouni Malinen [Mon, 14 Mar 2011 19:35:14 +0000 (21:35 +0200)]
wlantest: Fix source address for FromDS frames

13 years agoatheros: Fix default TX key index setting for WEP
Ken Zhu [Fri, 11 Mar 2011 15:55:43 +0000 (17:55 +0200)]
atheros: Fix default TX key index setting for WEP

13 years agoFix couple of typos in comments
Jouni Malinen [Fri, 11 Mar 2011 10:12:36 +0000 (12:12 +0200)]
Fix couple of typos in comments

13 years agoWPS: Indicate PBC session overlap in wps_pbc return value
Chao-Wen Yang [Thu, 10 Mar 2011 16:59:51 +0000 (18:59 +0200)]
WPS: Indicate PBC session overlap in wps_pbc return value

Use a specific return value, WPS-PBC-OVERLAP, to indicate a reason
for rejecting a wps_pbc command in wpa_supplicant AP mode if the
PBC mode cannot be started due to PBC session overlap having been
detected during monitor time.

13 years agoWPS: Ignore PBC session overlap if a specific Enrollee is selected
Jouni Malinen [Thu, 10 Mar 2011 16:51:00 +0000 (18:51 +0200)]
WPS: Ignore PBC session overlap if a specific Enrollee is selected

This allows the user to complete WPS provisioning using PBC by
selected a specific Enrollee even if there are other Enrollees
in active PBC mode at the same time. The other Enrollees will be
rejected should they try to connect at the same time.

13 years agowpa_supplicant AP: Copy generated UUID for AP configuration
Jouni Malinen [Thu, 10 Mar 2011 16:40:16 +0000 (18:40 +0200)]
wpa_supplicant AP: Copy generated UUID for AP configuration

If the wpa_supplicant configuration file does not specify an UUID,
we need to copy the generated UUID, not the all zeros buffer
reserved for the configured UUID.

13 years agoWPS: Show the received UUID-E from Probe Request in debug log
Jouni Malinen [Thu, 10 Mar 2011 16:38:16 +0000 (18:38 +0200)]
WPS: Show the received UUID-E from Probe Request in debug log

This makes it easier to debug PBC session overlap issues.

13 years agoWPS: Copy UUID from the first interface
Jouni Malinen [Thu, 10 Mar 2011 16:36:07 +0000 (18:36 +0200)]
WPS: Copy UUID from the first interface

Instead of generating a different UUID for each interface, use the
same UUID that was either configured of generated for the first
interface. This avoids potential issues with PBC session overlap
detection should multiple interfaces end up running a PBC scan
at the same time which may happen at least in some P2P use cases.

13 years agoWPS: Use only UUID-E in PBC session overlap detection on Registrar
Jouni Malinen [Thu, 10 Mar 2011 16:33:53 +0000 (18:33 +0200)]
WPS: Use only UUID-E in PBC session overlap detection on Registrar

Ignore possible mismatches in the source address of the frame and only
use UUID-E to check whether a Probe Request or M1 is from the same
Enrollee when figuring out whether there is PBC session overlap. This
is needed to avoid potential issues with Enrollee devices that may have
multiple interfaces indicating active PBC state.

13 years agoTDLS: Add tdls_testing 0x400 for ignoring AP prohibit TDLS
Jouni Malinen [Fri, 28 Jan 2011 17:28:19 +0000 (19:28 +0200)]
TDLS: Add tdls_testing 0x400 for ignoring AP prohibit TDLS

13 years agoTDLS: Do not allow setup to be started if AP prohibits TDLS
Jouni Malinen [Fri, 28 Jan 2011 17:27:28 +0000 (19:27 +0200)]
TDLS: Do not allow setup to be started if AP prohibits TDLS

13 years agoTDLS: Add tdls_testing 0x200 for declining TDLS Setup Response
Jouni Malinen [Fri, 28 Jan 2011 15:40:56 +0000 (17:40 +0200)]
TDLS: Add tdls_testing 0x200 for declining TDLS Setup Response

13 years agoTDLS: Allow wpa_cli tdls_setup to start renegotiation
Jouni Malinen [Thu, 27 Jan 2011 23:24:24 +0000 (01:24 +0200)]
TDLS: Allow wpa_cli tdls_setup to start renegotiation

If there is already a link the requested peer, request start of
renegotiation instead of completely new link. This seems to be needed
to allow some driver to accept the trigger for a new negotiation.

13 years agoTDLS: Add testing mode for disabling TPK expiration
Jouni Malinen [Thu, 27 Jan 2011 21:43:26 +0000 (23:43 +0200)]
TDLS: Add testing mode for disabling TPK expiration

tdls_testing 0x104 can now be used to disable expiration of TPK
(0x100) and to use a short lifetime when initiating link (0x4).

13 years agoTDLS: Add testing code for concurrent initiation
Jouni Malinen [Thu, 27 Jan 2011 19:10:05 +0000 (21:10 +0200)]
TDLS: Add testing code for concurrent initiation

tdls_testing 0x80 can now be used to request wpa_supplicant to send
a TDLS Setup Request frame (i.e., try to initiate TDLS setup)
whenever a TDLS Setup Request frame has been received from a peer.

13 years agoTDLS: Fix higher/lower MAC address check for concurrent init
Jouni Malinen [Thu, 27 Jan 2011 19:08:50 +0000 (21:08 +0200)]
TDLS: Fix higher/lower MAC address check for concurrent init

The logic here was reversed: the STA with lower MAC address is the
one that continues as the initiator.

13 years agoTDLS: Tear down old link when receiving TDLS Setup Request
Jouni Malinen [Thu, 27 Jan 2011 12:38:34 +0000 (14:38 +0200)]
TDLS: Tear down old link when receiving TDLS Setup Request

13 years agoTDLS: Add tdls_testing flag (bit 6) for testing long TPK lifetime
Jouni Malinen [Thu, 27 Jan 2011 12:04:12 +0000 (14:04 +0200)]
TDLS: Add tdls_testing flag (bit 6) for testing long TPK lifetime

13 years agoTDLS: Use more thorough validation of TPK handshake
Jouni Malinen [Wed, 26 Jan 2011 16:02:21 +0000 (18:02 +0200)]
TDLS: Use more thorough validation of TPK handshake

13 years agoTDLS: Replace os_memset() of all peer data with safer approach
Jouni Malinen [Thu, 27 Jan 2011 12:06:17 +0000 (14:06 +0200)]
TDLS: Replace os_memset() of all peer data with safer approach

Blindly clearing all struct wpa_tdls_peer members is a risky
operation since it could easily clear pointers to allocated
memory, etc. information that really should not be removed.
Instead of hoping that new code gets added here to restore
the important variables, reverse the approach and only clear
structure members one by one when needed.

13 years agoTDLS: Remove unnecessary storing of Link ID IE in peer data
Jouni Malinen [Wed, 26 Jan 2011 15:16:12 +0000 (17:16 +0200)]
TDLS: Remove unnecessary storing of Link ID IE in peer data

13 years agoTDLS: Fix terminology to match with IEEE 802.11z
Jouni Malinen [Wed, 26 Jan 2011 14:57:49 +0000 (16:57 +0200)]
TDLS: Fix terminology to match with IEEE 802.11z

13 years agoTDLS: Move TPK M1 sending to a separate function
Jouni Malinen [Wed, 26 Jan 2011 14:38:50 +0000 (16:38 +0200)]
TDLS: Move TPK M1 sending to a separate function

Now all there TPK handshake messages are sent in similar functions
and are easier to find from the source code.

13 years agoTDLS: Allow unencrypted network negotiation through wpa_supplicant
Jouni Malinen [Wed, 26 Jan 2011 14:09:10 +0000 (16:09 +0200)]
TDLS: Allow unencrypted network negotiation through wpa_supplicant

This allows the same code path to be used for both protected and
unprotected configurations to limit need for duplicated code in
both the driver and wpa_supplicant.

13 years agoTDLS: Clean up and fix Key Lifetime processing
Jouni Malinen [Mon, 24 Jan 2011 19:36:20 +0000 (21:36 +0200)]
TDLS: Clean up and fix Key Lifetime processing

This adds code for validating that the same Key Lifetime is used
throughout TPK handshake and enables TPK lifetime expiration and
renewal/teardown. These part seem to be working, but the actual
handling of TDLS Setup Confirm and renewal are not fully
functional yet.

13 years agoTDLS: Add new testing modes for TPK lifetime testing
Jouni Malinen [Mon, 24 Jan 2011 15:45:28 +0000 (17:45 +0200)]
TDLS: Add new testing modes for TPK lifetime testing

tdls_testing bits:
bit 3 = use short TPK lifetime (301 seconds)
bit 4 = use wrong TPK lifetime in TDLS Setup Response
bit 5 = use wrong TPK lifetime in TDLS Setup Confirm

13 years agoTDLS: Clear peer entries on association/disassociation
Jouni Malinen [Fri, 21 Jan 2011 18:51:55 +0000 (20:51 +0200)]
TDLS: Clear peer entries on association/disassociation

Since the TDLS links are allowed only to STAs that are in the same
BSS with us, clear all peer data whenever the BSS may have changed.

13 years agoTDLS: Add a special testing feature for changing TDLS behavior
Jouni Malinen [Fri, 14 Jan 2011 19:26:25 +0000 (21:26 +0200)]
TDLS: Add a special testing feature for changing TDLS behavior

These special test cases can be configured at run time with "wpa_cli
tdls_testing <value>" where <value> is an integer (either as a decimal
or as a hex value with 0x prefix) bitmap of special features with
following bits available at this point:
bit 0 = long frame (add dummy subelement to make FTIE very long)
bit 1 = use alternative RSN IE (different RSN capab value and no extra
replay counters)
bit 2 = send incorrect BSSID in Link Identifier of TDLS Setup Request
(e.g., 1 = long FTIE, 2 = different RSN IE, 3 = both of those)

This is disabled by default and can be enabled for the build by
adding the following line to .config:
CFLAGS += -DCONFIG_TDLS_TESTING

13 years agoTDLS: Add initial support for TDLS (IEEE Std 802.11z-2010)
Ganesh Prasadh [Thu, 7 Oct 2010 07:26:56 +0000 (10:26 +0300)]
TDLS: Add initial support for TDLS (IEEE Std 802.11z-2010)

13 years agoClear PeerKey pointer on deinit
Jouni Malinen [Sun, 6 Mar 2011 12:52:52 +0000 (14:52 +0200)]
Clear PeerKey pointer on deinit

13 years agoatheros: Add support for setting RSN/WPS IEs in Beacon/Probe Resp
Shan Palanisamy [Wed, 5 Jan 2011 11:44:53 +0000 (13:44 +0200)]
atheros: Add support for setting RSN/WPS IEs in Beacon/Probe Resp

13 years agoIndicate assoc vs. reassoc in association event
Shan Palanisamy [Mon, 25 Oct 2010 10:50:34 +0000 (13:50 +0300)]
Indicate assoc vs. reassoc in association event

This allows driver wrappers to indicate whether the association was
done using Association Request/Response or with Reassociation
Request/Response frames.

13 years agoFT: Make FT-over-DS configurable (hostapd.conf ft_over_ds=0/1)
Shan Palanisamy [Mon, 25 Oct 2010 10:35:51 +0000 (13:35 +0300)]
FT: Make FT-over-DS configurable (hostapd.conf ft_over_ds=0/1)

13 years agoAdd defines for Valgrind client requests
Jouni Malinen [Thu, 27 Jan 2011 11:59:00 +0000 (13:59 +0200)]
Add defines for Valgrind client requests

CFLAGS += -DCONFIG_VALGRIND can now be used to enable support for
Valgrind client requests to help in removing some non-issues from
Valgrind reports. This is mainly aimed at allowing unknown ioctl
results to be marked as defined data.

13 years agoeloop: Fix integer overflow in long timeouts
Jouni Malinen [Thu, 27 Jan 2011 12:02:03 +0000 (14:02 +0200)]
eloop: Fix integer overflow in long timeouts

If the os_time_t variable used for the expiration time (seconds)
overflows when the registered timeout value is being added,
assume that the event would happen after an infinite time, i.e.,
would not really happen in practice. This fixes issues with
long key timeouts getting converted to immediate expiration due
to the overflow.

13 years agoAdd Android make files for hostapd and wpa_supplicant
Dmitry Shmidt [Sun, 27 Feb 2011 17:19:43 +0000 (19:19 +0200)]
Add Android make files for hostapd and wpa_supplicant

13 years agoAvoid preprocessor directives in macro arguments
Iain Hibbert [Sun, 27 Feb 2011 16:59:26 +0000 (18:59 +0200)]
Avoid preprocessor directives in macro arguments

os_snprintf() can be a preprocessor macro and according to
C99 (6.10.3 clause 11) the results of having preprocessor directives
inside the macro arguments is undefined.

13 years agoAllow client control socket location to be overridden
Jouni Malinen [Sun, 27 Feb 2011 16:35:33 +0000 (18:35 +0200)]
Allow client control socket location to be overridden

Build options can now be used to replace the location of client
sockets for UNIX domain socket control interface:

CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/tmp\"
CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_PREFIX=\"wpa_ctrl_\"

13 years agoUse Android reserved namespace for control interface
Dmitry Shmidt [Sun, 27 Feb 2011 16:19:17 +0000 (18:19 +0200)]
Use Android reserved namespace for control interface

On Android, use a special reserved namespace for the UNIX domain
socket.

13 years agoUse longer timeout in wpa_ctrl_request()
Dmitry Shmidt [Sun, 27 Feb 2011 15:08:15 +0000 (17:08 +0200)]
Use longer timeout in wpa_ctrl_request()

Wait longer for control interface response from wpa_supplicant to
avoid issues with some drivers that have long blocking operations.

13 years agoMake wpa_ctrl_close() handle unopened connection
Dmitry Shmidt [Sun, 27 Feb 2011 15:07:07 +0000 (17:07 +0200)]
Make wpa_ctrl_close() handle unopened connection

13 years agobsd: Use correct size for routing socket
Masashi Honma [Sun, 27 Feb 2011 12:01:39 +0000 (14:01 +0200)]
bsd: Use correct size for routing socket

The buffer size for routing socket is fixed to 2048.
This patch fix it to obtain the size from OS.

This patch worked on x86 platform with NetBSD 5.0.2.

13 years agoOne more year update for copyright notices
Jouni Malinen [Sun, 27 Feb 2011 10:56:12 +0000 (12:56 +0200)]
One more year update for copyright notices

13 years agoRemove Host AP driver FAQ from the git repository
Jouni Malinen [Sun, 27 Feb 2011 10:55:00 +0000 (12:55 +0200)]
Remove Host AP driver FAQ from the git repository

There is no need to keep this in hostap.git with wpa_supplicant
and hostapd. The CVS version from 0.5.x branch is identical and
it can be used instead.

13 years agoUpdate copyright notices to include the new year
Jouni Malinen [Sun, 27 Feb 2011 10:50:00 +0000 (12:50 +0200)]
Update copyright notices to include the new year

13 years agoAdd wpa_supplicant state change event for Android network manager
Dmitry Shmidt [Sat, 26 Feb 2011 11:20:16 +0000 (13:20 +0200)]
Add wpa_supplicant state change event for Android network manager

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoctrl_iface: Return only finished line for scan results
Dmitry Shmidt [Sat, 26 Feb 2011 11:16:04 +0000 (13:16 +0200)]
ctrl_iface: Return only finished line for scan results

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoOpenSSL: Add access to Android certificates
Dmitry Shmidt [Sat, 26 Feb 2011 10:08:20 +0000 (12:08 +0200)]
OpenSSL: Add access to Android certificates

This allows keystore:// prefix to be used with client_cert and
private_key configuration parameters.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoAdd CONFIG_ANDROID_LOG support
Dmitry Shmidt [Fri, 25 Feb 2011 14:44:34 +0000 (16:44 +0200)]
Add CONFIG_ANDROID_LOG support

This makes wpa_printf() calls use __android_log_vprint(). In addition,
hexdumps are commented out.

13 years agoChange executable permissions for Android
Dmitry Shmidt [Fri, 25 Feb 2011 14:21:18 +0000 (16:21 +0200)]
Change executable permissions for Android

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agowext: Do not include typedefs for Android build
Jouni Malinen [Fri, 25 Feb 2011 11:36:17 +0000 (13:36 +0200)]
wext: Do not include typedefs for Android build

Android build gets __u32 and friends from
bionic/libc/kernel/arch-x86/asm/types.h and having the typedefs here
causes redefinition errors.

13 years agowext: Sync with linux/wireless.h from wireless-testing.git
Jouni Malinen [Fri, 25 Feb 2011 11:29:52 +0000 (13:29 +0200)]
wext: Sync with linux/wireless.h from wireless-testing.git

This updates the Linux wireless extensions header file to be based
on the latest version (22).

13 years agoP2P: Add wpas_notify_p2p_sd_response
Konguraj(Raj) Kulanthaivel [Thu, 24 Feb 2011 20:47:34 +0000 (22:47 +0200)]
P2P: Add wpas_notify_p2p_sd_response

Signed-off-by: Konguraj(Raj) Kulanthaivel <konguraj.kulanthaivel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add wpas_notify_p2p_sd_request
Konguraj(Raj) Kulanthaivel [Thu, 24 Feb 2011 20:45:39 +0000 (22:45 +0200)]
P2P: Add wpas_notify_p2p_sd_request

Signed-off-by: Konguraj(Raj) Kulanthaivel <konguraj.kulanthaivel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add invitation result notification
Jean-Michel Bachot [Thu, 24 Feb 2011 20:40:21 +0000 (22:40 +0200)]
P2P: Add invitation result notification

Add a notification function for the result of an invitation.

Signed-off-by: Jean-Michel Bachot <jean-michelx.bachot@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add GO negotiation status notification
Jayant Sane [Thu, 24 Feb 2011 20:34:52 +0000 (22:34 +0200)]
P2P: Add GO negotiation status notification

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add wpas_notify_p2p_go_neg_req
Konguraj(Raj) Kulanthaivel [Thu, 24 Feb 2011 20:30:19 +0000 (22:30 +0200)]
P2P: Add wpas_notify_p2p_go_neg_req

Add a notification for received GO negotiation requests.

Signed-off-by: Konguraj(Raj) Kulanthaivel <konguraj.kulanthaivel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add group removed notification
Johannes Berg [Thu, 24 Feb 2011 20:27:23 +0000 (22:27 +0200)]
P2P: Add group removed notification

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add method to signal lost device
Johannes Berg [Thu, 24 Feb 2011 20:22:16 +0000 (22:22 +0200)]
P2P: Add method to signal lost device

This signal is used to notify users of the P2P
state machine or wpa_supplicant of lost devices.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add notification for P2P device found
Johannes Berg [Thu, 24 Feb 2011 20:08:18 +0000 (22:08 +0200)]
P2P: Add notification for P2P device found

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add p2p_get_peer_found to get peer info
Johannes Berg [Thu, 24 Feb 2011 20:05:22 +0000 (22:05 +0200)]
P2P: Add p2p_get_peer_found to get peer info

This will only retrieve information about peers that have been fully
discovered, not peers that are only half-discovered based on their Probe
Request frames.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add new_device flag to dev_found callback
Johannes Berg [Thu, 24 Feb 2011 19:59:58 +0000 (21:59 +0200)]
P2P: Add new_device flag to dev_found callback

The DBus code will want to have perfect matching of dev_found and the
dev_lost it adds so it doesn't need to keep track internally. Enable
that with a new flag in the core that tracks whether we have already
notified about this -- the existing users can ignore it.

The part where this is always set to 1 if the new device is discovered
by a driver that has P2P in the driver is buggy -- the driver should
feed the P2P peer database and then that should feed the notification
here instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Embed publically visible struct in peer info
Konguraj(Raj) Kulanthaivel [Thu, 24 Feb 2011 19:51:17 +0000 (21:51 +0200)]
P2P: Embed publically visible struct in peer info

This embeds some information about each P2P peer that will be publically
visible in a struct that is shared.

The dev_found notification function is also passed the new struct, which
requires some work for the driver-based P2P management.

Signed-off-by: Konguraj(Raj) Kulanthaivel <konguraj.kulanthaivel@intel.com>
Signed-off-by: Fabien Marotte <fabienx.marotte@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agohostapd: Inherit correct MAC address for AP VLAN interfaces
Helmut Schaa [Thu, 24 Feb 2011 19:25:40 +0000 (21:25 +0200)]
hostapd: Inherit correct MAC address for AP VLAN interfaces

When using multiple vifs and dynamic vlan tagging is enabled on any
interface, the created AP VLAN interfaces get the BSSID of the first
AP mode interface instead of the BSSID of the corresponding AP mode
interface.

Example:

wlan0 - xx:xx:xx:xx:x0
wlan1 - xx:xx:xx:xx:x1

Assume a STA connects to the AP interface wlan1 and gets a dynamic
VLAN tag 100 assigned by the RADIUS server. Hostapd will create an AP
VLAN interface wlan1.100 but doesn't set an address for this interface
which results in wlan1.100 getting the same address as wlan0:

wlan1.100 - xx:xx:xx:xx:x0

As a result the STA that was moved to wlan1.100 isn't able to finish its
4-way handshake since mac80211 won't pass its frames to wlan1.100 due to
the different address.

To fix this issue make use of the address of the AP interface when
creating an AP VLAN interface.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
13 years agoP2P: Handle P2P-not-supported without segfaults
Jouni Malinen [Thu, 24 Feb 2011 19:13:30 +0000 (21:13 +0200)]
P2P: Handle P2P-not-supported without segfaults

Previous code was assuming that the P2P module is always initialized.
However, that is not the case anymore with drivers that do not support
P2P. Add verification of whether P2P is enabled before trying to execute
P2P commands.

13 years agoAP: Update logging related to inactivity and disassociation
Ben Greear [Thu, 24 Feb 2011 15:44:45 +0000 (17:44 +0200)]
AP: Update logging related to inactivity and disassociation

Add MAC addresses for stations and use wpa_msg instead of printf
methods to make it easier to grep logs and find messages for the
station in question.

Signed-off-by: Ben Greear <greearb@candelatech.com>
13 years agoAdd more wpa_auth debugging messages
Ben Greear [Thu, 24 Feb 2011 15:35:59 +0000 (17:35 +0200)]
Add more wpa_auth debugging messages

13 years agoWait 1 second before (re)scanning on authentication timeout
Ben Greear [Thu, 24 Feb 2011 15:16:16 +0000 (17:16 +0200)]
Wait 1 second before (re)scanning on authentication timeout

If we timed out, the AP or the local radio may be busy.
So, wait a second until scanning again.

Signed-off-by: Ben Greear <greearb@candelatech.com>
13 years agoSME: Add timers for authentication and asscoiation
Ben Greear [Thu, 24 Feb 2011 14:59:46 +0000 (16:59 +0200)]
SME: Add timers for authentication and asscoiation

mac80211 authentication or association operation may get stuck for some
reasons, so wpa_supplicant better use an internal timer to recover from
this.

Signed-off-by: Ben Greear <greearb@candelatech.com>
13 years agoRemove unneeded OpenSSL error messages from key/cert parsing
Jouni Malinen [Tue, 22 Feb 2011 20:19:55 +0000 (22:19 +0200)]
Remove unneeded OpenSSL error messages from key/cert parsing

If parsing of the certificate or private key succeeds using any of
the tried encoding types, clear the OpenSSL error queue without
showing the pending errors in debug log since they do not really
provide any useful output and can be confusing.

13 years agonl80211: Use nl_atype() from libnl
Raghunathan Kailasanathan [Tue, 22 Feb 2011 19:48:49 +0000 (21:48 +0200)]
nl80211: Use nl_atype() from libnl

libnl provides nla_type() which can be used to derive nla_type from
struct nlattr.

13 years agoP2P: Notify WPS-M2D event on parent interface and handle PBC overlap
Jouni Malinen [Tue, 22 Feb 2011 10:20:16 +0000 (12:20 +0200)]
P2P: Notify WPS-M2D event on parent interface and handle PBC overlap

GO may use M2D to notify that PBC overlap was detected if the GO was
configured to allow only a specific P2P Device to connect using PBC.
We need to report the M2D message on the parent interface if a
separate group interface is used. In addition, we can stop the P2P
operation if PBC overlap was indicated similarly to what we are
already doing in th case the overlap is detected locally.

13 years agoRemove obsolete comments about libnl 1.1 being new
Jouni Malinen [Mon, 21 Feb 2011 21:41:56 +0000 (23:41 +0200)]
Remove obsolete comments about libnl 1.1 being new

13 years agowpa_cli: Add newline to end of responses in interactive mode
Jouni Malinen [Mon, 21 Feb 2011 20:50:11 +0000 (22:50 +0200)]
wpa_cli: Add newline to end of responses in interactive mode

Some of the wpa_supplicant control interface commands, like WPS_PIN,
may not include a newline in the end of the response. This can result
in the response being lost when wpa_cli redraws the screen after an
event message. Add a newline after such responses in interactive mode
to avoid the problem.

13 years agoutils: Corrected a typo in header's name definition
Guy Eilam [Mon, 21 Feb 2011 20:44:46 +0000 (22:44 +0200)]
utils: Corrected a typo in header's name definition

Corrected a typo in the BASE64_H definition that
might cause the header file to be included more than once.

Signed-off-by: Guy Eilam <guy@wizery.com>
13 years agoWPS ER: Stop eloop only on the last terminate_cb
Ben Greear [Mon, 21 Feb 2011 19:47:46 +0000 (21:47 +0200)]
WPS ER: Stop eloop only on the last terminate_cb

This allows all WPS ER instances to be cleaned up properly if more
than one interface has an active WPS ER when wpa_supplicant is being
killed.

13 years agoIncrease internal TLSs client key exchange buffer
Christian Lamparter [Mon, 21 Feb 2011 16:25:34 +0000 (18:25 +0200)]
Increase internal TLSs client key exchange buffer

This patch fixes a problem I had when I tried to connect
an embedded system [wpa_supplicant, CONFIG_TLS=internal]
to my TLS secured network.

TLSv1: Send CertificateVerify
TLSv1: CertificateVerify hash - hexdump(len=36): ha .. ha
PKCS #1: pkcs1_generate_encryption_block - Invalid buffer lengths \
                        (modlen=512 outlen=454 inlen=36)

It turned out that a fixed 1000 byte message buffer was just
a little bit too small for the 4096 bit RSA certificates
I'm using.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
13 years agohostapd: Allow coexistance of HT BSSes with WEP/TKIP BSSes
Helmut Schaa [Mon, 21 Feb 2011 15:27:16 +0000 (17:27 +0200)]
hostapd: Allow coexistance of HT BSSes with WEP/TKIP BSSes

In multi BSS setups it wasn't possible to set up an HT BSS in
conjunction with a WEP/TKIP BSS. HT needed to be turned off entirely
to allow WEP/TKIP BSSes to be used.

In order to allow HT BSSes to coexist with non-HT WEP/TKIP BSSes add a
new BSS conf attribute "disable_11n" which disables HT capabilities on a
single BSS by suppressing HT IEs in the beacon and probe response
frames. Furthermore, mark all STAs associated to a WEP/TKIP BSS as
non-HT STAs. The disable_11n parameter is used internally; no new entry
is parsed from hostapd.conf.

This allows a non-HT WEP/TKIP BSS to coexist with a HT BSS without
having to disable HT mode entirely. Nevertheless, all STAs associated to
the WEP/TKIP BSS will only be served as if they were non-HT STAs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
13 years agoFT: Set EAPOL state machined to authenticated state with FT-EAP
Jouni Malinen [Sun, 20 Feb 2011 19:57:53 +0000 (21:57 +0200)]
FT: Set EAPOL state machined to authenticated state with FT-EAP

When FT protocol run is completed with FT-EAP, the EAPOL state machine
needs to be notified of the completed authentication to make sure it
does not try to start new authentication.

13 years agoFT: Fix FT-EAP to set EAPOL Authenticator into authenticated state
Jouni Malinen [Sun, 20 Feb 2011 19:55:28 +0000 (21:55 +0200)]
FT: Fix FT-EAP to set EAPOL Authenticator into authenticated state

This is needed to avoid the EAPOL Authenticator from trying to start
new authentication when FT protocol is used. [Bug 384]