Date: Thu, 15 Jan 2009 04:25:22 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r187274 - in vendor/wpa_supplicant/dist: . doc/docbook wpa_gui wpa_gui-qt4 Message-ID: <200901150425.n0F4PMAD063862@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Thu Jan 15 04:25:21 2009 New Revision: 187274 URL: http://svn.freebsd.org/changeset/base/187274 Log: vendor import of 0.5.11 Modified: vendor/wpa_supplicant/dist/ChangeLog vendor/wpa_supplicant/dist/Makefile vendor/wpa_supplicant/dist/base64.c vendor/wpa_supplicant/dist/common.c vendor/wpa_supplicant/dist/ctrl_iface.c vendor/wpa_supplicant/dist/ctrl_iface_dbus.c vendor/wpa_supplicant/dist/ctrl_iface_unix.c vendor/wpa_supplicant/dist/dbus_dict_helpers.c vendor/wpa_supplicant/dist/defconfig vendor/wpa_supplicant/dist/doc/docbook/wpa_background.8 vendor/wpa_supplicant/dist/doc/docbook/wpa_cli.8 vendor/wpa_supplicant/dist/doc/docbook/wpa_cli.sgml vendor/wpa_supplicant/dist/doc/docbook/wpa_passphrase.8 vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.8 vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.conf.5 vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.conf.sgml vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.sgml vendor/wpa_supplicant/dist/driver_hostap.h vendor/wpa_supplicant/dist/driver_ndis.c vendor/wpa_supplicant/dist/eap.c vendor/wpa_supplicant/dist/eap_aka.c vendor/wpa_supplicant/dist/eap_gpsk.c vendor/wpa_supplicant/dist/eap_gpsk_common.c vendor/wpa_supplicant/dist/eap_ttls.c vendor/wpa_supplicant/dist/eloop.c vendor/wpa_supplicant/dist/eloop.h vendor/wpa_supplicant/dist/eloop_none.c vendor/wpa_supplicant/dist/eloop_win.c vendor/wpa_supplicant/dist/main.c vendor/wpa_supplicant/dist/mlme.c vendor/wpa_supplicant/dist/os_unix.c vendor/wpa_supplicant/dist/preauth_test.c vendor/wpa_supplicant/dist/radius.c vendor/wpa_supplicant/dist/sha1.c vendor/wpa_supplicant/dist/tls_openssl.c vendor/wpa_supplicant/dist/version.h vendor/wpa_supplicant/dist/wpa.c vendor/wpa_supplicant/dist/wpa.h vendor/wpa_supplicant/dist/wpa_cli.c vendor/wpa_supplicant/dist/wpa_gui-qt4/networkconfig.cpp vendor/wpa_supplicant/dist/wpa_gui-qt4/scanresults.cpp vendor/wpa_supplicant/dist/wpa_gui-qt4/wpagui.cpp vendor/wpa_supplicant/dist/wpa_gui/networkconfig.ui.h vendor/wpa_supplicant/dist/wpa_gui/userdatarequest.ui.h vendor/wpa_supplicant/dist/wpa_gui/wpagui.ui.h vendor/wpa_supplicant/dist/wpa_i.h vendor/wpa_supplicant/dist/wpa_supplicant.c vendor/wpa_supplicant/dist/wpa_supplicant_i.h Modified: vendor/wpa_supplicant/dist/ChangeLog ============================================================================== --- vendor/wpa_supplicant/dist/ChangeLog Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/ChangeLog Thu Jan 15 04:25:21 2009 (r187274) @@ -1,5 +1,31 @@ ChangeLog for wpa_supplicant +2008-11-28 - v0.5.11 + * fixed race condition between disassociation event and group key + handshake to avoid getting stuck in incorrect state [Bug 261] + * updated D-Bus usage to avoid deprecated functions + * silence SIOCSIWAUTH ioctl failure message (these can be ignored in + most cases and are now only shown in debug output) + * increase timeout for IBSS connection + * driver_wext: do not overwrite BSS frequency if channel was already + received + * driver_wext: set interface down for mode switches, if needed (e.g., + for mac80211) + * driver_wext: fixed re-initialization of a removed and re-inserted + interface (e.g., USB dongle or on resume if driver was unloaded for + suspend) + * improve per-SSID scanning for drivers that report background scan + results frequently + * fixed scanning behavior after a failed initial association + * driver_wext: fixed processing of invalid event messages from kernel + not to crash wpa_supplicant (this could happen when using 64-bit + kernel with 32-bit userspace) + * fixed EAP-AKA to use RES Length field in AT_RES as length in bits, + not bytes + * fixed canceling of PMKSA caching when using drivers that generate + RSN IE and refuse to drop PMKIDs that wpa_supplicant does not know + about + 2008-02-19 - v0.5.10 * added support for Makefile builds to include debug-log-to-a-file functionality (CONFIG_DEBUG_FILE=y and -f<path> on command line) Modified: vendor/wpa_supplicant/dist/Makefile ============================================================================== --- vendor/wpa_supplicant/dist/Makefile Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/Makefile Thu Jan 15 04:25:21 2009 (r187274) @@ -149,7 +149,10 @@ endif ifdef CONFIG_DRIVER_NDIS CFLAGS += -DCONFIG_DRIVER_NDIS -OBJS_d += driver_ndis.o driver_ndis_.o +OBJS_d += driver_ndis.o +ifdef CONFIG_NDIS_EVENTS_INTEGRATED +OBJS_d += driver_ndis_.o +endif ifndef CONFIG_L2_PACKET CONFIG_L2_PACKET=pcap endif @@ -745,10 +748,6 @@ ifdef CONFIG_DEBUG_FILE CFLAGS += -DCONFIG_DEBUG_FILE endif -ifdef CONFIG_DEBUG_SYSLOG -CFLAGS += -DCONFIG_DEBUG_SYSLOG -endif - OBJS += wpa_supplicant.o events.o OBJS_t := $(OBJS) eapol_test.o radius.o radius_client.o OBJS_t2 := $(OBJS) preauth_test.o Modified: vendor/wpa_supplicant/dist/base64.c ============================================================================== --- vendor/wpa_supplicant/dist/base64.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/base64.c Thu Jan 15 04:25:21 2009 (r187274) @@ -115,7 +115,7 @@ unsigned char * base64_decode(const unsi count++; } - if (count % 4) + if (count == 0 || count % 4) return NULL; olen = count / 4 * 3; Modified: vendor/wpa_supplicant/dist/common.c ============================================================================== --- vendor/wpa_supplicant/dist/common.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/common.c Thu Jan 15 04:25:21 2009 (r187274) @@ -16,10 +16,6 @@ #include "common.h" -#ifdef CONFIG_DEBUG_SYSLOG -#include <syslog.h> -#endif /* CONFIG_DEBUG_SYSLOG */ - #ifdef CONFIG_DEBUG_FILE static FILE *out_file = NULL; @@ -27,7 +23,6 @@ static FILE *out_file = NULL; int wpa_debug_level = MSG_INFO; int wpa_debug_show_keys = 0; int wpa_debug_timestamp = 0; -int wpa_debug_syslog = 0; static int hex2num(char c) @@ -166,40 +161,6 @@ void wpa_debug_print_timestamp(void) printf("%ld.%06u: ", (long) tv.sec, (unsigned int) tv.usec); } -void wpa_debug_open_syslog(void) -{ -#ifdef CONFIG_DEBUG_SYSLOG - openlog("wpa_supplicant", LOG_PID | LOG_NDELAY, LOG_DAEMON); - wpa_debug_syslog++; -#endif -} - -void wpa_debug_close_syslog(void) -{ -#ifdef CONFIG_DEBUG_SYSLOG - if (wpa_debug_syslog) - closelog(); -#endif -} - -#ifdef CONFIG_DEBUG_SYSLOG -static int syslog_priority(int level) -{ - switch (level) { - case MSG_MSGDUMP: - case MSG_DEBUG: - return LOG_DEBUG; - case MSG_INFO: - return LOG_NOTICE; - case MSG_WARNING: - return LOG_WARNING; - case MSG_ERROR: - return LOG_ERR; - } - return LOG_INFO; -} -#endif /* CONFIG_DEBUG_SYSLOG */ - /** * wpa_printf - conditional printf @@ -218,11 +179,6 @@ void wpa_printf(int level, char *fmt, .. va_start(ap, fmt); if (level >= wpa_debug_level) { -#ifdef CONFIG_DEBUG_SYSLOG - if (wpa_debug_syslog) { - vsyslog(syslog_priority(level), fmt, ap); - } else { -#endif /* CONFIG_DEBUG_SYSLOG */ wpa_debug_print_timestamp(); #ifdef CONFIG_DEBUG_FILE if (out_file) { @@ -235,9 +191,6 @@ void wpa_printf(int level, char *fmt, .. #ifdef CONFIG_DEBUG_FILE } #endif /* CONFIG_DEBUG_FILE */ -#ifdef CONFIG_DEBUG_SYSLOG - } -#endif /* CONFIG_DEBUG_SYSLOG */ } va_end(ap); } Modified: vendor/wpa_supplicant/dist/ctrl_iface.c ============================================================================== --- vendor/wpa_supplicant/dist/ctrl_iface.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/ctrl_iface.c Thu Jan 15 04:25:21 2009 (r187274) @@ -76,6 +76,7 @@ static int wpa_supplicant_ctrl_iface_set } +#ifdef IEEE8021X_EAPOL static int wpa_supplicant_ctrl_iface_preauth(struct wpa_supplicant *wpa_s, char *addr) { @@ -94,6 +95,7 @@ static int wpa_supplicant_ctrl_iface_pre return 0; } +#endif /* IEEE8021X_EAPOL */ #ifdef CONFIG_PEERKEY @@ -1126,9 +1128,11 @@ char * wpa_supplicant_ctrl_iface_process wpa_s->reassociate = 1; wpa_supplicant_req_scan(wpa_s, 0, 0); } +#ifdef IEEE8021X_EAPOL } else if (os_strncmp(buf, "PREAUTH ", 8) == 0) { if (wpa_supplicant_ctrl_iface_preauth(wpa_s, buf + 8)) reply_len = -1; +#endif /* IEEE8021X_EAPOL */ #ifdef CONFIG_PEERKEY } else if (os_strncmp(buf, "STKSTART ", 9) == 0) { if (wpa_supplicant_ctrl_iface_stkstart(wpa_s, buf + 9)) Modified: vendor/wpa_supplicant/dist/ctrl_iface_dbus.c ============================================================================== --- vendor/wpa_supplicant/dist/ctrl_iface_dbus.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/ctrl_iface_dbus.c Thu Jan 15 04:25:21 2009 (r187274) @@ -30,10 +30,10 @@ #include "wpa_ctrl.h" #include "eap.h" -#define DBUS_VERSION (DBUS_VERSION_MAJOR << 8 | DBUS_VERSION_MINOR) +#define _DBUS_VERSION (DBUS_VERSION_MAJOR << 8 | DBUS_VERSION_MINOR) #define DBUS_VER(major, minor) ((major) << 8 | (minor)) -#if DBUS_VERSION < DBUS_VER(1,1) +#if _DBUS_VERSION < DBUS_VER(1,1) #define dbus_watch_get_unix_fd dbus_watch_get_fd #endif Modified: vendor/wpa_supplicant/dist/ctrl_iface_unix.c ============================================================================== --- vendor/wpa_supplicant/dist/ctrl_iface_unix.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/ctrl_iface_unix.c Thu Jan 15 04:25:21 2009 (r187274) @@ -305,7 +305,7 @@ wpa_supplicant_ctrl_iface_init(struct wp /* Group name not found - try to parse this as gid */ gid = strtol(gid_str, &endp, 10); if (*gid_str == '\0' || *endp != '\0') { - wpa_printf(MSG_DEBUG, "CTRL: Invalid group " + wpa_printf(MSG_ERROR, "CTRL: Invalid group " "'%s'", gid_str); goto fail; } Modified: vendor/wpa_supplicant/dist/dbus_dict_helpers.c ============================================================================== --- vendor/wpa_supplicant/dist/dbus_dict_helpers.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/dbus_dict_helpers.c Thu Jan 15 04:25:21 2009 (r187274) @@ -629,36 +629,56 @@ dbus_bool_t wpa_dbus_dict_open_read(DBus } +#define BYTE_ARRAY_CHUNK_SIZE 34 +#define BYTE_ARRAY_ITEM_SIZE (sizeof (char)) + static dbus_bool_t _wpa_dbus_dict_entry_get_byte_array( - DBusMessageIter *iter, int array_len, int array_type, + DBusMessageIter *iter, int array_type, struct wpa_dbus_dict_entry *entry) { - dbus_uint32_t i = 0; + dbus_uint32_t count = 0; dbus_bool_t success = FALSE; - char byte; + char *buffer; - /* Zero-length arrays are valid. */ - if (array_len == 0) { - entry->bytearray_value = NULL; - entry->array_type = DBUS_TYPE_BYTE; - success = TRUE; - goto done; - } + entry->bytearray_value = NULL; + entry->array_type = DBUS_TYPE_BYTE; - entry->bytearray_value = wpa_zalloc(array_len * sizeof(char)); - if (!entry->bytearray_value) { + buffer = wpa_zalloc(BYTE_ARRAY_ITEM_SIZE * BYTE_ARRAY_CHUNK_SIZE); + if (!buffer) { perror("_wpa_dbus_dict_entry_get_byte_array[dbus]: out of " "memory"); goto done; } - entry->array_type = DBUS_TYPE_BYTE; - entry->array_len = array_len; + entry->bytearray_value = buffer; + entry->array_len = 0; while (dbus_message_iter_get_arg_type(iter) == DBUS_TYPE_BYTE) { + char byte; + + if ((count % BYTE_ARRAY_CHUNK_SIZE) == 0 && count != 0) { + buffer = realloc(buffer, BYTE_ARRAY_ITEM_SIZE * + (count + BYTE_ARRAY_CHUNK_SIZE)); + if (buffer == NULL) { + perror("_wpa_dbus_dict_entry_get_byte_array[" + "dbus] out of memory trying to " + "retrieve the string array"); + goto done; + } + } + entry->bytearray_value = buffer; + dbus_message_iter_get_basic(iter, &byte); - entry->bytearray_value[i++] = byte; + entry->bytearray_value[count] = byte; + entry->array_len = ++count; dbus_message_iter_next(iter); } + + /* Zero-length arrays are valid. */ + if (entry->array_len == 0) { + free(entry->bytearray_value); + entry->bytearray_value = NULL; + } + success = TRUE; done: @@ -666,8 +686,11 @@ done: } +#define STR_ARRAY_CHUNK_SIZE 8 +#define STR_ARRAY_ITEM_SIZE (sizeof (char *)) + static dbus_bool_t _wpa_dbus_dict_entry_get_string_array( - DBusMessageIter *iter, int array_len, int array_type, + DBusMessageIter *iter, int array_type, struct wpa_dbus_dict_entry *entry) { dbus_uint32_t count = 0; @@ -677,13 +700,7 @@ static dbus_bool_t _wpa_dbus_dict_entry_ entry->strarray_value = NULL; entry->array_type = DBUS_TYPE_STRING; - /* Zero-length arrays are valid. */ - if (array_len == 0) { - success = TRUE; - goto done; - } - - buffer = wpa_zalloc(sizeof (char *) * 8); + buffer = wpa_zalloc(STR_ARRAY_ITEM_SIZE * STR_ARRAY_CHUNK_SIZE); if (buffer == NULL) { perror("_wpa_dbus_dict_entry_get_string_array[dbus] out of " "memory trying to retrieve a string array"); @@ -696,18 +713,15 @@ static dbus_bool_t _wpa_dbus_dict_entry_ const char *value; char *str; - if ((count % 8) == 0 && count != 0) { - char **tmp; - tmp = realloc(buffer, sizeof(char *) * (count + 8)); - if (tmp == NULL) { + if ((count % STR_ARRAY_CHUNK_SIZE) == 0 && count != 0) { + buffer = realloc(buffer, STR_ARRAY_ITEM_SIZE * + (count + STR_ARRAY_CHUNK_SIZE)); + if (buffer == NULL) { perror("_wpa_dbus_dict_entry_get_string_array[" "dbus] out of memory trying to " "retrieve the string array"); - free(buffer); - buffer = NULL; goto done; } - buffer = tmp; } entry->strarray_value = buffer; @@ -723,6 +737,13 @@ static dbus_bool_t _wpa_dbus_dict_entry_ entry->array_len = ++count; dbus_message_iter_next(iter); } + + /* Zero-length arrays are valid. */ + if (entry->array_len == 0) { + free(entry->strarray_value); + entry->strarray_value = NULL; + } + success = TRUE; done: @@ -734,7 +755,6 @@ static dbus_bool_t _wpa_dbus_dict_entry_ DBusMessageIter *iter_dict_val, struct wpa_dbus_dict_entry *entry) { int array_type = dbus_message_iter_get_element_type(iter_dict_val); - int array_len; dbus_bool_t success = FALSE; DBusMessageIter iter_array; @@ -743,20 +763,14 @@ static dbus_bool_t _wpa_dbus_dict_entry_ dbus_message_iter_recurse(iter_dict_val, &iter_array); - array_len = dbus_message_iter_get_array_len(&iter_array); - if (array_len < 0) - return FALSE; - switch (array_type) { case DBUS_TYPE_BYTE: success = _wpa_dbus_dict_entry_get_byte_array(&iter_array, - array_len, array_type, entry); break; case DBUS_TYPE_STRING: success = _wpa_dbus_dict_entry_get_string_array(&iter_array, - array_len, array_type, entry); break; @@ -946,9 +960,17 @@ void wpa_dbus_dict_entry_clear(struct wp break; case DBUS_TYPE_ARRAY: switch (entry->array_type) { - case DBUS_TYPE_BYTE: - free(entry->bytearray_value); - break; + case DBUS_TYPE_BYTE: { + free(entry->bytearray_value); + break; + } + case DBUS_TYPE_STRING: { + unsigned int i; + for (i = 0; i < entry->array_len; i++) + free(entry->strarray_value[i]); + free(entry->strarray_value); + break; + } } break; } Modified: vendor/wpa_supplicant/dist/defconfig ============================================================================== --- vendor/wpa_supplicant/dist/defconfig Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/defconfig Thu Jan 15 04:25:21 2009 (r187274) @@ -321,6 +321,3 @@ CONFIG_PEERKEY=y # Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) #CONFIG_DEBUG_FILE=y - -# Add support for logging via syslog -#CONFIG_DEBUG_SYSLOG=y Modified: vendor/wpa_supplicant/dist/doc/docbook/wpa_background.8 ============================================================================== --- vendor/wpa_supplicant/dist/doc/docbook/wpa_background.8 Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/doc/docbook/wpa_background.8 Thu Jan 15 04:25:21 2009 (r187274) @@ -3,7 +3,7 @@ .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng <steve@ggi-project.org>. -.TH "WPA_BACKGROUND" "8" "19 February 2008" "" "" +.TH "WPA_BACKGROUND" "8" "28 November 2008" "" "" .SH NAME wpa_background \- Background information on Wi-Fi Protected Access and IEEE 802.11i Modified: vendor/wpa_supplicant/dist/doc/docbook/wpa_cli.8 ============================================================================== --- vendor/wpa_supplicant/dist/doc/docbook/wpa_cli.8 Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/doc/docbook/wpa_cli.8 Thu Jan 15 04:25:21 2009 (r187274) @@ -3,7 +3,7 @@ .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng <steve@ggi-project.org>. -.TH "WPA_CLI" "8" "19 February 2008" "" "" +.TH "WPA_CLI" "8" "28 November 2008" "" "" .SH NAME wpa_cli \- WPA command line client @@ -57,17 +57,18 @@ current network. <text> is description o case of OTP request, it includes the challenge from the authentication server. .PP -The reply to these requests can be given with 'identity', -'password', and 'otp' commands. <id> needs to be copied from the -the matching request. 'password' and 'otp' commands can be used -regardless of whether the request was for PASSWORD or OTP. The -main difference between these two commands is that values given -with 'password' are remembered as long as wpa_supplicant is -running whereas values given with 'otp' are used only once and -then forgotten, i.e., wpa_supplicant will ask frontend for a new -value for every use. This can be used to implement -one-time-password lists and generic token card -based -authentication. +The reply to these requests can be given with +\fBidentity\fR, \fBpassword\fR, and +\fBotp\fR commands. <id> needs to be copied from +the matching request. \fBpassword\fR and +\fBotp\fR commands can be used regardless of whether +the request was for PASSWORD or OTP. The main difference between these +two commands is that values given with \fBpassword\fR are +remembered as long as wpa_supplicant is running whereas values given +with \fBotp\fR are used only once and then forgotten, +i.e., wpa_supplicant will ask frontend for a new value for every use. +This can be used to implement one-time-password lists and generic token +card -based authentication. .PP Example request for password and a matching reply: .sp Modified: vendor/wpa_supplicant/dist/doc/docbook/wpa_cli.sgml ============================================================================== --- vendor/wpa_supplicant/dist/doc/docbook/wpa_cli.sgml Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/doc/docbook/wpa_cli.sgml Thu Jan 15 04:25:21 2009 (r187274) @@ -72,17 +72,18 @@ case of OTP request, it includes the challenge from the authentication server.</para> - <para>The reply to these requests can be given with 'identity', - 'password', and 'otp' commands. <id> needs to be copied from the - the matching request. 'password' and 'otp' commands can be used - regardless of whether the request was for PASSWORD or OTP. The - main difference between these two commands is that values given - with 'password' are remembered as long as wpa_supplicant is - running whereas values given with 'otp' are used only once and - then forgotten, i.e., wpa_supplicant will ask frontend for a new - value for every use. This can be used to implement - one-time-password lists and generic token card -based - authentication.</para> + <para>The reply to these requests can be given with + <emphasis>identity</emphasis>, <emphasis>password</emphasis>, and + <emphasis>otp</emphasis> commands. <id> needs to be copied from + the matching request. <emphasis>password</emphasis> and + <emphasis>otp</emphasis> commands can be used regardless of whether + the request was for PASSWORD or OTP. The main difference between these + two commands is that values given with <emphasis>password</emphasis> are + remembered as long as wpa_supplicant is running whereas values given + with <emphasis>otp</emphasis> are used only once and then forgotten, + i.e., wpa_supplicant will ask frontend for a new value for every use. + This can be used to implement one-time-password lists and generic token + card -based authentication.</para> <para>Example request for password and a matching reply:</para> Modified: vendor/wpa_supplicant/dist/doc/docbook/wpa_passphrase.8 ============================================================================== --- vendor/wpa_supplicant/dist/doc/docbook/wpa_passphrase.8 Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/doc/docbook/wpa_passphrase.8 Thu Jan 15 04:25:21 2009 (r187274) @@ -3,7 +3,7 @@ .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng <steve@ggi-project.org>. -.TH "WPA_PASSPHRASE" "8" "19 February 2008" "" "" +.TH "WPA_PASSPHRASE" "8" "28 November 2008" "" "" .SH NAME wpa_passphrase \- Generate a WPA PSK from an ASCII passphrase for a SSID Modified: vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.8 ============================================================================== --- vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.8 Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.8 Thu Jan 15 04:25:21 2009 (r187274) @@ -3,7 +3,7 @@ .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng <steve@ggi-project.org>. -.TH "WPA_SUPPLICANT" "8" "19 February 2008" "" "" +.TH "WPA_SUPPLICANT" "8" "28 November 2008" "" "" .SH NAME wpa_supplicant \- Wi-Fi Protected Access client and IEEE 802.1X supplicant @@ -214,7 +214,11 @@ PMKSA caching .RE .SH "AVAILABLE DRIVERS" .PP -The available drivers to specify with the -D option are: +A summary of available driver backends is below. Support for each +of the driver backends is chosen at wpa_supplicant compile time. For a +list of supported driver backends that may be used with the -D option on +your system, refer to the help output of wpa_supplicant +(\fBwpa_supplicant -h\fR). .TP \fBhostap\fR (default) Host AP driver (Intersil Prism2/2.5/3). @@ -250,33 +254,47 @@ BSD 802.11 support (Atheros, etc.). \fBndis\fR Windows NDIS driver. .SH "COMMAND LINE OPTIONS" +.PP +Most command line options have global scope. Some are given per +interface, and are only valid if at least one \fB-i\fR option +is specified, otherwise they're ignored. Option groups for different +interfaces must be separated by \fB-N\fR option. +.TP +\fB-b br_ifname\fR +Optional bridge interface name. (Per interface) .TP \fB-B\fR Run daemon in the background. .TP \fB-i ifname\fR -Interface to listen on. +Interface to listen on. Multiple instances of this option can +be present, one per interface, separated by \fB-N\fR +option (see below). .TP \fB-c filename\fR -Path to configuration file. +Path to configuration file. (Per interface) .TP \fB-P PID_file\fR Path to PID file. .TP \fB-C ctrl_interface\fR -Path to ctrl_interface socket (only used if -c is not). +Path to ctrl_interface socket (Per interface. Only used if +\fB-c\fR is not). .TP \fB-g global ctrl_interface\fR -Path to global ctrl_interface socket. +Path to global ctrl_interface socket. If specified, interface +definitions may be omitted. .TP \fB-D driver\fR -Driver to use. See the available options below. +Driver to use. (Per interface, see the available options +below.) .TP \fB-f output file\fR Log output to specified file instead of stdout. .TP \fB-d\fR -Increase debugging verbosity (-dd even more). +Increase debugging verbosity (\fB-dd\fR even +more). .TP \fB-K\fR Include keys (passwords, etc.) in debug output. @@ -296,7 +314,12 @@ Help. Show a usage message. Show license (GPL and BSD). .TP \fB-q\fR -Decrease debugging verbosity (-qq even less). +Decrease debugging verbosity (\fB-qq\fR even +less). +.TP +\fB-u\fR +Enabled DBus control interface. If enabled, interface +definitions may be omitted. .TP \fB-v\fR Show version. @@ -367,9 +390,9 @@ with other versions) .TP \fBHost AP driver for Prism2/2.5/3 (development snapshot/v0.2.x)\fR (http://hostap.epitest.fi/) Driver needs to be set in -Managed mode ('iwconfig wlan0 mode managed'). Please note -that station firmware version needs to be 1.7.0 or newer to -work in WPA mode. +Managed mode (\fBiwconfig wlan0 mode managed\fR). +Please note that station firmware version needs to be 1.7.0 or +newer to work in WPA mode. .TP \fBLinuxant DriverLoader\fR (http://www.linuxant.com/driverloader/) @@ -506,8 +529,8 @@ can be used to enable WPA support: Add MODE="Managed" and WPA="y" to the network scheme in \fI/etc/pcmcia/wireless.opts\fR\&. .PP -Add the following block to the end of 'start' action handler -in \fI/etc/pcmcia/wireless\fR: +Add the following block to the end of \fBstart\fR +action handler in \fI/etc/pcmcia/wireless\fR: .sp .RS @@ -519,8 +542,8 @@ fi .fi .RE .PP -Add the following block to the end of 'stop' action handler -(may need to be separated from other actions) in +Add the following block to the end of \fBstop\fR +action handler (may need to be separated from other actions) in \fI/etc/pcmcia/wireless\fR: .sp .RS Modified: vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.conf.5 ============================================================================== --- vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.conf.5 Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.conf.5 Thu Jan 15 04:25:21 2009 (r187274) @@ -3,7 +3,7 @@ .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng <steve@ggi-project.org>. -.TH "WPA_SUPPLICANT.CONF" "5" "19 February 2008" "" "" +.TH "WPA_SUPPLICANT.CONF" "5" "28 November 2008" "" "" .SH NAME wpa_supplicant.conf \- configuration file for wpa_supplicant @@ -24,7 +24,7 @@ run in the background. Changes to configuration file can be reloaded be sending SIGHUP signal to \fBwpa_supplicant\fR ('killall -HUP wpa_supplicant'). Similarly, reloading can be triggered with -the 'wpa_cli reconfigure' command. +the \fBwpa_cli reconfigure\fR command. .PP Configuration file can include one or more network blocks, e.g., one for each used SSID. wpa_supplicant will automatically @@ -179,7 +179,7 @@ network={ .TP 3 6. Authentication for wired Ethernet. This can be used with -'wired' interface (-Dwired on command line). +\fBwired\fR interface (-Dwired on command line). .sp .RS Modified: vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.conf.sgml ============================================================================== --- vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.conf.sgml Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.conf.sgml Thu Jan 15 04:25:21 2009 (r187274) @@ -26,7 +26,7 @@ <para>Changes to configuration file can be reloaded be sending SIGHUP signal to <command>wpa_supplicant</command> ('killall -HUP wpa_supplicant'). Similarly, reloading can be triggered with - the 'wpa_cli reconfigure' command.</para> + the <emphasis>wpa_cli reconfigure</emphasis> command.</para> <para>Configuration file can include one or more network blocks, e.g., one for each used SSID. wpa_supplicant will automatically @@ -179,7 +179,7 @@ network={ <listitem> <para>Authentication for wired Ethernet. This can be used with - 'wired' interface (-Dwired on command line).</para> + <emphasis>wired</emphasis> interface (-Dwired on command line).</para> <blockquote><programlisting> ctrl_interface=/var/run/wpa_supplicant Modified: vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.sgml ============================================================================== --- vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.sgml Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/doc/docbook/wpa_supplicant.sgml Thu Jan 15 04:25:21 2009 (r187274) @@ -241,7 +241,11 @@ <refsect1> <title>Available Drivers</title> - <para>The available drivers to specify with the -D option are:</para> + <para>A summary of available driver backends is below. Support for each + of the driver backends is chosen at wpa_supplicant compile time. For a + list of supported driver backends that may be used with the -D option on + your system, refer to the help output of wpa_supplicant + (<emphasis>wpa_supplicant -h</emphasis>).</para> <variablelist> <varlistentry> @@ -326,8 +330,19 @@ <refsect1> <title>Command Line Options</title> + <para>Most command line options have global scope. Some are given per + interface, and are only valid if at least one <option>-i</option> option + is specified, otherwise they're ignored. Option groups for different + interfaces must be separated by <option>-N</option> option.</para> <variablelist> <varlistentry> + <term>-b br_ifname</term> + <listitem> + <para>Optional bridge interface name. (Per interface)</para> + </listitem> + </varlistentry> + + <varlistentry> <term>-B</term> <listitem> <para>Run daemon in the background.</para> @@ -337,14 +352,16 @@ <varlistentry> <term>-i ifname</term> <listitem> - <para>Interface to listen on.</para> + <para>Interface to listen on. Multiple instances of this option can + be present, one per interface, separated by <option>-N</option> + option (see below).</para> </listitem> </varlistentry> <varlistentry> <term>-c filename</term> <listitem> - <para>Path to configuration file.</para> + <para>Path to configuration file. (Per interface)</para> </listitem> </varlistentry> @@ -358,21 +375,24 @@ <varlistentry> <term>-C ctrl_interface</term> <listitem> - <para>Path to ctrl_interface socket (only used if -c is not).</para> + <para>Path to ctrl_interface socket (Per interface. Only used if + <option>-c</option> is not).</para> </listitem> </varlistentry> <varlistentry> <term>-g global ctrl_interface</term> <listitem> - <para>Path to global ctrl_interface socket.</para> + <para>Path to global ctrl_interface socket. If specified, interface + definitions may be omitted.</para> </listitem> </varlistentry> <varlistentry> <term>-D driver</term> <listitem> - <para>Driver to use. See the available options below.</para> + <para>Driver to use. (Per interface, see the available options + below.)</para> </listitem> </varlistentry> @@ -386,7 +406,8 @@ <varlistentry> <term>-d</term> <listitem> - <para>Increase debugging verbosity (-dd even more).</para> + <para>Increase debugging verbosity (<option>-dd</option> even + more).</para> </listitem> </varlistentry> @@ -430,9 +451,19 @@ <varlistentry> <term>-q</term> <listitem> - <para>Decrease debugging verbosity (-qq even less).</para> + <para>Decrease debugging verbosity (<option>-qq</option> even + less).</para> </listitem> </varlistentry> + + <varlistentry> + <term>-u</term> + <listitem> + <para>Enabled DBus control interface. If enabled, interface + definitions may be omitted.</para> + </listitem> + </varlistentry> + <varlistentry> <term>-v</term> <listitem> @@ -523,9 +554,9 @@ wpa_supplicant \ snapshot/v0.2.x)</term> <listitem> <para> (http://hostap.epitest.fi/) Driver needs to be set in - Managed mode ('iwconfig wlan0 mode managed'). Please note - that station firmware version needs to be 1.7.0 or newer to - work in WPA mode.</para> + Managed mode (<emphasis>iwconfig wlan0 mode managed</emphasis>). + Please note that station firmware version needs to be 1.7.0 or + newer to work in WPA mode.</para> </listitem> </varlistentry> @@ -729,8 +760,8 @@ wpa_supplicant -iwlan0 -c/etc/wpa_suppli <para>Add MODE="Managed" and WPA="y" to the network scheme in <filename>/etc/pcmcia/wireless.opts</filename>.</para> - <para>Add the following block to the end of 'start' action handler - in <filename>/etc/pcmcia/wireless</filename>:</para> + <para>Add the following block to the end of <emphasis>start</emphasis> + action handler in <filename>/etc/pcmcia/wireless</filename>:</para> <blockquote><programlisting> if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then @@ -739,8 +770,8 @@ fi </programlisting></blockquote> - <para>Add the following block to the end of 'stop' action handler - (may need to be separated from other actions) in + <para>Add the following block to the end of <emphasis>stop</emphasis> + action handler (may need to be separated from other actions) in <filename>/etc/pcmcia/wireless</filename>:</para> <blockquote><programlisting> Modified: vendor/wpa_supplicant/dist/driver_hostap.h ============================================================================== --- vendor/wpa_supplicant/dist/driver_hostap.h Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/driver_hostap.h Thu Jan 15 04:25:21 2009 (r187274) @@ -84,9 +84,9 @@ enum { #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024 #define PRISM2_HOSTAPD_RID_HDR_LEN \ -((int) (&((struct prism2_hostapd_param *) 0)->u.rid.data)) +((size_t) (&((struct prism2_hostapd_param *) 0)->u.rid.data)) #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ -((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) +((size_t) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) /* Maximum length for algorithm names (-1 for nul termination) used in ioctl() */ Modified: vendor/wpa_supplicant/dist/driver_ndis.c ============================================================================== --- vendor/wpa_supplicant/dist/driver_ndis.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/driver_ndis.c Thu Jan 15 04:25:21 2009 (r187274) @@ -42,7 +42,9 @@ int close(int fd); #include "driver_ndis.h" int wpa_driver_register_event_cb(struct wpa_driver_ndis_data *drv); +#ifdef CONFIG_NDIS_EVENTS_INTEGRATED void wpa_driver_ndis_event_pipe_cb(void *eloop_data, void *user_data); +#endif /* CONFIG_NDIS_EVENTS_INTEGRATED */ static void wpa_driver_ndis_deinit(void *priv); static void wpa_driver_ndis_poll(void *drv); Modified: vendor/wpa_supplicant/dist/eap.c ============================================================================== --- vendor/wpa_supplicant/dist/eap.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/eap.c Thu Jan 15 04:25:21 2009 (r187274) @@ -892,7 +892,7 @@ static int eap_sm_imsi_identity(struct e #endif /* PCSC_FUNCS */ -static int eap_sm_get_scard_identity(struct eap_sm *sm, struct wpa_ssid *ssid) +static int eap_sm_set_scard_pin(struct eap_sm *sm, struct wpa_ssid *ssid) { #ifdef PCSC_FUNCS if (scard_set_pin(sm->scard_ctx, ssid->pin)) { @@ -907,6 +907,17 @@ static int eap_sm_get_scard_identity(str eap_sm_request_pin(sm); return -1; } + return 0; +#else /* PCSC_FUNCS */ + return -1; +#endif /* PCSC_FUNCS */ +} + +static int eap_sm_get_scard_identity(struct eap_sm *sm, struct wpa_ssid *ssid) +{ +#ifdef PCSC_FUNCS + if (eap_sm_set_scard_pin(sm, ssid)) + return -1; return eap_sm_imsi_identity(sm, ssid); #else /* PCSC_FUNCS */ @@ -973,6 +984,9 @@ u8 * eap_sm_buildIdentity(struct eap_sm eap_sm_request_identity(sm); return NULL; } + } else if (config->pcsc) { + if (eap_sm_set_scard_pin(sm, config) < 0) + return NULL; } *len = sizeof(struct eap_hdr) + 1 + identity_len; Modified: vendor/wpa_supplicant/dist/eap_aka.c ============================================================================== --- vendor/wpa_supplicant/dist/eap_aka.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/eap_aka.c Thu Jan 15 04:25:21 2009 (r187274) @@ -292,7 +292,7 @@ static u8 * eap_aka_response_challenge(s msg = eap_sim_msg_init(EAP_CODE_RESPONSE, req->identifier, EAP_TYPE_AKA, EAP_AKA_SUBTYPE_CHALLENGE); wpa_printf(MSG_DEBUG, " AT_RES"); - eap_sim_msg_add(msg, EAP_SIM_AT_RES, data->res_len, + eap_sim_msg_add(msg, EAP_SIM_AT_RES, data->res_len * 8, data->res, data->res_len); wpa_printf(MSG_DEBUG, " AT_MAC"); eap_sim_msg_add_mac(msg, EAP_SIM_AT_MAC); Modified: vendor/wpa_supplicant/dist/eap_gpsk.c ============================================================================== --- vendor/wpa_supplicant/dist/eap_gpsk.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/eap_gpsk.c Thu Jan 15 04:25:21 2009 (r187274) @@ -240,8 +240,8 @@ const u8 * eap_gpsk_process_csuite_list( return NULL; } if (*list_len == 0 || (*list_len % sizeof(struct eap_gpsk_csuite))) { - wpa_printf(MSG_DEBUG, "EAP-GPSK: Invalid CSuite_List len %d", - *list_len); + wpa_printf(MSG_DEBUG, "EAP-GPSK: Invalid CSuite_List len %lu", + (unsigned long) *list_len); return NULL; } *list = pos; @@ -460,6 +460,7 @@ const u8 * eap_gpsk_validate_id_server(s data->id_server, data->id_server_len); wpa_hexdump_ascii(MSG_DEBUG, "EAP-GPSK: ID_Server in GPSK-3", pos, len); + return NULL; } pos += len; @@ -537,7 +538,9 @@ const u8 * eap_gpsk_validate_gpsk_3_mic( miclen = eap_gpsk_mic_len(data->vendor, data->specifier); if (end - pos < (int) miclen) { wpa_printf(MSG_DEBUG, "EAP-GPSK: Message too short for MIC " - "(left=%d miclen=%d)", end - pos, miclen); + "(left=%lu miclen=%lu)", + (unsigned long) (end - pos), + (unsigned long) miclen); return NULL; } if (eap_gpsk_compute_mic(data->sk, data->sk_len, data->vendor, @@ -589,8 +592,9 @@ static u8 * eap_gpsk_process_gpsk_3(stru return NULL; } if (pos != end) { - wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %d bytes of extra " - "data in the end of GPSK-2", end - pos); + wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %lu bytes of extra " + "data in the end of GPSK-2", + (unsigned long) (end - pos)); } req = (const struct eap_hdr *) reqData; Modified: vendor/wpa_supplicant/dist/eap_gpsk_common.c ============================================================================== --- vendor/wpa_supplicant/dist/eap_gpsk_common.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/eap_gpsk_common.c Thu Jan 15 04:25:21 2009 (r187274) @@ -376,8 +376,8 @@ static int eap_gpsk_compute_mic_aes(cons const u8 *data, size_t len, u8 *mic) { if (sk_len != 16) { - wpa_printf(MSG_DEBUG, "EAP-GPSK: Invalid SK length %d for " - "AES-CMAC MIC", sk_len); + wpa_printf(MSG_DEBUG, "EAP-GPSK: Invalid SK length %lu for " + "AES-CMAC MIC", (unsigned long) sk_len); return -1; } Modified: vendor/wpa_supplicant/dist/eap_ttls.c ============================================================================== --- vendor/wpa_supplicant/dist/eap_ttls.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/eap_ttls.c Thu Jan 15 04:25:21 2009 (r187274) @@ -673,7 +673,7 @@ static int eap_ttls_phase2_request_mscha /* MS-CHAP-Challenge */ challenge = eap_ttls_implicit_challenge( - sm, data, EAP_TTLS_MSCHAPV2_CHALLENGE_LEN * 2 + 1); + sm, data, EAP_TTLS_MSCHAPV2_CHALLENGE_LEN + 1); if (challenge == NULL) { os_free(buf); wpa_printf(MSG_ERROR, "EAP-TTLS/MSCHAPV2: Failed to derive " @@ -777,7 +777,8 @@ static int eap_ttls_phase2_request_mscha config->identity, config->identity_len); /* MS-CHAP-Challenge */ - challenge = eap_ttls_implicit_challenge(sm, data, EAP_TLS_KEY_LEN); + challenge = eap_ttls_implicit_challenge( + sm, data, EAP_TTLS_MSCHAP_CHALLENGE_LEN + 1); if (challenge == NULL) { os_free(buf); wpa_printf(MSG_ERROR, "EAP-TTLS/MSCHAP: Failed to derive " @@ -907,7 +908,8 @@ static int eap_ttls_phase2_request_chap( config->identity, config->identity_len); /* CHAP-Challenge */ - challenge = eap_ttls_implicit_challenge(sm, data, EAP_TLS_KEY_LEN); + challenge = eap_ttls_implicit_challenge( + sm, data, EAP_TTLS_CHAP_CHALLENGE_LEN + 1); if (challenge == NULL) { os_free(buf); wpa_printf(MSG_ERROR, "EAP-TTLS/CHAP: Failed to derive " Modified: vendor/wpa_supplicant/dist/eloop.c ============================================================================== --- vendor/wpa_supplicant/dist/eloop.c Thu Jan 15 04:19:03 2009 (r187273) +++ vendor/wpa_supplicant/dist/eloop.c Thu Jan 15 04:25:21 2009 (r187274) @@ -232,7 +232,10 @@ int eloop_register_timeout(unsigned int timeout = os_malloc(sizeof(*timeout)); if (timeout == NULL) return -1; - os_get_time(&timeout->time); + if (os_get_time(&timeout->time) < 0) { + os_free(timeout); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901150425.n0F4PMAD063862>