libeap.git
14 years agoFix WPS IE in Probe Response frame to include proper Config Methods values
Jouni Malinen [Sat, 13 Mar 2010 11:39:22 +0000 (13:39 +0200)]
Fix WPS IE in Probe Response frame to include proper Config Methods values

This attribute is supposed to indicate which methods the AP supports as
an Enrollee for adding external Registrars. It was left to 0 when the
AP code did not yet support external Registrars and was forgotten when
the ER support was added.

14 years agowpa_cli: Improved command parameter tab completion
Jouni Malinen [Fri, 12 Mar 2010 17:43:15 +0000 (19:43 +0200)]
wpa_cli: Improved command parameter tab completion

14 years agowpa_cli: Fix detach race with forked monitor process
Jouni Malinen [Fri, 12 Mar 2010 15:34:56 +0000 (17:34 +0200)]
wpa_cli: Fix detach race with forked monitor process

Need to kill the monitor process before running detach command on
the monitor connection to avoid race where the monitor process may
end up getting the detach command result.

14 years agowpa_cli: Redisplay readline edit after event messages
Jouni Malinen [Fri, 12 Mar 2010 15:24:50 +0000 (17:24 +0200)]
wpa_cli: Redisplay readline edit after event messages

14 years agoFT: Add preliminary processing of FT Action Response from EVENT_RX_ACTION
Jouni Malinen [Thu, 11 Mar 2010 22:43:00 +0000 (00:43 +0200)]
FT: Add preliminary processing of FT Action Response from EVENT_RX_ACTION

Previously, this was only done with userspace MLME (i.e., driver_test.c);
now, driver_nl80211.c can deliver the FT Action Response (FT-over-DS)
for processing. The reassociation after successful FT Action frame
exchange is not yet implemented.

14 years agonl80211: Fix FT Action send command
Jouni Malinen [Thu, 11 Mar 2010 22:41:03 +0000 (00:41 +0200)]
nl80211: Fix FT Action send command

Need to include payload header in the data length to avoid sending
truncated FT Action frame.

14 years agoNetBSD: Fix driver_bsd.c build
Masashi Honma [Wed, 10 Mar 2010 21:33:10 +0000 (23:33 +0200)]
NetBSD: Fix driver_bsd.c build

On NetBSD 5.0.2, wpa_supplicant build results in messages below.

../src/drivers/driver_bsd.c: In function 'wpa_driver_bsd_get_ssid':
../src/drivers/driver_bsd.c:876: warning: passing argument 2 of 'bsd_get_ssid'
from incompatible pointer type
../src/drivers/driver_bsd.c:876: warning: passing argument 3 of 'bsd_get_ssid'
makes integer from pointer without a cast
../src/drivers/driver_bsd.c:876: error: too many arguments to function
'bsd_get_ssid'
../src/drivers/driver_bsd.c: In function 'wpa_driver_bsd_scan':
../src/drivers/driver_bsd.c:1125: warning: passing argument 2 of 'bsd_set_ssid'
from incompatible pointer type
../src/drivers/driver_bsd.c:1125: warning: passing argument 3 of 'bsd_set_ssid'
makes integer from pointer without a cast
../src/drivers/driver_bsd.c:1125: error: too many arguments to function
'bsd_set_ssid'
gmake: *** [../src/drivers/driver_bsd.o] Error 1

This patch solves this issue.

14 years agonl80211: Add preliminary implementation of FT Action send
Jouni Malinen [Sun, 7 Mar 2010 20:47:39 +0000 (22:47 +0200)]
nl80211: Add preliminary implementation of FT Action send

This is a step in adding FT support with nl80211-based drivers.
driver_nl80211.c is now registering to handle the FT Action frames
and is able to transmit FT Request frame. Received FT Action frames
are not yet indicated as driver events.

14 years agoFT: Include pairwise cipher suite in PMK-R0 SA and PMK-R1 SA
Jouni Malinen [Sun, 7 Mar 2010 20:18:33 +0000 (22:18 +0200)]
FT: Include pairwise cipher suite in PMK-R0 SA and PMK-R1 SA

This is needed to fix PTK derivation to use correct length. Previously,
64-octet PTK may have been derived if the authenticator did not already
have a STA entry. Now, the correct pairwise cipher suite is learned when
then PMK-R1 SA is received.

14 years agonl80211: Fix driver context pointer for auth-failure-case
Jouni Malinen [Sun, 7 Mar 2010 19:29:34 +0000 (21:29 +0200)]
nl80211: Fix driver context pointer for auth-failure-case

The new per-BSS context needs to be used here when calling
wpa_driver_nl80211_deauthenticate() to avoid passing incorrect
data type to the function.

14 years agoFix a typo in r1kh config parameter description
Jouni Malinen [Sun, 7 Mar 2010 19:16:42 +0000 (21:16 +0200)]
Fix a typo in r1kh config parameter description

The second item on the line is R1KH-ID, not R0KH-ID.

14 years agoFix typo in WPA_AUTH_ALG_FT definition
Marcin Marzec [Sun, 7 Mar 2010 19:02:55 +0000 (21:02 +0200)]
Fix typo in WPA_AUTH_ALG_FT definition

This was not supposed to have duplicate value with WPA_AUTH_ALG_LEAP.
The previous version was unable to set FT as the authentication
algorithm with nl80211.

14 years agowpa_gui: Remove unneeded wpa_ctrl_request() msg_cb
Jouni Malinen [Sun, 7 Mar 2010 15:28:00 +0000 (17:28 +0200)]
wpa_gui: Remove unneeded wpa_ctrl_request() msg_cb

14 years agoRemove unnecessary ifname parameter from set_ap_wps_ie() driver op
Jouni Malinen [Sun, 7 Mar 2010 09:51:50 +0000 (11:51 +0200)]
Remove unnecessary ifname parameter from set_ap_wps_ie() driver op

14 years agoRemove unnecessary ifname parameter from set_ht_params() driver op
Jouni Malinen [Sun, 7 Mar 2010 09:49:27 +0000 (11:49 +0200)]
Remove unnecessary ifname parameter from set_ht_params() driver op

14 years agoRemove unnecessary ifname parameter to sta_set_flags() driver op
Jouni Malinen [Sun, 7 Mar 2010 09:45:41 +0000 (11:45 +0200)]
Remove unnecessary ifname parameter to sta_set_flags() driver op

14 years agoRemove unnecessary ifname parameter from sta_add() driver op
Jouni Malinen [Sun, 7 Mar 2010 09:42:41 +0000 (11:42 +0200)]
Remove unnecessary ifname parameter from sta_add() driver op

14 years agoRemove unnecessary ifname parameter from hapd_get_ssid/hapd_set_ssid
Jouni Malinen [Sun, 7 Mar 2010 09:36:45 +0000 (11:36 +0200)]
Remove unnecessary ifname parameter from hapd_get_ssid/hapd_set_ssid

14 years agoRemove unnecessary ifname parameter from set_generic_elem() driver op
Jouni Malinen [Sun, 7 Mar 2010 09:33:06 +0000 (11:33 +0200)]
Remove unnecessary ifname parameter from set_generic_elem() driver op

14 years agoRemove unneeded ifname parameter from set_privacy() driver op
Jouni Malinen [Sun, 7 Mar 2010 09:29:17 +0000 (11:29 +0200)]
Remove unneeded ifname parameter from set_privacy() driver op

14 years agodriver_test: Use driver private BSS context instead of BSS lookup
Jouni Malinen [Sun, 7 Mar 2010 09:26:35 +0000 (11:26 +0200)]
driver_test: Use driver private BSS context instead of BSS lookup

The ifname-based lookup can now be replaced with the new mechanism that
allows driver wrappers to register per-BSS context data.

14 years agoAvoid crash after driver init failure
Jouni Malinen [Sun, 7 Mar 2010 09:25:28 +0000 (11:25 +0200)]
Avoid crash after driver init failure

hostapd_flush_old_stations() needs to check whether the driver
initialization was successful since it gets called on an error path.

14 years agoRemove unneeded iface parameter from if_add() driver op
Jouni Malinen [Sun, 7 Mar 2010 08:05:05 +0000 (10:05 +0200)]
Remove unneeded iface parameter from if_add() driver op

14 years agoRemove forgotten ifname parameter from set_beacon() call
Jouni Malinen [Sun, 7 Mar 2010 08:04:35 +0000 (10:04 +0200)]
Remove forgotten ifname parameter from set_beacon() call

14 years agohostapd: fix a segfault in the error path of the nl80211 if_add function
Felix Fietkau [Sun, 7 Mar 2010 07:59:22 +0000 (09:59 +0200)]
hostapd: fix a segfault in the error path of the nl80211 if_add function

14 years agonl80211: Unregister forgotten eloop socket on init failure
Jouni Malinen [Sat, 6 Mar 2010 20:37:48 +0000 (22:37 +0200)]
nl80211: Unregister forgotten eloop socket on init failure

14 years agoRemove unnecessary ifname parameter from set_beacon()
Jouni Malinen [Sat, 6 Mar 2010 20:36:40 +0000 (22:36 +0200)]
Remove unnecessary ifname parameter from set_beacon()

The new per-BSS driver context makes this unnecessary.

14 years agohostapd: allow stations to move between different bss interfaces
Felix Fietkau [Sat, 6 Mar 2010 20:30:25 +0000 (22:30 +0200)]
hostapd: allow stations to move between different bss interfaces

With this patch, a client gets kicked out of the last BSS it was
attached to, when it is associating to a different one.
While mac80211 does allow a station to be present on multiple bss
interfaces, this does seem to cause problems both for the stack
and for hostapd.

14 years agohostapd: Fix interface selection for the nl80211 driver
Felix Fietkau [Sat, 6 Mar 2010 20:22:56 +0000 (22:22 +0200)]
hostapd: Fix interface selection for the nl80211 driver

This patch allows the nl80211 driver to create its own per-bss context
and pass it to the drv_priv pointer of the hostapd bss state.
With this and the following patch, stations can associate to and switch
between multiple BSS interfaces of a single wiphy.
This obsoletes a few instances of passing ifname to a callback, those
can be removed in a separate patch.
It might also be useful to move more fields from the driver data to the
per-bss data structure in the future.

14 years agohostapd: fix bogus nl80211 interface remove messages for STA WDS
Felix Fietkau [Sat, 6 Mar 2010 18:52:22 +0000 (20:52 +0200)]
hostapd: fix bogus nl80211 interface remove messages for STA WDS

14 years agohostapd: add ifname to the sta_set_flags callback
Felix Fietkau [Sat, 6 Mar 2010 18:44:31 +0000 (20:44 +0200)]
hostapd: add ifname to the sta_set_flags callback

This fixes multi-BSS STA operations (e.g., setting AUTHORIZED flag) with
nl80211-based drivers.

14 years agoRemove unneeded CONFIG_EAP comments
Jouni Malinen [Sat, 6 Mar 2010 14:40:53 +0000 (16:40 +0200)]
Remove unneeded CONFIG_EAP comments

These are not needed for WPS builds since CONFIG_WPS=y enables all
the needed EAP components.

14 years agoAvoid warnings on unused function/variables if debug is disabled
Jouni Malinen [Sat, 6 Mar 2010 14:37:57 +0000 (16:37 +0200)]
Avoid warnings on unused function/variables if debug is disabled

CONFIG_NO_STDOUT_DEBUG removes wpa_printf() calls, so need to ifdef
some function and variable definitions to avoid compiler warnings.

14 years agoUpdate priority list after priority change
Dmitry Shmidt [Sat, 6 Mar 2010 09:13:50 +0000 (11:13 +0200)]
Update priority list after priority change

Despite comments in the wpa_config_update_prio_list(struct wpa_config
*config) telling that it is called "if priority for a network is
changed", it is apparently not.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agowpa_supplicant: fix FTBFS on Debian GNU/kFreeBSD
Kel Modderman [Sat, 6 Mar 2010 08:16:47 +0000 (10:16 +0200)]
wpa_supplicant: fix FTBFS on Debian GNU/kFreeBSD

This patch allows wpa_supplicant to compile on Debian's kfreebsd
architectures.

Patch by Stefan Lippers-Hollmann based on work done by Petr Salinger
and Emmanuel Bouthenot for 0.6.X (http://bugs.debian.org/480572).

14 years agobsd: Use os_strlcpy instead of strlcpy
Jouni Malinen [Sat, 6 Mar 2010 08:04:41 +0000 (10:04 +0200)]
bsd: Use os_strlcpy instead of strlcpy

14 years agoAdd optional scan result filter based on SSID
Jouni Malinen [Fri, 5 Mar 2010 19:42:06 +0000 (21:42 +0200)]
Add optional scan result filter based on SSID

filter_ssids=1 global configuration parameter can now be used to
enable scan result filtering (with -Dnl80211 only for now) based on
the configured SSIDs. In other words, only the scan results that have
an SSID matching with one of the configured networks are included in the
BSS table. This can be used to reduce memory needs in environments that
have huge number of APs.

14 years agoMake maximum BSS table size configurable
Jouni Malinen [Fri, 5 Mar 2010 18:20:09 +0000 (20:20 +0200)]
Make maximum BSS table size configurable

New global configuration parameter bss_max_count can now be used to
change the maximum BSS table size. The old fixed size limit (200) is
used as the default value for this parameter.

14 years agoAllow roam based on preferred BSSID regardless of signal strength
Jouni Malinen [Sun, 28 Feb 2010 09:09:58 +0000 (11:09 +0200)]
Allow roam based on preferred BSSID regardless of signal strength

14 years agoDo not inhibit suspend even if wpa_cli command fails
Jouni Malinen [Sat, 27 Feb 2010 18:03:13 +0000 (20:03 +0200)]
Do not inhibit suspend even if wpa_cli command fails

There is no point in inhibiting suspend in case wpa_supplicant is
not running and as such, return success unconditionally from this
script.

14 years agoAdd suspend/resume notifications
Jouni Malinen [Sat, 27 Feb 2010 16:46:02 +0000 (18:46 +0200)]
Add suspend/resume notifications

wpa_supplicant can now be notified of suspend/resume events, e.g.,
from pm-action scripts. This allows wpa_supplicant to clear information
that may become invalid during a suspend operation.

14 years agoClear current_bss pointer on disassociation/deauthentication
Jouni Malinen [Sat, 27 Feb 2010 16:40:25 +0000 (18:40 +0200)]
Clear current_bss pointer on disassociation/deauthentication

This is needed to allow the BSS table entry for the previously used
BSS to be removed. Now wpa_bss_in_use() can return 0 for the last BSS
that was used as soon as deauthentication/disassociation event has been
received.

14 years agoAdd more debug prints to make deauth/disassoc events clearer
Jouni Malinen [Sat, 27 Feb 2010 16:39:09 +0000 (18:39 +0200)]
Add more debug prints to make deauth/disassoc events clearer

14 years agoUse os_snprintf instead of snprintf
Jouni Malinen [Fri, 19 Feb 2010 17:14:41 +0000 (19:14 +0200)]
Use os_snprintf instead of snprintf

14 years agoRename EAP server source files to avoid duplicate names
Jouni Malinen [Fri, 19 Feb 2010 16:54:07 +0000 (18:54 +0200)]
Rename EAP server source files to avoid duplicate names

This makes it easier to build both EAP peer and server functionality
into the same project with some toolchains.

14 years agoMake EAPOL Authenticator buildable with Microsoft compiler
Jouni Malinen [Fri, 19 Feb 2010 16:35:40 +0000 (18:35 +0200)]
Make EAPOL Authenticator buildable with Microsoft compiler

14 years agobsd: Use device capability information
Masashi Honma [Tue, 16 Feb 2010 17:47:00 +0000 (19:47 +0200)]
bsd: Use device capability information

This patch enables the use of device capability information from the
driver when possible.

14 years agonl80211: Add support for off-channel Action TX/RX commands
Jouni Malinen [Tue, 16 Feb 2010 17:41:49 +0000 (19:41 +0200)]
nl80211: Add support for off-channel Action TX/RX commands

The kernel side support for this was just added into
wireless-testing.git. This commit adds the driver wrapper code needed
to allow wpa_supplicant to use the new functionality.

14 years agoAdd alloc_interface_addr() drv op option for specifying ifname
Jouni Malinen [Tue, 16 Feb 2010 17:34:51 +0000 (19:34 +0200)]
Add alloc_interface_addr() drv op option for specifying ifname

Some drivers may need to use a specific ifname for the virtual
interface, so allow them to do this with a new parameter passed
to the alloc_interface_addr() handler.

14 years agoSync with linux/nl80211.h from wireless-testing.git
Jouni Malinen [Tue, 16 Feb 2010 17:28:38 +0000 (19:28 +0200)]
Sync with linux/nl80211.h from wireless-testing.git

14 years agowpa_cli: Add option to use child process to receive events
Jouni Malinen [Sun, 14 Feb 2010 14:14:20 +0000 (16:14 +0200)]
wpa_cli: Add option to use child process to receive events

CFLAGS += -DCONFIG_WPA_CLI_FORK=y in .config can be used to
configure wpa_cli build to make a version of wpa_cli that forks
a child process to receive event messages. This allows the events
to be shown immediately instead of having to wait for the next
periodic poll with PING.

14 years agoEAP-TNC: Add Flags field into fragment acknowledgement
Jouni Malinen [Sun, 14 Feb 2010 14:08:15 +0000 (16:08 +0200)]
EAP-TNC: Add Flags field into fragment acknowledgement

TNC IF-T is somewhat unclear on this are, but
draft-hanna-nea-pt-eap-00.txt, which is supposed to define the same
protocol, is clearer on the Flags field being included.

This change breaks interoperability with the old implementation if
EAP-TNC fragmentation is used. The old version would not accept
the acknowledgement message with the added Flags octet while the
new version accepts messagss with with both options.

14 years agowpa_gui: Use separate ctrl_iface connection for event messages
Jouni Malinen [Sat, 13 Feb 2010 19:37:35 +0000 (21:37 +0200)]
wpa_gui: Use separate ctrl_iface connection for event messages

14 years agoEAP-TNC server: Fix processing when last message is fragmented
Jouni Malinen [Sat, 13 Feb 2010 16:03:52 +0000 (18:03 +0200)]
EAP-TNC server: Fix processing when last message is fragmented

If the last message from the EAP-TNC server was fragmented, the
fragment processing lost the DONE/FAIL state and did not know how
to handle the final ACK from the peer. Fix this by remembering the
earlier DONE/FAIL state when fragmenting a frame.

14 years agoEAP-TNC: Accept fragment ack frame with Flags field
Jouni Malinen [Sat, 13 Feb 2010 16:00:39 +0000 (18:00 +0200)]
EAP-TNC: Accept fragment ack frame with Flags field

TNC IF-T specification is unclear on the exact contents of the fragment
acknowledgement frame. An interoperability issue with the tncs@fhh
implementation was reported by Arne Welzel
<arne.welzel@stud.fh-hannover.de> due to the different interpretations
of the specification. Relax EAP-TNC server/peer validation rules to
accept fragmentation acknowledgement frames to include the Flags field
to avoid this issue.

14 years agowpa_gui-qt4: do not show WPS AP available event tray messages
Kel Modderman [Sat, 13 Feb 2010 12:03:18 +0000 (14:03 +0200)]
wpa_gui-qt4: do not show WPS AP available event tray messages

Do not show WPS event tray messages as they can happen too frequently.

Signed-off-by: Kel Modderman <kel@otaku42.de>
14 years agobsd: Aggregate ioctl routines
Masashi Honma [Sat, 13 Feb 2010 11:59:29 +0000 (13:59 +0200)]
bsd: Aggregate ioctl routines

This patch aggregates ioctls.

First is SIOCS80211. The SIOCS80211's arguments has 3 couples.
        1-1. i_len, i_data
        1-2. i_val
        1-3. i_len, i_data, i_val (currently only IEEE80211_IOC_APPIE)
There were 3 routines for each cases. This patch aggregates these to
one.

Second is SIOCG80211. The SIOCG80211 returns 2 type of value.
        2-1. i_len
        2-2. i_val
There were 2 routines for each cases. This patch aggregates these to
one.

I have tested on both FreeBSD 8.0 and NetBSD 5.0.1 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

14 years agoFreeBSD: Add support for FreeBSD 8.0 STA/AP
Masashi Honma [Sat, 13 Feb 2010 11:57:39 +0000 (13:57 +0200)]
FreeBSD: Add support for FreeBSD 8.0 STA/AP

This patch adds both wpa_supplicant and hostapd support for
FreeBSD 8.0.

I refered
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/wpa/hostapd/driver_freebsd
.c
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/wpa/wpa_supplicant/driver_
freebsd.c

I have tested on FreeBSD 8.0 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

14 years agoFreeBSD: Enable channel control
Masashi Honma [Sat, 13 Feb 2010 11:54:27 +0000 (13:54 +0200)]
FreeBSD: Enable channel control

This patch enables FreeBSD channel control.

I have tested on FreeBSD 7.2 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

14 years agobsd: Unify wpa_driver_bsd_ops
Masashi Honma [Sat, 13 Feb 2010 11:52:03 +0000 (13:52 +0200)]
bsd: Unify wpa_driver_bsd_ops

The attached patch unifies hostapd wpa_driver_bsd_ops and
wpa_supplicant wpa_driver_bsd_ops.

I have tested on NetBSD 5.0.1 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

14 years agobsd: Unify struct bsd_driver_data and struct wpa_driver_bsd_data
Masashi Honma [Sat, 13 Feb 2010 11:50:19 +0000 (13:50 +0200)]
bsd: Unify struct bsd_driver_data and struct wpa_driver_bsd_data

This patch unifies struct bsd_driver_data and struct wpa_driver_bsd_data.

14 years agobsd: Use same field name between hostapd and wpa_supplicant
Masashi Honma [Sat, 13 Feb 2010 11:48:52 +0000 (13:48 +0200)]
bsd: Use same field name between hostapd and wpa_supplicant

This patch modifies field name of struct bsd_driver_data to use
same name of struct wpa_driver_bsd_data. This is a preparation of
unifying struct bsd_driver_data and struct wpa_driver_bsd_data.

14 years agoAdd TLS client events, server probing, and srv cert matching
Jouni Malinen [Sat, 13 Feb 2010 09:14:23 +0000 (11:14 +0200)]
Add TLS client events, server probing, and srv cert matching

This allows external programs (e.g., UI) to get more information
about server certificate chain used during TLS handshake. This can
be used both to automatically probe the authentication server to
figure out most likely network configuration and to get information
about reasons for failed authentications.

The follow new control interface events are used for this:
CTRL-EVENT-EAP-PEER-CERT
CTRL-EVENT-EAP-TLS-CERT-ERROR

In addition, there is now an option for matching the server certificate
instead of the full certificate chain for cases where a trusted CA is
not configured or even known. This can be used, e.g., by first probing
the network and learning the server certificate hash based on the new
events and then adding a network configuration with the server
certificate hash after user have accepted it. Future connections will
then be allowed as long as the same server certificate is used.

Authentication server probing can be done, e.g., with following
configuration options:
    eap=TTLS PEAP TLS
    identity=""
    ca_cert="probe://"

Example set of control events for this:
CTRL-EVENT-EAP-STARTED EAP authentication started
CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=21
CTRL-EVENT-EAP-METHOD EAP vendor 0 method 21 (TTLS) selected
CTRL-EVENT-EAP-PEER-CERT depth=0 subject='/C=US/ST=California/L=San Francisco/CN=Server/emailAddress=server@kir.nu' hash=5a1bc1296205e6fdbe3979728efe3920798885c1c4590b5f90f43222d239ca6a
CTRL-EVENT-EAP-TLS-CERT-ERROR reason=8 depth=0 subject='/C=US/ST=California/L=San Francisco/CN=Server/emailAddress=server@kir.nu' err='Server certificate chain probe'
CTRL-EVENT-EAP-FAILURE EAP authentication failed

Server certificate matching is configured with ca_cert, e.g.:
    ca_cert="hash://server/sha256/5a1bc1296205e6fdbe3979728efe3920798885c1c4590b5f90f43222d239ca6a"

This functionality is currently available only with OpenSSL. Other
TLS libraries (including internal implementation) may be added in
the future.

14 years agoFix memory leak on TLS setup error path
Jouni Malinen [Sat, 13 Feb 2010 08:19:41 +0000 (10:19 +0200)]
Fix memory leak on TLS setup error path

Need tof free TLS context in some cases to avoid a memory leak
on error path.

14 years agoFix TLS in/out buffer freeing
Jouni Malinen [Fri, 12 Feb 2010 19:13:51 +0000 (21:13 +0200)]
Fix TLS in/out buffer freeing

The previous version could end leaking memory since os_free() was used
instead of wpabuf_free(). In addition, this could potentially have
triggered a crash if the TLS context were being freed when pending
input data where still in the buffer (though, this may not be possible
to trigger in practice).

14 years agoOpenSSL: Fix tls_init(NULL) with FIPS-enabled build
Jouni Malinen [Fri, 12 Feb 2010 18:51:10 +0000 (20:51 +0200)]
OpenSSL: Fix tls_init(NULL) with FIPS-enabled build

The conf argument to tls_init() may be NULL (as it is when using
hostapd), so we must check that here before dereferencing the
pointer.

14 years agoWPS: Fix AP operation with internal Registrar when ER is also active
Jouni Malinen [Fri, 12 Feb 2010 10:38:14 +0000 (12:38 +0200)]
WPS: Fix AP operation with internal Registrar when ER is also active

Ignore the pending WPS message from ER (PutWLANReseponse action) if the
internal Registrar has already sent out M2.

14 years agoAdd new ctrl_iface event for EAP methods proposed by the server
Jouni Malinen [Thu, 11 Feb 2010 17:48:36 +0000 (19:48 +0200)]
Add new ctrl_iface event for EAP methods proposed by the server

This makes it easier for external programs to probe EAP server
preferences and potentially automatically detect which method
could be used.

14 years agonl80211: Do not try to remove non-existing STA WDS interface
Jouni Malinen [Wed, 10 Feb 2010 09:29:53 +0000 (11:29 +0200)]
nl80211: Do not try to remove non-existing STA WDS interface

This removes confusing error messages from the default (no WDS) case.

14 years agodriver_bsd: Fix build without SIOCS80211CHANNEL
Jouni Malinen [Mon, 8 Feb 2010 19:41:51 +0000 (21:41 +0200)]
driver_bsd: Fix build without SIOCS80211CHANNEL

At least FreeBSD 7 does not seem to define this and failed to build
after the previous changes.

14 years agodriver_bsd.c: Enable AP mode wpa_supplicant
Masashi Honma [Mon, 8 Feb 2010 19:33:59 +0000 (21:33 +0200)]
driver_bsd.c: Enable AP mode wpa_supplicant

14 years agodriver_bsd: Clean up EAPOL frame transmission code
Masashi Honma [Mon, 8 Feb 2010 19:28:59 +0000 (21:28 +0200)]
driver_bsd: Clean up EAPOL frame transmission code

The bsd_send_eapol() adds Ethernet header by itself. This patch changes it
to use l2_packet functionality.

I have tested on NetBSD 5.0.1 with WPA-PSK(TKIP).

14 years agodriver_bsd.c: Reduce code duplication (setkey)
Masashi Honma [Mon, 8 Feb 2010 19:25:18 +0000 (21:25 +0200)]
driver_bsd.c: Reduce code duplication (setkey)

This patch reduces code duplication between hostapd and wpa_supplicant
for IEEE80211_IOC_WPAKEY.

14 years agodriver_bsd.c: Reduce code duplication (ifflag)
Masashi Honma [Mon, 8 Feb 2010 19:23:28 +0000 (21:23 +0200)]
driver_bsd.c: Reduce code duplication (ifflag)

This patch reduces code duplication between hostapd and wpa_supplicant
for SIOC[GS]IFFLAGS.

14 years agodriver_bsd.c: Reduce code duplication (MLME)
Masashi Honma [Mon, 8 Feb 2010 19:21:23 +0000 (21:21 +0200)]
driver_bsd.c: Reduce code duplication (MLME)

This patch reduces code duplication between hostapd and wpa_supplicant
about IEEE80211_IOC_MLME. This is a preparation for AP mode
wpa_supplicant.

14 years agodriver_bsd.c: Reduce code duplication (DELKEY)
Masashi Honma [Mon, 8 Feb 2010 19:18:09 +0000 (21:18 +0200)]
driver_bsd.c: Reduce code duplication (DELKEY)

This patch reduces code duplication between hostapd and wpa_supplicant
about IEEE80211_IOC_DELKEY. This is a preparation for AP mode
wpa_supplicant. This is a patch to
http://lists.shmoo.com/pipermail/hostap/2010-January/021030.html.

14 years agobsd: Enable auto configuration
Masashi Honma [Mon, 8 Feb 2010 19:14:22 +0000 (21:14 +0200)]
bsd: Enable auto configuration

On NetBSD, we should configure some parameters manually out of hostapd
like below.

  ifconfig ath0 mediaopt hostap
  ifconfig ath0 mode 11g
  ifconfig ath0 chan 6

This patch does these automatically. Maybe there will be some
objections, like "hardware configuration is not hostapd/wpa_supplican's
work". So I will write the reasons why I made this patch.

1. For usability.
2. The first command fails when previous state is adhoc. This patch is
free from previous state.
3. Some driver wrappers configure these automatically (like nl80211).
4. I have wasted time trying to find out these command were needed :(

14 years agodriver_bsd.c: Use os_free() instead of free()
Masashi Honma [Mon, 8 Feb 2010 19:11:52 +0000 (21:11 +0200)]
driver_bsd.c: Use os_free() instead of free()

This patch replaces some free() with os_free() when the memory was
allocated by os_*().

14 years agodriver_ps3: Remove legacy ps3 wpa driver
Hamish Guthrie [Mon, 8 Feb 2010 19:08:54 +0000 (21:08 +0200)]
driver_ps3: Remove legacy ps3 wpa driver

The ps3 wireless kernel driver has wireless extension support.
There is a legacy wpa_supplicant driver, and support for this
has been removed from the kernel driver, as no distributions
are using it.

14 years agowpa_gui-qt4: Stop BSS fetch loop on error for Peers dialog
Jouni Malinen [Mon, 25 Jan 2010 02:42:45 +0000 (18:42 -0800)]
wpa_gui-qt4: Stop BSS fetch loop on error for Peers dialog

There is no need to continue the loop until the 1000 max BSS limit
if a BSS command fails.

14 years agoTry to avoid some unnecessary roaming
Jouni Malinen [Mon, 25 Jan 2010 02:19:50 +0000 (18:19 -0800)]
Try to avoid some unnecessary roaming

When multiple APs are present in scan results with similar signal
strength, wpa_supplicant may end up bounching between them frequently
whenever new scan results are available (e.g., due to periodic scans
requested by NetworkManager). This can result in unnecessary roaming
and in case of the current cfg80211 version, to frequent network
disconnections.

Do not request a roam if the current BSS is still present in the scan
results and the selected BSS is in the same ESS and has only a slighly
stronger signal strength.

14 years agonl80211: Dump scan results in debug log if association command fails
Jouni Malinen [Mon, 25 Jan 2010 02:11:30 +0000 (18:11 -0800)]
nl80211: Dump scan results in debug log if association command fails

This may help in debugging why cfg80211 refused the association
command since the scan results should include information about all
pending authentication and association states.

14 years agoSME: Request a new scan if SME association command fails
Jouni Malinen [Mon, 25 Jan 2010 02:09:36 +0000 (18:09 -0800)]
SME: Request a new scan if SME association command fails

This handles some error cases without getting stuck waiting for new
events from the driver if association command fails for any reason.

14 years agonl80211: Clear cfg80211 authentication data for old entries
Jouni Malinen [Mon, 25 Jan 2010 02:07:34 +0000 (18:07 -0800)]
nl80211: Clear cfg80211 authentication data for old entries

cfg80211 has a limit on pending authentications, so we better clear
the entries that we do not care about to avoid hitting the limit
when roaming between multiple APs.

14 years agoap: Reorder authsrv_init() to fix IEEE 802.1X initialization
Christian Lamparter [Sun, 17 Jan 2010 10:14:17 +0000 (12:14 +0200)]
ap: Reorder authsrv_init() to fix IEEE 802.1X initialization

This patch moves the authentication server setup before
IEEE 802.1X initialization. It's because 802.1X already
needs to have a valid SSL context.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
14 years agoPreparations for v0.7.1 release hostap_0_7_1
Jouni Malinen [Sat, 16 Jan 2010 17:04:38 +0000 (19:04 +0200)]
Preparations for v0.7.1 release

14 years agoUpdate VS 2005 project files with new/removed source files
Jouni Malinen [Sat, 16 Jan 2010 16:49:17 +0000 (18:49 +0200)]
Update VS 2005 project files with new/removed source files

14 years agoMake sure the resutl from readlink is properly null terminated
Jouni Malinen [Sat, 16 Jan 2010 15:19:06 +0000 (17:19 +0200)]
Make sure the resutl from readlink is properly null terminated

14 years agodbus: Change WPA/RSNIE byte array props to dicts
Witold Sowa [Sat, 16 Jan 2010 14:37:37 +0000 (16:37 +0200)]
dbus: Change WPA/RSNIE byte array props to dicts

Expose RSN and WPA properties for BSS objects containing information
about key management and cipher suites. Get rid of WPA/RSN/WPSIE
byte array properties and add IEs byte array property with all IE data
instead.

14 years agoFetch IEs from both Beacon and Probe Response frames if available
Jouni Malinen [Sat, 16 Jan 2010 14:11:05 +0000 (16:11 +0200)]
Fetch IEs from both Beacon and Probe Response frames if available

This allows the driver wrappers to return two sets of IEs, so that
the BSS code can use information from both Beacon and Probe Response
frames if needed. For example, some Cisco APs seem to include more
information in Wireless Provisioning Services IE when it is in the
Beacon frame.

14 years agohostapd: Detect bridge interface automatically
Jouni Malinen [Sat, 16 Jan 2010 13:19:58 +0000 (15:19 +0200)]
hostapd: Detect bridge interface automatically

This makes the bridge parameter unnecessary for cases where the interface
is already in a bridge and sysfs is mounted to /sys so that the detection
code works.

For nl80211, the bridge parameter can be used to request the AP
interface to be added to the bridge automatically (brctl may refuse to
do this before hostapd has been started to change the interface mode).
If needed, the bridge interface is also created.

14 years agodriver_test: Learn scan result channel from DS Params IE
Jouni Malinen [Sat, 16 Jan 2010 10:26:03 +0000 (12:26 +0200)]
driver_test: Learn scan result channel from DS Params IE

14 years agodriver_test: Initialize bss_ctx based on drv->ctx for new BSS interfaces
Jouni Malinen [Sat, 16 Jan 2010 10:24:31 +0000 (12:24 +0200)]
driver_test: Initialize bss_ctx based on drv->ctx for new BSS interfaces

This is needed with wpa_supplicant to get the correct context pointer
for a virtual BSS interface.

14 years agodriver_test: Add support for per-SSID scans for non-MLME case
Jouni Malinen [Sat, 16 Jan 2010 10:23:39 +0000 (12:23 +0200)]
driver_test: Add support for per-SSID scans for non-MLME case

14 years agoAdd deinit_ap driver op to help wpa_supplicant AP mode use
Jouni Malinen [Sat, 16 Jan 2010 10:20:51 +0000 (12:20 +0200)]
Add deinit_ap driver op to help wpa_supplicant AP mode use

14 years agoAdd BSSID to TX/RX Action frame driver ops
Jouni Malinen [Sat, 16 Jan 2010 10:16:20 +0000 (12:16 +0200)]
Add BSSID to TX/RX Action frame driver ops

This meets better the needs for various Public Action frame use cases.

14 years agoAdd driver op for disabling 802.11b rates
Jouni Malinen [Sat, 16 Jan 2010 10:11:19 +0000 (12:11 +0200)]
Add driver op for disabling 802.11b rates

14 years agoSync with wireless-testing.git linux/nl80211.h
Jouni Malinen [Sat, 16 Jan 2010 10:06:42 +0000 (12:06 +0200)]
Sync with wireless-testing.git linux/nl80211.h

14 years agodriver_bsd.c: Clean up EAPOL frame transmission code
Masashi Honma [Sat, 16 Jan 2010 09:47:05 +0000 (11:47 +0200)]
driver_bsd.c: Clean up EAPOL frame transmission code

The bsd_send_eapol() prepares 3000 bytes buffer for every EAPOL
frame transmission. I think malloc() is better way for efficient
memory use.

14 years agoFix linking of nt_password_hash
Jouni Malinen [Sat, 16 Jan 2010 08:38:53 +0000 (10:38 +0200)]
Fix linking of nt_password_hash

Need to use conditional linking of some crypto functionality and add
couple of additional object files. [Bug 343]