]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
14 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

14 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.

14 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_\"

14 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.

14 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.

14 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

14 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.

14 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

14 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.

14 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

14 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>
14 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>
14 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>
14 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.

14 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>
14 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.

14 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).

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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.

14 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>
14 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

14 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>
14 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>
14 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.

14 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.

14 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.

14 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

14 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.

14 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>
14 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.

14 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>
14 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>
14 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.

14 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]

14 years agoFT: Specify source MAC address for RRB messages
Jouni Malinen [Sun, 20 Feb 2011 15:50:11 +0000 (17:50 +0200)] 
FT: Specify source MAC address for RRB messages

Use l2_packet with Ethernet header included so that the source
address for RRB packets can be forced to be the local BSSID. This
fixes problems where unexpected bridge interface address may end
up getting used and the recipient of the frame dropping it as
unknown R0KH/R1KH.

14 years agoDo not propagate bad scan results to siblings sharing the radio
Ben Greear [Wed, 16 Feb 2011 16:55:37 +0000 (18:55 +0200)] 
Do not propagate bad scan results to siblings sharing the radio

This decreases useless work and re-scans by siblings when a
device gets a scan failure.

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years agoFlush STA entries in hostapd when clearing STAs from kernel
Jouni Malinen [Thu, 10 Feb 2011 20:31:32 +0000 (22:31 +0200)] 
Flush STA entries in hostapd when clearing STAs from kernel

This is needed to keep kernel and hostapd in sync. In addition,
the obsolete entry in hostapd prevented use of Deauthentication
or Disassociation frame with reason code 6/7 mechanism to indicate
to the STA that there is no association if the STA missed the
broadcast Deauthentication frame for any reason.

14 years agohostapd: Fix RADIUS client configuration update on reconfig
Jouni Malinen [Thu, 10 Feb 2011 20:12:29 +0000 (22:12 +0200)] 
hostapd: Fix RADIUS client configuration update on reconfig

The internal pointer to RADIUS client configuration needs to be
updated whenever a new hostapd configuration is loaded. Without
this, freed memory may be dereferenced and this can result in
segmentation faults.

14 years agoMake sure reserved field in WMM IE is set to 0
Jouni Malinen [Thu, 10 Feb 2011 20:10:40 +0000 (22:10 +0200)] 
Make sure reserved field in WMM IE is set to 0

This was previously left uninitialized for Beacon frames and could
potentially have any value.

14 years agoFix CONFIG_NO_STDOUT_DEBUG=y build
Jouni Malinen [Thu, 10 Feb 2011 18:24:06 +0000 (20:24 +0200)] 
Fix CONFIG_NO_STDOUT_DEBUG=y build

14 years agoUse wpa_msg() instead of wpa_printf()
Ben Greear [Thu, 10 Feb 2011 18:14:46 +0000 (20:14 +0200)] 
Use wpa_msg() instead of wpa_printf()

This converts number of debugging messages to use wpa_msg() in order
to allow the interface name to be shown with the messages.

A new function, wpa_dbg(), is introduced to allow
CONFIG_NO_STDOUT_DEBUG=y builds to remove the debug strings. This is
otherwise identical with wpa_msg(), but it gets compiled out if stdout
debugging is disabled.

14 years agohostapd: Add require_ht configuration parameter
Jouni Malinen [Wed, 9 Feb 2011 13:08:47 +0000 (15:08 +0200)] 
hostapd: Add require_ht configuration parameter

This can be used to configure hostapd to reject association with
any station that does not support HT PHY.

14 years agowpa_s AP: Deliver EVENT_RX_PROBE_REQ events to AP processing
Jouni Malinen [Tue, 8 Feb 2011 12:32:35 +0000 (14:32 +0200)] 
wpa_s AP: Deliver EVENT_RX_PROBE_REQ events to AP processing

This is needed to allows WPS PBC session overlap detection to work
with drivers that process Probe Request frames internally. This
code is is run in hostapd, but the wpa_supplicant AP mode did not
have call to the hostapd_probe_req_rx() function even though it
registered handlers for hostapd Probe Request RX callbacks.

14 years agoP2P: Allow WPS_PBC command on GO to select on P2P Device Address
Jouni Malinen [Mon, 7 Feb 2011 16:28:36 +0000 (18:28 +0200)] 
P2P: Allow WPS_PBC command on GO to select on P2P Device Address

An optional parameter, p2p_dev_addr, can now be given to WPS_PBC
command on P2P GO to indicate that only the P2P device with the
specified P2P Device Address is allowed to connect using PBC. If
any other device tries to use PBC, a session overlap is indicated
and the negotiation is rejected with M2D. The command format for
specifying the address is "WPS_PBC p2p_dev_addr=<address>", e.g.,
WPS_PBC p2p_dev_addr=02:03:04:05:06:07

In addition, show the PBC session overlap indication as a WPS failure
event on an AP/GO interface. This particular new case shows up as
"WPS-FAIL msg=4 config_error=12".

14 years agohostapd: Add iface-name wpa_msg() callback registration
Ben Greear [Sun, 6 Feb 2011 18:50:32 +0000 (20:50 +0200)] 
hostapd: Add iface-name wpa_msg() callback registration

This allows the interface name to be automatically
added to log file lines by the core logging logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years agoAdd interface name to wpa_msg() output
Ben Greear [Sun, 6 Feb 2011 18:39:34 +0000 (20:39 +0200)] 
Add interface name to wpa_msg() output

This makes log files much more readable if multiple interfaces
are being controlled by the same process. The interface name is
added to stdout/file/syslog entries, but not to the messages
sent to control interface monitors to avoid issues with parsing
in external programs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years agohostapd: Allow logging to file
Ben Greear [Sun, 6 Feb 2011 18:24:16 +0000 (20:24 +0200)] 
hostapd: Allow logging to file

Also supports 'relog' CLI command to re-open the log file.

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years agowpa_supplicant: Support 'relog' command to re-open log files
Ben Greear [Sun, 6 Feb 2011 18:15:19 +0000 (20:15 +0200)] 
wpa_supplicant: Support 'relog' command to re-open log files

This allows rolling log files:

mv log.txt log.txt.1
wpa_cli relog

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years agoP2P: Add wpas_p2p_disconnect()
Johannes Berg [Wed, 2 Feb 2011 15:30:15 +0000 (17:30 +0200)] 
P2P: Add wpas_p2p_disconnect()

Add a new API function wpas_p2p_disconnect()
to disconnect from or dissolve a group.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoP2P: Use a variable for generated PIN to allow multiple uses
Johannes Berg [Wed, 2 Feb 2011 15:12:37 +0000 (17:12 +0200)] 
P2P: Use a variable for generated PIN to allow multiple uses

In order to pass the same PIN to multiple notifications in the future,
generate it centrally.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoutil: Add compact MAC address formatting/parsing
Johannes Berg [Wed, 2 Feb 2011 15:11:00 +0000 (17:11 +0200)] 
util: Add compact MAC address formatting/parsing

The P2P DBus interface will use addresses for
DBus paths, and uses them without any separators.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoDBus: Improve error reporting
Johannes Berg [Wed, 2 Feb 2011 15:03:32 +0000 (17:03 +0200)] 
DBus: Improve error reporting

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoDBus: Increase introspection buffer sizes
Johannes Berg [Wed, 2 Feb 2011 15:01:29 +0000 (17:01 +0200)] 
DBus: Increase introspection buffer sizes

The P2P additions will add more data so
that the current buffers aren't big enough.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoDBus: Publish provisioned keys in network properties
Johannes Berg [Wed, 2 Feb 2011 15:00:12 +0000 (17:00 +0200)] 
DBus: Publish provisioned keys in network properties

When the network was provisioned, we need to get the keys to be able to
reconnect without new provisioning. To be able to publish those keys but
not normally configured ones, add a new attribute to struct wpa_ssid
indicating whether or not keys may be exported.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoAP: Add callback for STA authorized transitions
Johannes Berg [Wed, 2 Feb 2011 14:56:59 +0000 (16:56 +0200)] 
AP: Add callback for STA authorized transitions

Add a callback for station's authorized transitions
to allow wpa_supplicant to emit events in DBus.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoAP: Introduce sta authorized wrappers
Johannes Berg [Wed, 2 Feb 2011 14:52:32 +0000 (16:52 +0200)] 
AP: Introduce sta authorized wrappers

To enable making state change notifications on the WLAN_STA_AUTHORIZED
flag, introduce ap_sta_set_authorized(), and to reduce use of the flag
itself also add a wrapper for testing the flag: ap_sta_is_authorized().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoP2P: Clear driver Probe Response IE on stop_listen
Johannes Berg [Tue, 1 Feb 2011 16:30:33 +0000 (18:30 +0200)] 
P2P: Clear driver Probe Response IE on stop_listen

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agonl80211: Use max_remain_on_chan data from nl80211
Johannes Berg [Tue, 1 Feb 2011 16:18:32 +0000 (18:18 +0200)] 
nl80211: Use max_remain_on_chan data from nl80211

If the driver advertises max_remain_on_chan data, use it instead of
the hardcoded value of 5000. Keep the default at 5000 since that is the
value used by earlier versions of cfg80211/mac80211 and not advertised
in nl80211 for those.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoP2P: Fix p2p_long_listen
Johannes Berg [Tue, 1 Feb 2011 16:09:38 +0000 (18:09 +0200)] 
P2P: Fix p2p_long_listen

There are two issues with p2p_long_listen:
 1) max_remain_on_channel is assumed to be 5 seconds,
 2) if max_remain_on_channel is not a full multiple of
    seconds, accounting breaks.

Fix these by converting p2p_long_listen to ms and
tracking it according to max_remain_on_channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agonl80211: Remove excessive nl80211_set_mode() call
Eliad Peller [Tue, 1 Feb 2011 14:38:38 +0000 (16:38 +0200)] 
nl80211: Remove excessive nl80211_set_mode() call

When authenticating, and the interface type is not already
NL80211_IFTYPE_STATION, we need to call wpa_driver_nl80211_set_mode()
only once. Remove the excessive call.

Signed-off-by: Eliad Peller <eliad@wizery.com>
14 years agoAP: Make sure ieee80211n_allowed_ht40_channel_pair() gets called
Jouni Malinen [Tue, 1 Feb 2011 14:09:26 +0000 (16:09 +0200)] 
AP: Make sure ieee80211n_allowed_ht40_channel_pair() gets called

We need to call this function after having completed the neighboring
channel scan to figure out whether HT40 can be used and if so, which
channel is the secondary channel.

14 years agoAP: Ensure ieee80211n_supported_ht_capab() gets called to check ht caps
Nishant Sarmukadam [Tue, 1 Feb 2011 14:04:59 +0000 (16:04 +0200)] 
AP: Ensure ieee80211n_supported_ht_capab() gets called to check ht caps

ieee80211n_supported_ht_capab is called after ieee80211n_check_40mhz in
function hostapd_check_ht_capab. ieee80211n_check_40mhz can return 1 in
a valid scenario where the initialization is completed in a callback. In
this case ieee80211n_supported_ht_capab is skipped and hostapd does not
check the ht capabilities reported by the driver. Fix this issue making
sure ieee80211n_supported_ht_capab gets called.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
14 years agoAP: Enable WMM with default parameters by default for HT
Johannes Berg [Tue, 1 Feb 2011 12:34:12 +0000 (14:34 +0200)] 
AP: Enable WMM with default parameters by default for HT

If WMM is not disabled explicitly (wmm_enabled=0 in hostapd.conf),
enable WMM automatically whenever HT (ieee80211n) is enabled. Use
the default WMM parameters for AP TX queues and the EDCA parameters
advertised for stations in WMM IE if no overriding values are
included in the configuration.

14 years agoFT: Configure FT XXKey as PMK for driver-based 4-way handshake
Jouni Malinen [Mon, 31 Jan 2011 22:06:13 +0000 (00:06 +0200)] 
FT: Configure FT XXKey as PMK for driver-based 4-way handshake

When using FT-EAP, the second half of MSK is used as the starting
point for PMK key hierarchy. Configure that instead of the first
half of MSK when using FT with driver-based 4-way handshake and
FT protocol.

14 years agoSet portValid=TRUE on association for driver-based 4-way handshake
Jouni Malinen [Mon, 31 Jan 2011 22:04:02 +0000 (00:04 +0200)] 
Set portValid=TRUE on association for driver-based 4-way handshake

This was previously done for WPA/WPA2-Personal as part of association
processing when the driver is implementing 4-way handshake. The
portValid needs to be done for WPA/WPA2-Enterprise to get the proper
EAPOL authentication completed callback to configure PMK to the driver.

14 years agonl80211: use P2P interface types
Johannes Berg [Mon, 31 Jan 2011 19:49:48 +0000 (21:49 +0200)] 
nl80211: use P2P interface types

We can use the P2P interface types to check if the driver supports P2P
and to tell the kernel that a given interface is going to be used for
P2P (when it is created).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoP2P: Show "FAIL" for failed p2p_find operation
Masashi Honma [Mon, 31 Jan 2011 15:29:31 +0000 (17:29 +0200)] 
P2P: Show "FAIL" for failed p2p_find operation

I tried these commands:

./wpa_cli -i wlan0 p2p_group_add
./wpa_cli -i wlan0 p2p_find

The second one results in following messages because it is invalid
operation.

-------
nl80211: Scan trigger failed: ret=-95 (Operation not supported)
P2P: Failed to start p2p_scan
-------

But the second one shows "OK" on control console.

This patch makes it to show "FAIL".

14 years agohostapd: Ensure that the destination directory exists
Mike Crowe [Sun, 30 Jan 2011 19:33:17 +0000 (21:33 +0200)] 
hostapd: Ensure that the destination directory exists

Ensure that the destination binary directory exists before installing
into it.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
14 years agoUse DESTDIR when installing hostapd to support cross-compiling
Mike Crowe [Sun, 30 Jan 2011 19:32:44 +0000 (21:32 +0200)] 
Use DESTDIR when installing hostapd to support cross-compiling

Signed-off-by: Mike Crowe <mac@mcrowe.com>
14 years agoRemove obsolete drivers wrappers: atmel, ndiswrapper, ipw, hermes
Jouni Malinen [Sun, 30 Jan 2011 19:29:25 +0000 (21:29 +0200)] 
Remove obsolete drivers wrappers: atmel, ndiswrapper, ipw, hermes

There is no real reason to maintain these in the current development
branch anymore. If someone really needs support for the obsolete
driver interfaces, these can be found in older wpa_supplicant
branches.

driver_atmel.c
- vendor-specific interface for ATMEL AT76C5XXx cards
- for some old out-of-tree driver; not for the upstream atmel*
  drivers

driver_ndiswrapper.c
- vendor-specific interface for an out-of-tree driver
- ndiswrapper should work with driver_wext.c, too

driver_ipw.c
- vendor-specific interface for old ipw2100/2200 driver
- the upstream driver works with driver_wext.c (and does not work
  with the old interface)

driver_hermes.c
- vendor driver that was not even included in the main wpa_supplicant
  releases

14 years agonl80211: Make use of the ht opmode bss attribute
Helmut Schaa [Sun, 30 Jan 2011 19:16:29 +0000 (21:16 +0200)] 
nl80211: Make use of the ht opmode bss attribute

In order to enable protection mechanisms for different HT opmodes the
driver needs to be aware of the current HT opmode that is calculated by
hostapd. Hence, pass the current opmode to the nl80211 driver via
the bss attribute NL80211_ATTR_BSS_HT_OPMODE.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
14 years agohostapd: Allow TDLS use to be prohibited in the BSS
Jouni Malinen [Fri, 28 Jan 2011 17:21:59 +0000 (19:21 +0200)] 
hostapd: Allow TDLS use to be prohibited in the BSS

tdls_prohibit=1 and tdls_prohibit_chan_switch=1 and now be used to
disable use of TDLS or TDLS channel switching in the BSS using
extended cabilities IE as defined in IEEE 802.11z.

14 years agowlantest: Add command for adding WEP keys during run time
Jouni Malinen [Fri, 28 Jan 2011 11:33:21 +0000 (13:33 +0200)] 
wlantest: Add command for adding WEP keys during run time

14 years agoFix couple of compiler warnings about uninitialized variables
Jouni Malinen [Wed, 26 Jan 2011 19:29:28 +0000 (21:29 +0200)] 
Fix couple of compiler warnings about uninitialized variables

14 years agowlantest: Handle missing fields in TDLS Setup Confirm error case
Jouni Malinen [Mon, 24 Jan 2011 18:51:28 +0000 (20:51 +0200)] 
wlantest: Handle missing fields in TDLS Setup Confirm error case

14 years agowlantest: Handle missing fields in TDLS Setup Response error case
Jouni Malinen [Mon, 24 Jan 2011 16:16:26 +0000 (18:16 +0200)] 
wlantest: Handle missing fields in TDLS Setup Response error case

14 years agowlantest: Count TDLS Teardown messages
Jouni Malinen [Mon, 24 Jan 2011 15:00:28 +0000 (17:00 +0200)] 
wlantest: Count TDLS Teardown messages

14 years agowlantest: Fix compiler warnings
Jouni Malinen [Mon, 24 Jan 2011 14:57:36 +0000 (16:57 +0200)] 
wlantest: Fix compiler warnings

14 years agowlantest: Fix TDLS setup failure counting
Jouni Malinen [Mon, 24 Jan 2011 13:25:59 +0000 (15:25 +0200)] 
wlantest: Fix TDLS setup failure counting

Need to be able to handle TDLS Setup Response frame with LinkId IE
when non-zero status code is used. In addition, allow finding of a
TDLS entry based on real BSSID instead of the one used in the LinkId
to allow negative testing of different BSS.

14 years agowlantest: Determine ping matches properly for direct link
Jouni Malinen [Mon, 24 Jan 2011 12:50:51 +0000 (14:50 +0200)] 
wlantest: Determine ping matches properly for direct link

Check ICMP echo request/response matches for both STAs to get proper
counter values for a ping from a one STA to another one using TDLS.

14 years agowlantest: Set direct links down on deauth/disassoc
Jouni Malinen [Mon, 24 Jan 2011 12:33:48 +0000 (14:33 +0200)] 
wlantest: Set direct links down on deauth/disassoc

14 years agowlantest: Maintain only a single entry for an active direct link
Jouni Malinen [Mon, 24 Jan 2011 12:26:35 +0000 (14:26 +0200)] 
wlantest: Maintain only a single entry for an active direct link

The TDLS link itself is bidirectional, but there is explicit
initiator/responder roles. Remove the other direction of the link if it
exists when processing TDLS Setup Confirm to make sure that the link
counters are stored for the current TDLS entery.

This is also changing the control interface search for TDLS counters
to require initiator/responder addresses in the correct order instead
of matching entries regardless of the role.

14 years agowlantest: Add counters for TDLS setup frames
Jouni Malinen [Mon, 24 Jan 2011 12:03:03 +0000 (14:03 +0200)] 
wlantest: Add counters for TDLS setup frames

14 years agowlantest: Add TDLS entry on TDLS Setup Request
Jouni Malinen [Wed, 19 Jan 2011 12:00:14 +0000 (14:00 +0200)] 
wlantest: Add TDLS entry on TDLS Setup Request

This will make the TDLS counters available even if setup fails.

14 years agowlantest: Check WPA/RSN IE match between AssocReq and Beacon
Jouni Malinen [Mon, 17 Jan 2011 17:52:35 +0000 (19:52 +0200)] 
wlantest: Check WPA/RSN IE match between AssocReq and Beacon

Note unexpected WPA/RSN IE in AssocReq and ignore them if the last
Beacon/ProbeResp from the AP is not advertising support for
WPA/RSN.

14 years agoAP: Validate management frame length
Jouni Malinen [Mon, 17 Jan 2011 10:21:29 +0000 (12:21 +0200)] 
AP: Validate management frame length

Make sure that received management frames are long enough before
processing them. This avoids a potential segmentation fault if a
driver delivers an invalid frame all the way to hostapd.

14 years agoEAP-pwd: Fix some interoperability issues
Dan Harkins [Sun, 16 Jan 2011 11:12:07 +0000 (13:12 +0200)] 
EAP-pwd: Fix some interoperability issues

The changes are:

  1. the word "and" in the hunting-and-pecking string passed to the KDF
     should be capitalized.
  2. the primebitlen used in the KDF should be a short not an int.
  3. the computation of MK in hostap is based on an older version of the
     draft and is not the way it's specified in the RFC.
  4. the group being passed into computation of the Commit was not in
     network order.

14 years agoEAP-pwd: Use os_free to free memory allocated with os_malloc
Jouni Malinen [Sun, 16 Jan 2011 11:02:11 +0000 (13:02 +0200)] 
EAP-pwd: Use os_free to free memory allocated with os_malloc

The direct use of free() caused a crash with CONFIG_WPA_TRACE=y.

14 years agoWPA: Add more info for EAPOL-Key Nonce/MIC debugging
Jouni Malinen [Sat, 15 Jan 2011 14:57:08 +0000 (16:57 +0200)] 
WPA: Add more info for EAPOL-Key Nonce/MIC debugging