mech_eap.git
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]

14 years agoRemove completed to-do item
Jouni Malinen [Sat, 16 Jan 2010 07:44:41 +0000 (09:44 +0200)]
Remove completed to-do item

14 years agoAdd preliminary documentation for ctrl_iface events
Jouni Malinen [Fri, 15 Jan 2010 17:24:08 +0000 (19:24 +0200)]
Add preliminary documentation for ctrl_iface events

14 years agowext: Add cfg80211-specific optimization to avoid silly behavior
Jouni Malinen [Tue, 12 Jan 2010 18:01:09 +0000 (20:01 +0200)]
wext: Add cfg80211-specific optimization to avoid silly behavior

If the driver is detected to use cfg80211, we can rely on it being able
to disconnect with SIOCSIWMLME commands and to use empty SSID as a way
to stop it from associating when we are in progress of configuring the
driver for association. Consequently, we can remove the hack that uses
random 32-octet SSID to force disconnection and re-order association
commands to match the expectations that cfg80211 has for WEXT ioctls.
This gets rid of extra scan rounds and attempts to associate with the
silly 32-octet SSID.

14 years agoPreparations for 0.6.10 release
Jouni Malinen [Tue, 12 Jan 2010 16:31:56 +0000 (18:31 +0200)]
Preparations for 0.6.10 release

14 years agoMake wpa_bss_get_max_rate() a bit more readable with a local variable
Jouni Malinen [Sun, 10 Jan 2010 20:53:36 +0000 (22:53 +0200)]
Make wpa_bss_get_max_rate() a bit more readable with a local variable

14 years agoVerify that os_get_random() success for SA Query id
Jouni Malinen [Sun, 10 Jan 2010 20:28:21 +0000 (22:28 +0200)]
Verify that os_get_random() success for SA Query id

14 years agowext: Check hexstr2bin() return value in custom scan text processing
Jouni Malinen [Sun, 10 Jan 2010 20:26:11 +0000 (22:26 +0200)]
wext: Check hexstr2bin() return value in custom scan text processing

14 years agoWEXT: Show BSSID/SSID set failures on disconnect in debug log
Jouni Malinen [Sun, 10 Jan 2010 20:18:50 +0000 (22:18 +0200)]
WEXT: Show BSSID/SSID set failures on disconnect in debug log

14 years agowext: Check hexstr2bin() return value
Jouni Malinen [Sun, 10 Jan 2010 20:16:51 +0000 (22:16 +0200)]
wext: Check hexstr2bin() return value

14 years agoWPS ER: Check uuid_str2bin() return value
Jouni Malinen [Sun, 10 Jan 2010 20:12:55 +0000 (22:12 +0200)]
WPS ER: Check uuid_str2bin() return value

14 years agoWPS ER: Verify os_get_random() return value
Jouni Malinen [Sun, 10 Jan 2010 20:08:43 +0000 (22:08 +0200)]
WPS ER: Verify os_get_random() return value

14 years agoEAP-FAST peer: Clean up PAC writing function
Jouni Malinen [Sun, 10 Jan 2010 20:04:59 +0000 (22:04 +0200)]
EAP-FAST peer: Clean up PAC writing function

Use more explicit validation of input parameters and clean up the
writes by using a local end-of-buffer variable to simplify
calculations.

14 years agoIBSS RSN: Explicitly check addr != NULL before passing it to memcmp
Jouni Malinen [Sun, 10 Jan 2010 19:53:17 +0000 (21:53 +0200)]
IBSS RSN: Explicitly check addr != NULL before passing it to memcmp

idx == 0 should be enough to make sure that the addr is set, but
verify that this is indeed the case to avoid any potential issues if
auth_set_key() gets called incorrectly.

14 years agoeloop: Clear timeout data during allocation
Jouni Malinen [Sun, 10 Jan 2010 19:48:27 +0000 (21:48 +0200)]
eloop: Clear timeout data during allocation

Better make sure the eloop_timeout data gets fully initialized. The
current code is filling in all the fields, but it is clearer to just
zero the buffer to make sure any new field added to the structure gets
initialized.

14 years agoIBSS RSN: Check explicitly that WPA auth sm assoc call succeeded
Jouni Malinen [Sun, 10 Jan 2010 19:45:44 +0000 (21:45 +0200)]
IBSS RSN: Check explicitly that WPA auth sm assoc call succeeded

Verify that association processing did not end up freeing the state
machine. This should not really happen in practice, but better verify
it anyway.

14 years agoRemove unnecessary bss != NULL checks from sme_authenticate()
Jouni Malinen [Sun, 10 Jan 2010 19:31:54 +0000 (21:31 +0200)]
Remove unnecessary bss != NULL checks from sme_authenticate()

This is already verified in the beginning of the function, so no need
to repeat that multiple times.

14 years agoCheck WPS attr build helper return value
Jouni Malinen [Sun, 10 Jan 2010 18:49:22 +0000 (20:49 +0200)]
Check WPS attr build helper return value

These are hardcoded to return success, but should check the value
anyway.

14 years agoFix client MLME test code for IBSS scan request
Jouni Malinen [Sun, 10 Jan 2010 18:41:33 +0000 (20:41 +0200)]
Fix client MLME test code for IBSS scan request

wpa_s->mlme.ssid is an array so it is always != NULL and this
comparision should really have used ssid_len instead.

14 years agoUse zero address when reporting unknown peer in SMK error
Jouni Malinen [Sun, 10 Jan 2010 17:00:25 +0000 (19:00 +0200)]
Use zero address when reporting unknown peer in SMK error

This avoids potential use of uninitialized stack memory when printing
out peer address based on SMK error message that does not include the
MAC address.

14 years agoAvoid a theoretical use-after-free in WPA auth sm init
Jouni Malinen [Sun, 10 Jan 2010 16:54:41 +0000 (18:54 +0200)]
Avoid a theoretical use-after-free in WPA auth sm init

wpa_sm_step() could theoretically free the statemachine, but it does
not do it in this particular case. Anyway, the code can be cleaned to
verify whether the state machine data is still available after the
wpa_sm_step() call.

14 years agodbus: Fix value of BSS Privacy property
Marcel Holtmann [Sun, 10 Jan 2010 16:18:08 +0000 (18:18 +0200)]
dbus: Fix value of BSS Privacy property

Checking for IEEE80211_CAP_PRIVACY needs to use & and not &&.

14 years agoFix alloc validation in wpa_bss_get_bit_rates()
Jouni Malinen [Sat, 9 Jan 2010 21:56:09 +0000 (23:56 +0200)]
Fix alloc validation in wpa_bss_get_bit_rates()

Need to check the value returned by os_malloc(), not the pointer to
this value.

14 years agoClose config file on error path
Jouni Malinen [Sat, 9 Jan 2010 20:29:41 +0000 (22:29 +0200)]
Close config file on error path

14 years agoWPS: Remove unused mac_addr_text parameter from get_netif_info()
Jouni Malinen [Sat, 9 Jan 2010 14:57:15 +0000 (16:57 +0200)]
WPS: Remove unused mac_addr_text parameter from get_netif_info()

14 years agodbus: Change BSS, Network and some errors interface names
Witold Sowa [Sat, 9 Jan 2010 09:40:15 +0000 (11:40 +0200)]
dbus: Change BSS, Network and some errors interface names

Remove ".Interface" part from BSS and Network objects and some
error names.

14 years agoFreeBSD: Fix driver_bsd.c build
Masashi Honma [Sat, 9 Jan 2010 09:04:44 +0000 (11:04 +0200)]
FreeBSD: Fix driver_bsd.c build

On FreeBSD 8.0, driver_bsd.c build fails because of changes from
older versions of FreeBSD. The error messages are below:

In file included from ../src/drivers/driver_bsd.c:38:
/usr/include/net80211/ieee80211_crypto.h:94: error: 'IEEE80211_TID_SIZE'
undeclared here (not in a function)
../src/drivers/driver_bsd.c: In function 'wpa_driver_bsd_set_wpa_ie':
../src/drivers/driver_bsd.c:968: error: 'IEEE80211_IOC_OPTIE' undeclared (first
use in this function)
../src/drivers/driver_bsd.c:968: error: (Each undeclared identifier is reported
only once
../src/drivers/driver_bsd.c:968: error: for each function it appears in.)
gmake: *** [../src/drivers/driver_bsd.o] Error 1

This patch solves this issue.

14 years agobsd: Add support for WPA_TRACE and WPA_TRACE_BFD
Masashi Honma [Sat, 9 Jan 2010 09:01:12 +0000 (11:01 +0200)]
bsd: Add support for WPA_TRACE and WPA_TRACE_BFD

On FreeBSD 8.0, WPA_TRACE and WPA_TRACE_BFD functionality build fails.

14 years agobsd: Fix driver_wired.c build
Masashi Honma [Sat, 9 Jan 2010 08:53:44 +0000 (10:53 +0200)]
bsd: Fix driver_wired.c build

14 years agoFix PKCS#12 use with OpenSSL 1.0.0
Jouni Malinen [Fri, 8 Jan 2010 22:38:09 +0000 (00:38 +0200)]
Fix PKCS#12 use with OpenSSL 1.0.0

Add 40-bit RC2 CBC explicitly since OpenSSL 1.0.0 does not seem to that
anymore with PKCS12_PBE_add(). Furthermore, at least 1.0.0-beta4 crashes
if the needed cipher is not registered when parsing the PKCS#12 data
(this crashing part should be fixed in newer 1.0.0 versions)

Following bug reports are related to the issue:
https://bugzilla.redhat.com/show_bug.cgi?id=541924
https://bugzilla.redhat.com/show_bug.cgi?id=538851
http://rt.openssl.org/Ticket/Display.html?id=2127
http://rt.openssl.org/Ticket/Display.html?id=2128

14 years agodbus: Add a test script for D-Bus API signals
Jouni Malinen [Wed, 6 Jan 2010 19:33:54 +0000 (21:33 +0200)]
dbus: Add a test script for D-Bus API signals

14 years agodbus: Do not try to unregister not-yet-registered network object
Jouni Malinen [Wed, 6 Jan 2010 19:31:13 +0000 (21:31 +0200)]
dbus: Do not try to unregister not-yet-registered network object

14 years agoConvert RSN pre-authentication to use struct dl_list
Jouni Malinen [Wed, 6 Jan 2010 19:23:15 +0000 (21:23 +0200)]
Convert RSN pre-authentication to use struct dl_list

14 years agoFix memory leak on RSN preauth init error path
Jouni Malinen [Wed, 6 Jan 2010 19:14:09 +0000 (21:14 +0200)]
Fix memory leak on RSN preauth init error path

14 years agoFix WMM default parameters
Lennert Buytenhek [Wed, 6 Jan 2010 18:48:29 +0000 (20:48 +0200)]
Fix WMM default parameters

wmm_ac_??_cw{min,max} parameters are in log form

When the wme_ac_??_cw{min,max} parameters aren't specified in
hostapd.conf, hostapd uses an incorrect set of default values, as the
defaults are in 2^x-1 form instead of in log form.  This patch changes
them over to the expected log form.

14 years agoRemove forgotten script termination attempt
Jouni Malinen [Wed, 6 Jan 2010 18:23:47 +0000 (20:23 +0200)]
Remove forgotten script termination attempt

14 years agodbus: Document BSS PropertiesChanged signal
Jouni Malinen [Wed, 6 Jan 2010 18:06:11 +0000 (20:06 +0200)]
dbus: Document BSS PropertiesChanged signal

14 years agodbus: Add BSS property change notifications
Witold Sowa [Wed, 6 Jan 2010 18:03:01 +0000 (20:03 +0200)]
dbus: Add BSS property change notifications

14 years agodbus: Fix crash on property change if D-Bus API is disabled
Jouni Malinen [Wed, 6 Jan 2010 10:14:35 +0000 (12:14 +0200)]
dbus: Fix crash on property change if D-Bus API is disabled

14 years agodbus: Fix prop_changed_flags allocation to count properties correctly
Jouni Malinen [Wed, 6 Jan 2010 09:55:21 +0000 (11:55 +0200)]
dbus: Fix prop_changed_flags allocation to count properties correctly

There was an extra semicolon that broke the calculation of registered
properties and resulted in obj_desc->prop_changed_flags not being
allocated long enough for all the flags.

14 years agodbus: Fix flush_object_timeout_handler context to be consistent
Jouni Malinen [Wed, 6 Jan 2010 09:50:43 +0000 (11:50 +0200)]
dbus: Fix flush_object_timeout_handler context to be consistent

The path pointer used as the timeout_ctx was not constant; the path
string itself may have been the same, but the pointer certainly was not
since it was sometimes from stack and sometimes from the dynamically
allocated buffer in obj_desc. This caused some of the eloop timeout
cancellations not to find the timeout. Fix this by using the obj_desc
as the timeout context data.

14 years agoMark fmt parameter const for wpa_printf/msg
Jouni Malinen [Mon, 4 Jan 2010 17:16:19 +0000 (19:16 +0200)]
Mark fmt parameter const for wpa_printf/msg

14 years agodbus: Aggregate PropertiesChanged signals
Witold Sowa [Mon, 4 Jan 2010 15:15:57 +0000 (17:15 +0200)]
dbus: Aggregate PropertiesChanged signals

Instead of sending PropertiesChanged signals for each changed
property separately, mark properties as changed and send aggregated
PropertiesChanged signals for each interface in each object.
Aggregated PropertiesChanged signal is sent
- for all object after responding on DBus call
- for specified object after manual call to
  wpa_dbus_flush_object_changed_properties() function
- for each object separately after short timeout (currently 5 ms)
  which starts when first property in object is marked changed

14 years agodbus: Change BSS property MaxRate to Rates
Witold Sowa [Mon, 4 Jan 2010 14:52:30 +0000 (16:52 +0200)]
dbus: Change BSS property MaxRate to Rates

Instead of exposing maximum BSS bit rate, expose sorted array
of all supported rates.

14 years agodbus: Remove forgotten, unused functions from GetAll script
Jouni Malinen [Mon, 4 Jan 2010 14:35:38 +0000 (16:35 +0200)]
dbus: Remove forgotten, unused functions from GetAll script

14 years agodbus: Update example scripts to use PropertiesChanged
Jouni Malinen [Mon, 4 Jan 2010 14:34:06 +0000 (16:34 +0200)]
dbus: Update example scripts to use PropertiesChanged

The StateChanged signal was removed, to use PropertiesChanged instead.

14 years agodbus: Replace StateChanged with PropertiesChanged signal
Marcel Holtmann [Mon, 4 Jan 2010 14:33:44 +0000 (16:33 +0200)]
dbus: Replace StateChanged with PropertiesChanged signal

The actual supplicant state is exposed via a property on the interface
object. So having a separate signal StateChanged for notifying about
changes is a bad idea. The standard PropertiesChanged signal should be
used for this.

The advantage of StateChanged signal was that it includes the previous
state, but not even NetworkManager is making use of this. And tracking
the old state via the property and this signal is easily possible anyway.

14 years agodbus: Use simple strings for debug level
Marcel Holtmann [Mon, 4 Jan 2010 14:22:26 +0000 (16:22 +0200)]
dbus: Use simple strings for debug level

Instead of using some magic integer values that really only mean
something to WPA internal code, just use simple strings. Possible
values are "msgdump", "debug", "info", "warning" and "error" which
map directly to WPA debugging support.

14 years agonl80211: Fix a typo
Jouni Malinen [Sun, 3 Jan 2010 20:20:27 +0000 (22:20 +0200)]
nl80211: Fix a typo

14 years agoUse common driver code for Linux hwaddr get/set
Jouni Malinen [Sun, 3 Jan 2010 20:17:08 +0000 (22:17 +0200)]
Use common driver code for Linux hwaddr get/set

14 years agoShare a single Linux ioctl helper fo setting interface up/down
Jouni Malinen [Sun, 3 Jan 2010 20:08:26 +0000 (22:08 +0200)]
Share a single Linux ioctl helper fo setting interface up/down

Number of Linux driver wrappers included this more or less identical
function, so lets add a new helper file to be able to share some more
code between the driver wrappers.

14 years agoFix compiler warnings for non-WPS build
Jouni Malinen [Sun, 3 Jan 2010 19:21:03 +0000 (21:21 +0200)]
Fix compiler warnings for non-WPS build

14 years agobsd: Fix a typo
Jouni Malinen [Sun, 3 Jan 2010 19:18:55 +0000 (21:18 +0200)]
bsd: Fix a typo

14 years agoStandardize on a single definition of auth_alg bitfield values
Jouni Malinen [Sun, 3 Jan 2010 19:14:40 +0000 (21:14 +0200)]
Standardize on a single definition of auth_alg bitfield values

14 years agoShare the same enum for MFP configuration
Jouni Malinen [Sun, 3 Jan 2010 19:02:51 +0000 (21:02 +0200)]
Share the same enum for MFP configuration

The three existing enums were already depending on using the same
values in couple of places and it is just simpler to standardize on
one of these to avoid need for mapping between different enums for
the exact same thing.

14 years agoMore Doxygen documentation for the driver interface
Jouni Malinen [Sun, 3 Jan 2010 18:49:48 +0000 (20:49 +0200)]
More Doxygen documentation for the driver interface

14 years agoRemove src/drivers/scan_helpers.c
Jouni Malinen [Sun, 3 Jan 2010 18:27:32 +0000 (20:27 +0200)]
Remove src/drivers/scan_helpers.c

Most of this file was already moved into wpa_supplicant/scan.c and
we can remove the file completely by having couple of small helper
functions copied to the remaining users outside core wpa_supplicant
code.

14 years agoMove wpa_supplicant specific scan code away from src/drivers
Jouni Malinen [Sun, 3 Jan 2010 16:48:11 +0000 (18:48 +0200)]
Move wpa_supplicant specific scan code away from src/drivers

This fits better in wpa_supplicant/scan.c. Couple of remaining
scan_helpers.c functions are currently used in driver wrappers,
but they can likely be removed in the future.

14 years agoAdd drv_event_eapol_rx() helper
Jouni Malinen [Sun, 3 Jan 2010 16:35:01 +0000 (18:35 +0200)]
Add drv_event_eapol_rx() helper

14 years agoUse generic driver event notification for AP mode assoc/disassoc
Jouni Malinen [Sun, 3 Jan 2010 16:22:22 +0000 (18:22 +0200)]
Use generic driver event notification for AP mode assoc/disassoc

14 years agoUse driver event, EVENT_EAPOL_RX, for EAPOL frame indication
Jouni Malinen [Sun, 3 Jan 2010 15:44:40 +0000 (17:44 +0200)]
Use driver event, EVENT_EAPOL_RX, for EAPOL frame indication

14 years agoReplace hostapd_notif_new_sta() with new driver event, EVENT_NEW_STA
Jouni Malinen [Sun, 3 Jan 2010 14:46:18 +0000 (16:46 +0200)]
Replace hostapd_notif_new_sta() with new driver event, EVENT_NEW_STA