Update to 0.7.3

This commit is contained in:
Dan Williams 2010-12-08 10:33:40 -06:00
parent 33fe68f313
commit 10a08821ad
23 changed files with 175 additions and 1197 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ wpa_supplicant-0.6.3.tar.gz
wpa_supplicant-0.6.4.tar.gz
wpa_supplicant-0.6.7.tar.gz
wpa_supplicant-0.6.8.tar.gz
/wpa_supplicant-0.7.3.tar.gz

View File

@ -1,33 +1,30 @@
CONFIG_CTRL_IFACE=y
CONFIG_CTRL_IFACE_DBUS=y
//CONFIG_DRIVER_HOSTAP=y
//CONFIG_DRIVER_HERMES=y
//CONFIG_DRIVER_MADWIFI=y
CONFIG_DRIVER_ATMEL=y
CONFIG_CTRL_IFACE_DBUS_NEW=y
CONFIG_CTRL_IFACE_DBUS_INTRO=y
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_NDISWRAPPER=y
//CONFIG_DRIVER_PRISM54=y
CONFIG_DRIVER_NL80211=y
CONFIG_DRIVER_WIRED=y
//CONFIG_DRIVER_BROADCOM=y
//CONFIG_DRIVER_IPW=y
//CONFIG_DRIVER_BSD=y
//CONFIG_DRIVER_NDIS=y
CONFIG_WIRELESS_EXTENSION=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_FAST=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_PSK=y
CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
//CONFIG_PCSC=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_GPSK_SHA256=y
CONFIG_WPS=y
CONFIG_EAP_IKEV2=y
CONFIG_PKCS12=y
CONFIG_SMARTCARD=y
CONFIG_DEBUG_FILE=y
CONFIG_BACKEND=file
CONFIG_PEERKEY=y
#CONFIG_FIPS=y

View File

@ -1 +1 @@
e933332490e0e5acfef2279457f1070a wpa_supplicant-0.6.8.tar.gz
f516f191384a9a546e3f5145c08addda wpa_supplicant-0.7.3.tar.gz

View File

@ -1,9 +0,0 @@
diff -up wpa_supplicant-0.6.3/wpa_supplicant/dbus-wpa_supplicant.service.fedora wpa_supplicant-0.6.3/wpa_supplicant/dbus-wpa_supplicant.service
--- wpa_supplicant-0.6.3/wpa_supplicant/dbus-wpa_supplicant.service.fedora 2008-03-02 20:58:35.000000000 -0500
+++ wpa_supplicant-0.6.3/wpa_supplicant/dbus-wpa_supplicant.service 2008-03-02 20:58:41.000000000 -0500
@@ -1,4 +1,4 @@
[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
-Exec=/sbin/wpa_supplicant -u
+Exec=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
User=root

View File

@ -1,11 +0,0 @@
--- wpa_supplicant-0.6.3/wpa_supplicant/Makefile.qmake 2007-07-30 22:17:29.000000000 -0400
+++ wpa_supplicant-0.6.3/wpa_supplicant/Makefile 2007-07-30 22:17:46.000000000 -0400
@@ -818,7 +818,7 @@ windows-bin: $(WINALL)
$(STRIP) $(WINALL)
wpa_gui/Makefile:
- qmake -o wpa_gui/Makefile wpa_gui/wpa_gui.pro
+ $(QTDIR)/bin/qmake -o wpa_gui/Makefile wpa_gui/wpa_gui.pro
wpa_gui: wpa_gui/Makefile
$(MAKE) -C wpa_gui

View File

@ -1,12 +0,0 @@
diff -up wpa_supplicant-0.6.7/wpa_supplicant/events.c.scan-results-msg wpa_supplicant-0.6.7/wpa_supplicant/events.c
--- wpa_supplicant-0.6.7/wpa_supplicant/events.c.scan-results-msg 2009-01-30 12:08:34.000000000 -0500
+++ wpa_supplicant-0.6.7/wpa_supplicant/events.c 2009-01-30 12:08:37.000000000 -0500
@@ -624,7 +624,7 @@ static void wpa_supplicant_event_scan_re
wpa_msg(wpa_s, MSG_DEBUG, "Cached scan results are "
"empty - not posting");
} else {
- wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS);
+ wpa_msg(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS);
wpa_supplicant_dbus_notify_scan_results(wpa_s);
wpas_wps_notify_scan_results(wpa_s);
}

View File

@ -1,333 +0,0 @@
diff -up wpa_supplicant-0.6.8/src/drivers/driver.h.ap-stability wpa_supplicant-0.6.8/src/drivers/driver.h
--- wpa_supplicant-0.6.8/src/drivers/driver.h.ap-stability 2009-02-15 13:00:00.000000000 -0500
+++ wpa_supplicant-0.6.8/src/drivers/driver.h 2009-05-12 16:01:32.000000000 -0400
@@ -1017,6 +1017,21 @@ struct wpa_driver_ops {
* failure
*/
struct wpa_interface_info * (*get_interfaces)(void *global_priv);
+
+ /**
+ * get_signal_quality - Request signal quality of the current association
+ * @priv: private driver interface data
+ * @qual: signal "quality", perhaps including TX errors, missed beacons,
+ * etc. If not provided, set to 0.
+ * @max_qual: maximum possible signal quality. If not provided set to 0.
+ *
+ * This handler may be called at any time to retrieve the signal quality
+ * of the current association. If there is no association, the handler
+ * must return -1. If the signal level isn't known or is not provided,
+ * the handler must return -1.
+ * Returns: 0 on success, -1 on failure
+ */
+ int (*get_signal_quality)(void *priv, int *qual, int *max_qual);
};
/* Function to check whether a driver is for wired connections */
diff -up wpa_supplicant-0.6.8/src/drivers/driver_wext.c.ap-stability wpa_supplicant-0.6.8/src/drivers/driver_wext.c
--- wpa_supplicant-0.6.8/src/drivers/driver_wext.c.ap-stability 2009-05-12 16:01:32.000000000 -0400
+++ wpa_supplicant-0.6.8/src/drivers/driver_wext.c 2009-05-12 16:01:32.000000000 -0400
@@ -1615,6 +1615,10 @@ static int wpa_driver_wext_get_range(voi
if (range->enc_capa & IW_ENC_CAPA_4WAY_HANDSHAKE)
drv->capa.flags |= WPA_DRIVER_FLAGS_4WAY_HANDSHAKE;
+ drv->max_qual.qual = range->max_qual.qual;
+ drv->max_qual.level = range->max_qual.level;
+ drv->max_qual.updated = range->max_qual.updated;
+
wpa_printf(MSG_DEBUG, " capabilities: key_mgmt 0x%x enc 0x%x "
"flags 0x%x",
drv->capa.key_mgmt, drv->capa.enc, drv->capa.flags);
@@ -2244,6 +2248,51 @@ done:
}
+/**
+ * wpa_driver_wext_get_signal_quality - Get wireless signal quality, SIOCSIWSTATS
+ * @priv: Pointer to private wext data from wpa_driver_wext_init()
+ * @qual: signal quality
+ * @max_qual: maximum signal quality
+ * Returns: 0 on success, -1 on failure
+ */
+int wpa_driver_wext_get_signal_quality(void *priv, int *qual, int *max_qual)
+{
+ struct wpa_driver_wext_data *drv = priv;
+ struct iwreq iwr;
+ struct iw_statistics stats;
+ s8 level = 0;
+
+ os_memset(&iwr, 0, sizeof(iwr));
+ os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
+
+ memset (&stats, 0, sizeof (stats));
+ iwr.u.data.pointer = &stats;
+ iwr.u.data.length = sizeof (stats);
+ iwr.u.data.flags = 1; /* Clear updated flag */
+
+ if (ioctl(drv->ioctl_sock, SIOCGIWSTATS, &iwr)) {
+ wpa_printf(MSG_DEBUG, "%s: IWSTATS returned error: %d",
+ __FUNCTION__, errno);
+ return -1;
+ }
+
+ if ( !(drv->max_qual.updated & IW_QUAL_LEVEL_INVALID)
+ && !(stats.qual.updated & IW_QUAL_LEVEL_INVALID)) {
+ level = stats.qual.level;
+ }
+
+ if ( !(drv->max_qual.updated & IW_QUAL_QUAL_INVALID)
+ && !(stats.qual.updated & IW_QUAL_QUAL_INVALID)) {
+ *qual = stats.qual.qual;
+ *max_qual = drv->max_qual.qual;
+ }
+
+ wpa_printf(MSG_DEBUG, "%s: level %d (%d), qual %d (%d)", __FUNCTION__,
+ level, drv->max_qual.level, *qual, drv->max_qual.qual);
+ return 0;
+}
+
+
static int wpa_driver_wext_pmksa(struct wpa_driver_wext_data *drv,
u32 cmd, const u8 *bssid, const u8 *pmkid)
{
@@ -2357,6 +2406,7 @@ const struct wpa_driver_ops wpa_driver_w
.deauthenticate = wpa_driver_wext_deauthenticate,
.disassociate = wpa_driver_wext_disassociate,
.set_mode = wpa_driver_wext_set_mode,
+ .get_signal_quality = wpa_driver_wext_get_signal_quality,
.associate = wpa_driver_wext_associate,
.set_auth_alg = wpa_driver_wext_set_auth_alg,
.init = wpa_driver_wext_init,
diff -up wpa_supplicant-0.6.8/src/drivers/driver_wext.h.ap-stability wpa_supplicant-0.6.8/src/drivers/driver_wext.h
--- wpa_supplicant-0.6.8/src/drivers/driver_wext.h.ap-stability 2009-02-15 13:00:00.000000000 -0500
+++ wpa_supplicant-0.6.8/src/drivers/driver_wext.h 2009-05-12 16:01:32.000000000 -0400
@@ -16,6 +16,7 @@
#define DRIVER_WEXT_H
#include <net/if.h>
+#include "wireless_copy.h"
struct wpa_driver_wext_data {
void *ctx;
@@ -43,6 +44,8 @@ struct wpa_driver_wext_data {
char mlmedev[IFNAMSIZ + 1];
int scan_complete_events;
+
+ struct iw_quality max_qual;
};
int wpa_driver_wext_get_ifflags(struct wpa_driver_wext_data *drv, int *flags);
diff -up wpa_supplicant-0.6.8/wpa_supplicant/events.c.ap-stability wpa_supplicant-0.6.8/wpa_supplicant/events.c
--- wpa_supplicant-0.6.8/wpa_supplicant/events.c.ap-stability 2009-05-12 16:01:32.000000000 -0400
+++ wpa_supplicant-0.6.8/wpa_supplicant/events.c 2009-05-12 16:19:06.000000000 -0400
@@ -371,9 +371,53 @@ static int wpa_supplicant_ssid_bss_match
}
+struct cur_ap {
+ u8 bssid[ETH_ALEN];
+ int qual;
+ int max_qual;
+};
+
+#define CUR_AP_THRESHOLD 50
+
+/* Return 1 if 'bss' should be used instead of the current association */
+static int
+bss_better_quality(struct wpa_scan_res *bss, struct cur_ap *cur)
+{
+ int cur_pqual, bss_pqual;
+
+ /* If the max quality is invalid, quality is pretty meaningless */
+ if (!cur->max_qual) {
+ wpa_printf(MSG_DEBUG, " no max quality");
+ return 1;
+ }
+
+ cur_pqual = (int) (((float) cur->qual / (float) cur->max_qual) * 100);
+ bss_pqual = (int) (((float) bss->qual / (float) cur->max_qual) * 100);
+
+ /* If 'bss' is the current associated BSS and it's still got OK quality,
+ * stick with it.
+ */
+ if (!os_memcmp(cur->bssid, bss->bssid, ETH_ALEN) && (cur_pqual >= CUR_AP_THRESHOLD)) {
+ wpa_printf(MSG_DEBUG, " matched associated BSSID");
+ return 1;
+ }
+
+ wpa_printf(MSG_DEBUG, " cur AP qual: %d candidate qual: %d", cur_pqual, bss_pqual);
+
+ /* Otherwise if the current association is worse than 50% quality and
+ * 'bss' is at least 15% better, then use 'bss'.
+ */
+ if ((cur_pqual < CUR_AP_THRESHOLD) && (bss_pqual >= cur_pqual + 15))
+ return 1;
+
+ return 0;
+}
+
+
static struct wpa_scan_res *
wpa_supplicant_select_bss_wpa(struct wpa_supplicant *wpa_s,
struct wpa_ssid *group,
+ struct cur_ap *cur,
struct wpa_ssid **selected_ssid)
{
struct wpa_ssid *ssid;
@@ -448,6 +492,12 @@ wpa_supplicant_select_bss_wpa(struct wpa
if (!wpa_supplicant_ssid_bss_match(wpa_s, ssid, bss))
continue;
+ if (cur && !bss_better_quality(bss, cur)) {
+ wpa_printf(MSG_DEBUG, " skip - "
+ "signal strength not high enough");
+ continue;
+ }
+
wpa_printf(MSG_DEBUG, " selected WPA AP "
MACSTR " ssid='%s'",
MAC2STR(bss->bssid),
@@ -464,6 +514,7 @@ wpa_supplicant_select_bss_wpa(struct wpa
static struct wpa_scan_res *
wpa_supplicant_select_bss_non_wpa(struct wpa_supplicant *wpa_s,
struct wpa_ssid *group,
+ struct cur_ap *cur,
struct wpa_ssid **selected_ssid)
{
struct wpa_ssid *ssid;
@@ -569,6 +620,12 @@ wpa_supplicant_select_bss_non_wpa(struct
continue;
}
+ if (cur && !bss_better_quality(bss, cur)) {
+ wpa_printf(MSG_DEBUG, " skip - "
+ "signal strength not high enough");
+ continue;
+ }
+
wpa_printf(MSG_DEBUG, " selected non-WPA AP "
MACSTR " ssid='%s'",
MAC2STR(bss->bssid),
@@ -584,21 +641,45 @@ wpa_supplicant_select_bss_non_wpa(struct
static struct wpa_scan_res *
wpa_supplicant_select_bss(struct wpa_supplicant *wpa_s, struct wpa_ssid *group,
- struct wpa_ssid **selected_ssid)
+ struct cur_ap *cur, struct wpa_ssid **selected_ssid)
{
struct wpa_scan_res *selected;
wpa_printf(MSG_DEBUG, "Selecting BSS from priority group %d",
group->priority);
+ if (cur) {
+ int found = 0, i;
+ struct wpa_scan_res *bss;
+
+ wpa_printf(MSG_DEBUG, "Try to find current BSSID "
+ "%02x:%02x:%02x:%02x:%02x:%02x",
+ cur->bssid[0], cur->bssid[1], cur->bssid[2],
+ cur->bssid[3], cur->bssid[4], cur->bssid[5]);
+ for (i = 0; i < wpa_s->scan_res->num; i++) {
+ bss = wpa_s->scan_res->res[i];
+ if (os_memcmp(bss->bssid, cur->bssid, ETH_ALEN) != 0) {
+ wpa_printf(MSG_DEBUG, " skip - "
+ "BSSID mismatch");
+ continue;
+ }
+ wpa_printf(MSG_DEBUG, " found");
+ found = 1;
+ break;
+ }
+
+ if (!found)
+ cur = NULL;
+ }
+
/* First, try to find WPA-enabled AP */
- selected = wpa_supplicant_select_bss_wpa(wpa_s, group, selected_ssid);
+ selected = wpa_supplicant_select_bss_wpa(wpa_s, group, cur, selected_ssid);
if (selected)
return selected;
/* If no WPA-enabled AP found, try to find non-WPA AP, if configuration
* allows this. */
- return wpa_supplicant_select_bss_non_wpa(wpa_s, group, selected_ssid);
+ return wpa_supplicant_select_bss_non_wpa(wpa_s, group, cur, selected_ssid);
}
@@ -607,6 +687,8 @@ static void wpa_supplicant_event_scan_re
int prio, timeout;
struct wpa_scan_res *selected = NULL;
struct wpa_ssid *ssid = NULL;
+ int qual = 0, max_qual = 0, qual_valid = 0, bssid_valid = 0, i;
+ struct cur_ap cur;
if (wpa_supplicant_get_scan_results(wpa_s) < 0) {
if (wpa_s->conf->ap_scan == 2)
@@ -635,10 +717,44 @@ static void wpa_supplicant_event_scan_re
wpa_s->disconnected)
return;
+ /* Get current driver BSSID and signal strength */
+ os_memset(&cur, 0, sizeof(cur));
+
+ for (i = 0; i < 4; i++) {
+ static u8 bad1[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+ static u8 bad2[ETH_ALEN] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+ static u8 bad3[ETH_ALEN] = {0x44, 0x44, 0x44, 0x44, 0x44, 0x44};
+
+ if (wpa_drv_get_bssid(wpa_s, (u8 *) &cur.bssid) == 0) {
+ if (memcmp(cur.bssid, bad1, ETH_ALEN) &&
+ memcmp(cur.bssid, bad2, ETH_ALEN) &&
+ memcmp(cur.bssid, bad3, ETH_ALEN)) {
+ bssid_valid = 1;
+ break;
+ }
+ }
+ }
+
+ if (bssid_valid) {
+ for (i = 0; i < 4; i++) {
+ qual_valid = !wpa_drv_get_signal_quality(wpa_s, &qual, &max_qual);
+ if (qual_valid && qual) {
+ cur.qual = qual;
+ cur.max_qual = max_qual;
+ break;
+ }
+ }
+ }
+
+ wpa_printf(MSG_DEBUG, "%s: qual %d (%d) qv=%d bv=%d",
+ __FUNCTION__, qual, max_qual, qual_valid, bssid_valid);
+
while (selected == NULL) {
for (prio = 0; prio < wpa_s->conf->num_prio; prio++) {
selected = wpa_supplicant_select_bss(
- wpa_s, wpa_s->conf->pssid[prio], &ssid);
+ wpa_s, wpa_s->conf->pssid[prio],
+ (bssid_valid && qual_valid) ? &cur : NULL,
+ &ssid);
if (selected)
break;
}
diff -up wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h.ap-stability wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h
--- wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h.ap-stability 2009-05-12 16:01:32.000000000 -0400
+++ wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h 2009-05-12 16:01:33.000000000 -0400
@@ -485,6 +485,15 @@ static inline int wpa_drv_set_mode(struc
return 0;
}
+static inline int wpa_drv_get_signal_quality(struct wpa_supplicant *wpa_s,
+ int *qual, int *max_qual)
+{
+ if (wpa_s->driver->get_signal_quality) {
+ return wpa_s->driver->get_signal_quality(wpa_s->drv_priv, qual, max_qual);
+ }
+ return -1;
+}
+
static inline int wpa_drv_associate(struct wpa_supplicant *wpa_s,
struct wpa_driver_associate_params *params)
{

View File

@ -1,59 +0,0 @@
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index e6242da..698e4f3 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -1923,21 +1923,35 @@ static int wpa_driver_wext_mlme(struct wpa_driver_wext_data *drv,
static void wpa_driver_wext_disconnect(struct wpa_driver_wext_data *drv)
{
+ struct iwreq iwr;
const u8 null_bssid[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
u8 ssid[32];
int i;
- /*
- * Clear the BSSID selection and set a random SSID to make sure the
- * driver will not be trying to associate with something even if it
- * does not understand SIOCSIWMLME commands (or tries to associate
- * automatically after deauth/disassoc).
+ /* Only force-disconnect when the card is in infrastructure mode,
+ * otherwise the driver might interpret the cleared BSSID and random
+ * SSID as an attempt to create a new ad-hoc network.
*/
- wpa_driver_wext_set_bssid(drv, null_bssid);
+ os_memset(&iwr, 0, sizeof(iwr));
+ os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
+ if (ioctl(drv->ioctl_sock, SIOCGIWMODE, &iwr) < 0) {
+ perror("ioctl[SIOCGIWMODE]");
+ iwr.u.mode = IW_MODE_INFRA;
+ }
- for (i = 0; i < 32; i++)
- ssid[i] = rand() & 0xFF;
- wpa_driver_wext_set_ssid(drv, ssid, 32);
+ if (iwr.u.mode == IW_MODE_INFRA) {
+ /*
+ * Clear the BSSID selection and set a random SSID to make sure
+ * the driver will not be trying to associate with something
+ * even if it does not understand SIOCSIWMLME commands (or tries
+ * to associate automatically after deauth/disassoc).
+ */
+ wpa_driver_wext_set_bssid(drv, null_bssid);
+
+ for (i = 0; i < 32; i++)
+ ssid[i] = rand() & 0xFF;
+ wpa_driver_wext_set_ssid(drv, ssid, 32);
+ }
}
@@ -1947,8 +1961,8 @@ static int wpa_driver_wext_deauthenticate(void *priv, const u8 *addr,
struct wpa_driver_wext_data *drv = priv;
int ret;
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
- wpa_driver_wext_disconnect(drv);
ret = wpa_driver_wext_mlme(drv, addr, IW_MLME_DEAUTH, reason_code);
+ wpa_driver_wext_disconnect(drv);
return ret;
}

View File

@ -1,52 +0,0 @@
diff -up wpa_supplicant-0.6.4/src/drivers/driver_wext.c.disconnect-on-init wpa_supplicant-0.6.4/src/drivers/driver_wext.c
--- wpa_supplicant-0.6.4/src/drivers/driver_wext.c.disconnect-on-init 2009-05-12 14:38:30.000000000 -0400
+++ wpa_supplicant-0.6.4/src/drivers/driver_wext.c 2009-05-12 15:00:09.000000000 -0400
@@ -155,6 +155,7 @@ enum {
static int wpa_driver_wext_flush_pmkid(void *priv);
static int wpa_driver_wext_get_range(void *priv);
static void wpa_driver_wext_finish_drv_init(struct wpa_driver_wext_data *drv);
+static void wpa_driver_wext_disconnect(struct wpa_driver_wext_data *drv);
static int wpa_driver_wext_send_oper_ifla(struct wpa_driver_wext_data *drv,
@@ -1142,6 +1143,12 @@ static void wpa_driver_wext_finish_drv_i
wpa_driver_wext_get_range(drv);
+ /* Unlock the driver's BSSID and force to a random SSID so clear any
+ * previous association the driver might have when the supplicant starts
+ * up.
+ */
+ wpa_driver_wext_disconnect(drv);
+
drv->ifindex = if_nametoindex(drv->ifname);
if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
@@ -1181,8 +1188,7 @@ void wpa_driver_wext_deinit(void *priv)
* Clear possibly configured driver parameters in order to make it
* easier to use the driver after wpa_supplicant has been terminated.
*/
- (void) wpa_driver_wext_set_bssid(drv,
- (u8 *) "\x00\x00\x00\x00\x00\x00");
+ wpa_driver_wext_disconnect(drv);
wpa_driver_wext_send_oper_ifla(priv, 0, IF_OPER_UP);
@@ -2072,7 +2078,6 @@ static int wpa_driver_wext_mlme(struct w
static void wpa_driver_wext_disconnect(struct wpa_driver_wext_data *drv)
{
struct iwreq iwr;
- const u8 null_bssid[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
u8 ssid[32];
int i;
@@ -2094,7 +2099,8 @@ static void wpa_driver_wext_disconnect(s
* even if it does not understand SIOCSIWMLME commands (or tries
* to associate automatically after deauth/disassoc).
*/
- wpa_driver_wext_set_bssid(drv, null_bssid);
+ (void) wpa_driver_wext_set_bssid(drv,
+ (u8 *) "\x00\x00\x00\x00\x00\x00");
for (i = 0; i < 32; i++)
ssid[i] = rand() & 0xFF;

View File

@ -1,12 +0,0 @@
diff -up wpa_supplicant-0.6.8/wpa_supplicant/Makefile.qt4 wpa_supplicant-0.6.8/wpa_supplicant/Makefile
--- wpa_supplicant-0.6.8/wpa_supplicant/Makefile.qt4 2010-05-11 16:12:15.657510359 -0700
+++ wpa_supplicant-0.6.8/wpa_supplicant/Makefile 2010-05-11 16:12:25.646383528 -0700
@@ -1165,7 +1165,7 @@ wpa_gui: wpa_gui/Makefile
$(MAKE) -C wpa_gui
wpa_gui-qt4/Makefile:
- qmake -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro
+ qmake-qt4 -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro
wpa_gui-qt4: wpa_gui-qt4/Makefile
$(MAKE) -C wpa_gui-qt4

View File

@ -1,11 +0,0 @@
diff -up wpa_supplicant-0.6.8/src/crypto/tls_openssl.c.ossl-init wpa_supplicant-0.6.8/src/crypto/tls_openssl.c
--- wpa_supplicant-0.6.8/src/crypto/tls_openssl.c.ossl-init 2009-02-15 19:00:00.000000000 +0100
+++ wpa_supplicant-0.6.8/src/crypto/tls_openssl.c 2009-12-15 11:10:31.000000000 +0100
@@ -734,6 +734,7 @@ void * tls_init(const struct tls_config
if (tls_openssl_ref_count == 0) {
SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
SSL_library_init();
/* TODO: if /dev/urandom is available, PRNG is seeded
* automatically. If this is not the case, random data should

View File

@ -1,241 +0,0 @@
diff --git a/wpa_supplicant/ctrl_iface_dbus.c b/wpa_supplicant/ctrl_iface_dbus.c
index 26a3e9d..9e3ae69 100644
--- a/wpa_supplicant/ctrl_iface_dbus.c
+++ b/wpa_supplicant/ctrl_iface_dbus.c
@@ -541,6 +541,8 @@ static DBusHandlerResult wpas_iface_message_handler(DBusConnection *connection,
wpa_s);
else if (!strcmp(method, "state"))
reply = wpas_dbus_iface_get_state(message, wpa_s);
+ else if (!strcmp(method, "scanning"))
+ reply = wpas_dbus_iface_get_scanning(message, wpa_s);
else if (!strcmp(method, "setBlobs"))
reply = wpas_dbus_iface_set_blobs(message, wpa_s);
else if (!strcmp(method, "removeBlobs"))
@@ -753,6 +755,58 @@ out:
}
+/**
+ * wpa_supplicant_dbus_notify_scanning - send scanning status
+ * @wpa_s: %wpa_supplicant network interface data
+ * Returns: 0 on success, -1 on failure
+ *
+ * Notify listeners of interface scanning state changes
+ */
+void wpa_supplicant_dbus_notify_scanning(struct wpa_supplicant *wpa_s)
+{
+ struct ctrl_iface_dbus_priv *iface = wpa_s->global->dbus_ctrl_iface;
+ DBusMessage *_signal;
+ const char *path;
+ dbus_bool_t scanning = wpa_s->scanning ? TRUE : FALSE;
+
+ /* Do nothing if the control interface is not turned on */
+ if (iface == NULL)
+ return;
+
+ path = wpa_supplicant_get_dbus_path(wpa_s);
+ if (path == NULL) {
+ perror("wpa_supplicant_dbus_notify_scanning[dbus]: interface "
+ "didn't have a dbus path");
+ wpa_printf(MSG_ERROR,
+ "%s[dbus]: interface didn't have a dbus path; can't "
+ " send scan result signal.", __FUNCTION__);
+ return;
+ }
+ _signal = dbus_message_new_signal(path, WPAS_DBUS_IFACE_INTERFACE,
+ "Scanning");
+ if (_signal == NULL) {
+ perror("wpa_supplicant_dbus_notify_scanning[dbus]: couldn't "
+ "create dbus signal; likely out of memory");
+ wpa_printf(MSG_ERROR, "%s[dbus]: dbus control interface: not "
+ "enough memory to send scan results signal.",
+ __FUNCTION__);
+ return;
+ }
+
+ if (dbus_message_append_args(_signal,
+ DBUS_TYPE_BOOLEAN, &scanning,
+ DBUS_TYPE_INVALID)) {
+ dbus_connection_send(iface->con, _signal, NULL);
+ } else {
+ perror("wpa_supplicant_dbus_notify_scanning[dbus]: not enough "
+ "memory to construct signal.");
+ wpa_printf(MSG_ERROR, "%s[dbus]: not enough memory to construct"
+ " signal.", __FUNCTION__);
+ }
+ dbus_message_unref(_signal);
+}
+
+
#ifdef CONFIG_WPS
void wpa_supplicant_dbus_notify_wps_cred(struct wpa_supplicant *wpa_s,
const struct wps_credential *cred)
diff --git a/wpa_supplicant/ctrl_iface_dbus.h b/wpa_supplicant/ctrl_iface_dbus.h
index 8e9036d..0e3ec79 100644
--- a/wpa_supplicant/ctrl_iface_dbus.h
+++ b/wpa_supplicant/ctrl_iface_dbus.h
@@ -92,6 +92,7 @@ struct ctrl_iface_dbus_priv *
wpa_supplicant_dbus_ctrl_iface_init(struct wpa_global *global);
void wpa_supplicant_dbus_ctrl_iface_deinit(struct ctrl_iface_dbus_priv *iface);
void wpa_supplicant_dbus_notify_scan_results(struct wpa_supplicant *wpa_s);
+void wpa_supplicant_dbus_notify_scanning(struct wpa_supplicant *wpa_s);
void wpa_supplicant_dbus_notify_state_change(struct wpa_supplicant *wpa_s,
wpa_states new_state,
wpa_states old_state);
@@ -136,6 +137,11 @@ wpa_supplicant_dbus_notify_scan_results(struct wpa_supplicant *wpa_s)
}
static inline void
+wpa_supplicant_dbus_notify_scanning(struct wpa_supplicant *wpa_s)
+{
+}
+
+static inline void
wpa_supplicant_dbus_notify_state_change(struct wpa_supplicant *wpa_s,
wpa_states new_state,
wpa_states old_state)
diff --git a/wpa_supplicant/ctrl_iface_dbus_handlers.c b/wpa_supplicant/ctrl_iface_dbus_handlers.c
index e9dd9a5..a30bce0 100644
--- a/wpa_supplicant/ctrl_iface_dbus_handlers.c
+++ b/wpa_supplicant/ctrl_iface_dbus_handlers.c
@@ -1338,6 +1338,35 @@ DBusMessage * wpas_dbus_iface_get_state(DBusMessage *message,
/**
+ * wpas_dbus_iface_get_scanning - Get interface scanning state
+ * @message: Pointer to incoming dbus message
+ * @wpa_s: wpa_supplicant structure for a network interface
+ * Returns: A dbus message containing whether the interface is scanning
+ *
+ * Handler function for "scanning" method call.
+ */
+DBusMessage * wpas_dbus_iface_get_scanning(DBusMessage *message,
+ struct wpa_supplicant *wpa_s)
+{
+ DBusMessage *reply = NULL;
+ dbus_bool_t scanning = wpa_s->scanning ? TRUE : FALSE;
+
+ reply = dbus_message_new_method_return(message);
+ if (reply != NULL) {
+ dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &scanning,
+ DBUS_TYPE_INVALID);
+ } else {
+ perror("wpas_dbus_iface_get_scanning[dbus]: out of "
+ "memory.");
+ wpa_printf(MSG_ERROR, "dbus control interface: not enough"
+ "memory to return scanning state.");
+ }
+
+ return reply;
+}
+
+
+/**
* wpas_dbus_iface_set_blobs - Store named binary blobs (ie, for certificates)
* @message: Pointer to incoming dbus message
* @wpa_s: %wpa_supplicant data structure
diff --git a/wpa_supplicant/ctrl_iface_dbus_handlers.h b/wpa_supplicant/ctrl_iface_dbus_handlers.h
index 0df5f3e..6564b54 100644
--- a/wpa_supplicant/ctrl_iface_dbus_handlers.h
+++ b/wpa_supplicant/ctrl_iface_dbus_handlers.h
@@ -77,6 +77,9 @@ DBusMessage * wpas_dbus_iface_set_smartcard_modules(
DBusMessage * wpas_dbus_iface_get_state(DBusMessage *message,
struct wpa_supplicant *wpa_s);
+DBusMessage * wpas_dbus_iface_get_scanning(DBusMessage *message,
+ struct wpa_supplicant *wpa_s);
+
DBusMessage * wpas_dbus_iface_set_blobs(DBusMessage *message,
struct wpa_supplicant *wpa_s);
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 56c57fb..159b024 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -615,6 +615,8 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s)
int qual = 0, max_qual = 0, qual_valid = 0, bssid_valid = 0, i;
struct cur_ap cur;
+ wpa_supplicant_notify_scanning(wpa_s, 0);
+
if (wpa_supplicant_get_scan_results(wpa_s) < 0) {
if (wpa_s->conf->ap_scan == 2)
return;
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 1f53e23..a30e387 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -21,6 +21,7 @@
#include "wpa_supplicant_i.h"
#include "mlme.h"
#include "wps_supplicant.h"
+#include "ctrl_iface_dbus.h"
static void wpa_supplicant_gen_assoc_event(struct wpa_supplicant *wpa_s)
@@ -328,6 +328,8 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
}
#endif /* CONFIG_WPS */
+ wpa_supplicant_notify_scanning(wpa_s, 1);
+
if (wpa_s->use_client_mlme) {
ieee80211_sta_set_probe_req_ie(wpa_s, extra_ie, extra_ie_len);
ret = ieee80211_sta_req_scan(wpa_s, ssid ? ssid->ssid : NULL,
@@ -344,6 +346,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
if (ret) {
wpa_printf(MSG_WARNING, "Failed to initiate AP scan.");
+ wpa_supplicant_notify_scanning(wpa_s, 0);
wpa_supplicant_req_scan(wpa_s, 10, 0);
} else
wpa_s->scan_runs++;
@@ -402,3 +405,13 @@ void wpa_supplicant_cancel_scan(struct wpa_supplicant *wpa_s)
wpa_msg(wpa_s, MSG_DEBUG, "Cancelling scan request");
eloop_cancel_timeout(wpa_supplicant_scan, wpa_s, NULL);
}
+
+void wpa_supplicant_notify_scanning(struct wpa_supplicant *wpa_s,
+ int scanning)
+{
+ if (wpa_s->scanning != scanning) {
+ wpa_s->scanning = scanning;
+ wpa_supplicant_dbus_notify_scanning(wpa_s);
+ }
+}
+
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 723e2ed..3bfffa2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -514,6 +514,9 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, wpa_states state)
wpa_supplicant_state_txt(wpa_s->wpa_state),
wpa_supplicant_state_txt(state));
+ if (state != WPA_SCANNING)
+ wpa_supplicant_notify_scanning(wpa_s, 0);
+
wpa_supplicant_dbus_notify_state_change(wpa_s, state,
wpa_s->wpa_state);
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 8d131fc..63984d8 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -329,6 +329,7 @@ struct wpa_supplicant {
struct ctrl_iface_priv *ctrl_iface;
wpa_states wpa_state;
+ int scanning;
int new_connection;
int reassociated_connection;
@@ -431,6 +432,8 @@ int wpa_supplicant_scard_init(struct wpa_supplicant *wpa_s,
/* scan.c */
void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec);
void wpa_supplicant_cancel_scan(struct wpa_supplicant *wpa_s);
+void wpa_supplicant_notify_scanning(struct wpa_supplicant *wpa_s,
+ int scanning);
/* events.c */
void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s);

View File

@ -1,104 +0,0 @@
From: Jouni Malinen <jouni.malinen@atheros.com>
Date: Fri, 4 Sep 2009 15:04:41 +0000 (+0300)
Subject: Delay processing of EAPOL frames when not associated
X-Git-Url: http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=1ff733383f3d5c73233ef452a738765667021609
Delay processing of EAPOL frames when not associated
If an EAPOL frame is received while wpa_supplicant thinks the driver is
not associated, queue the frame for processing at the moment when the
association event is received. This is a workaround to a race condition
in receiving data frames and management events from the kernel.
The pending EAPOL frame will not be processed unless an association
event is received within 100 msec for the same BSSID.
---
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index e5e799d..2ea9279 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -943,6 +943,25 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
eapol_sm_notify_portValid(wpa_s->eapol, TRUE);
eapol_sm_notify_eap_success(wpa_s->eapol, TRUE);
}
+
+ if (wpa_s->pending_eapol_rx) {
+ struct os_time now, age;
+ os_get_time(&now);
+ os_time_sub(&now, &wpa_s->pending_eapol_rx_time, &age);
+ if (age.sec == 0 && age.usec < 100000 &&
+ os_memcmp(wpa_s->pending_eapol_rx_src, bssid, ETH_ALEN) ==
+ 0) {
+ wpa_printf(MSG_DEBUG, "Process pending EAPOL frame "
+ "that was received just before association "
+ "notification");
+ wpa_supplicant_rx_eapol(
+ wpa_s, wpa_s->pending_eapol_rx_src,
+ wpabuf_head(wpa_s->pending_eapol_rx),
+ wpabuf_len(wpa_s->pending_eapol_rx));
+ }
+ wpabuf_free(wpa_s->pending_eapol_rx);
+ wpa_s->pending_eapol_rx = NULL;
+ }
}
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index d03e9da..c68dd82 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -405,6 +405,9 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
ieee80211_sta_deinit(wpa_s);
wpas_wps_deinit(wpa_s);
+
+ wpabuf_free(wpa_s->pending_eapol_rx);
+ wpa_s->pending_eapol_rx = NULL;
}
@@ -1574,6 +1577,27 @@ void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
wpa_printf(MSG_DEBUG, "RX EAPOL from " MACSTR, MAC2STR(src_addr));
wpa_hexdump(MSG_MSGDUMP, "RX EAPOL", buf, len);
+ if (wpa_s->wpa_state < WPA_ASSOCIATED) {
+ /*
+ * There is possible race condition between receiving the
+ * association event and the EAPOL frame since they are coming
+ * through different paths from the driver. In order to avoid
+ * issues in trying to process the EAPOL frame before receiving
+ * association information, lets queue it for processing until
+ * the association event is received.
+ */
+ wpa_printf(MSG_DEBUG, "Not associated - Delay processing of "
+ "received EAPOL frame");
+ wpabuf_free(wpa_s->pending_eapol_rx);
+ wpa_s->pending_eapol_rx = wpabuf_alloc_copy(buf, len);
+ if (wpa_s->pending_eapol_rx) {
+ os_get_time(&wpa_s->pending_eapol_rx_time);
+ os_memcpy(wpa_s->pending_eapol_rx_src, src_addr,
+ ETH_ALEN);
+ }
+ return;
+ }
+
if (wpa_s->key_mgmt == WPA_KEY_MGMT_NONE) {
wpa_printf(MSG_DEBUG, "Ignored received EAPOL frame since "
"no key management is configured");
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 63984d8..e814f86 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -364,6 +364,10 @@ struct wpa_supplicant {
int wps_success; /* WPS success event received */
int blacklist_cleared;
+ struct wpabuf *pending_eapol_rx;
+ struct os_time pending_eapol_rx_time;
+ u8 pending_eapol_rx_src[ETH_ALEN];
+
int disconnect_count;
};

View File

@ -1,264 +0,0 @@
diff -up wpa_supplicant-0.6.8/wpa_supplicant/ctrl_iface.c.scan-faster wpa_supplicant-0.6.8/wpa_supplicant/ctrl_iface.c
--- wpa_supplicant-0.6.8/wpa_supplicant/ctrl_iface.c.scan-faster 2009-02-15 10:00:00.000000000 -0800
+++ wpa_supplicant-0.6.8/wpa_supplicant/ctrl_iface.c 2009-11-29 13:35:44.517283679 -0800
@@ -733,8 +733,9 @@ static int wpa_supplicant_ctrl_iface_sca
static int wpa_supplicant_ctrl_iface_select_network(
struct wpa_supplicant *wpa_s, char *cmd)
{
- int id;
+ int id, timeout, do_scan = 1;
struct wpa_ssid *ssid;
+ struct os_time now;
/* cmd: "<network id>" or "any" */
if (os_strcmp(cmd, "any") == 0) {
@@ -745,7 +746,22 @@ static int wpa_supplicant_ctrl_iface_sel
ssid = ssid->next;
}
wpa_s->reassociate = 1;
- wpa_supplicant_req_scan(wpa_s, 0, 0);
+
+ /* Just associate and don't request a scan if the latest
+ * scan results are less than 10 seconds old.
+ */
+ if (os_get_time(&now) == 0) {
+ now.sec -= 10;
+ if (os_time_before(&now, &(wpa_s->last_scan))) {
+ if (wpa_supplicant_select_bss_and_associate (
+ wpa_s, &timeout) >= 0) {
+ do_scan = 0;
+ }
+ }
+ }
+
+ if (do_scan)
+ wpa_supplicant_req_scan(wpa_s, 0, 0);
return 0;
}
diff -up wpa_supplicant-0.6.8/wpa_supplicant/ctrl_iface_dbus_handlers.c.scan-faster wpa_supplicant-0.6.8/wpa_supplicant/ctrl_iface_dbus_handlers.c
--- wpa_supplicant-0.6.8/wpa_supplicant/ctrl_iface_dbus_handlers.c.scan-faster 2009-11-29 13:35:44.511309733 -0800
+++ wpa_supplicant-0.6.8/wpa_supplicant/ctrl_iface_dbus_handlers.c 2009-11-29 13:35:44.518283666 -0800
@@ -1073,7 +1073,8 @@ DBusMessage * wpas_dbus_iface_select_net
wpa_supplicant_req_scan(wpa_s, 0, 0);
} else {
const char *obj_path;
- int nid;
+ int nid, timeout, do_scan = 1;
+ struct os_time now;
if (!dbus_message_get_args(message, NULL,
DBUS_TYPE_OBJECT_PATH, &op,
@@ -1124,7 +1125,22 @@ DBusMessage * wpas_dbus_iface_select_net
}
wpa_s->disconnected = 0;
wpa_s->reassociate = 1;
- wpa_supplicant_req_scan(wpa_s, 0, 0);
+
+ /* Just associate and don't request a scan if the latest
+ * scan results are less than 10 seconds old.
+ */
+ if (os_get_time(&now) == 0) {
+ now.sec -= 10;
+ if (os_time_before(&now, &(wpa_s->last_scan))) {
+ if (wpa_supplicant_select_bss_and_associate (
+ wpa_s, &timeout) >= 0) {
+ do_scan = 0;
+ }
+ }
+ }
+
+ if (do_scan)
+ wpa_supplicant_req_scan(wpa_s, 0, 0);
}
reply = wpas_dbus_new_success_reply(message);
diff -up wpa_supplicant-0.6.8/wpa_supplicant/events.c.scan-faster wpa_supplicant-0.6.8/wpa_supplicant/events.c
--- wpa_supplicant-0.6.8/wpa_supplicant/events.c.scan-faster 2009-11-29 13:35:44.512309091 -0800
+++ wpa_supplicant-0.6.8/wpa_supplicant/events.c 2009-11-29 13:47:07.789286282 -0800
@@ -683,43 +683,17 @@ wpa_supplicant_select_bss(struct wpa_sup
}
-static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s)
-{
- int prio, timeout;
- struct wpa_scan_res *selected = NULL;
- struct wpa_ssid *ssid = NULL;
+/* Returns 0 on success; -1 when no BSS has been selected */
+int
+wpa_supplicant_select_bss_and_associate (struct wpa_supplicant *wpa_s,
+ int *out_timeout)
+ {
+ struct wpa_scan_res *selected = NULL;
+ struct wpa_ssid *ssid = NULL;
+ int prio;
int qual = 0, max_qual = 0, qual_valid = 0, bssid_valid = 0, i;
struct cur_ap cur;
- wpa_supplicant_notify_scanning(wpa_s, 0);
-
- if (wpa_supplicant_get_scan_results(wpa_s) < 0) {
- if (wpa_s->conf->ap_scan == 2)
- return;
- wpa_printf(MSG_DEBUG, "Failed to get scan results - try "
- "scanning again");
- timeout = 1;
- goto req_scan;
- }
-
- /*
- * Don't post the results if this was the initial cached
- * and there were no results.
- */
- if (wpa_s->scan_res_tried == 1 && wpa_s->conf->ap_scan == 1 &&
- wpa_s->scan_res->num == 0) {
- wpa_msg(wpa_s, MSG_DEBUG, "Cached scan results are "
- "empty - not posting");
- } else {
- wpa_msg(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS);
- wpa_supplicant_dbus_notify_scan_results(wpa_s);
- wpas_wps_notify_scan_results(wpa_s);
- }
-
- if ((wpa_s->conf->ap_scan == 2 && !wpas_wps_searching(wpa_s)) ||
- wpa_s->disconnected)
- return;
-
/* Get current driver BSSID and signal strength */
os_memset(&cur, 0, sizeof(cur));
@@ -772,40 +746,84 @@ static void wpa_supplicant_event_scan_re
}
}
- if (selected) {
- if (wpas_wps_scan_pbc_overlap(wpa_s, selected, ssid)) {
- wpa_msg(wpa_s, MSG_INFO, WPS_EVENT_OVERLAP
- "PBC session overlap");
- timeout = 10;
- goto req_scan;
- }
-
- /* Do not trigger new association unless the BSSID has changed
- * or if reassociation is requested. If we are in process of
- * associating with the selected BSSID, do not trigger new
- * attempt. */
- if (wpa_s->reassociate ||
- (os_memcmp(selected->bssid, wpa_s->bssid, ETH_ALEN) != 0 &&
- (wpa_s->wpa_state != WPA_ASSOCIATING ||
- os_memcmp(selected->bssid, wpa_s->pending_bssid,
- ETH_ALEN) != 0))) {
- if (wpa_supplicant_scard_init(wpa_s, ssid)) {
- wpa_supplicant_req_scan(wpa_s, 10, 0);
- return;
- }
- wpa_supplicant_associate(wpa_s, selected, ssid);
- } else {
- wpa_printf(MSG_DEBUG, "Already associated with the "
- "selected AP.");
+ if (!selected) {
+ *out_timeout = 5;
+ return -1;
+ }
+
+ if (wpas_wps_scan_pbc_overlap(wpa_s, selected, ssid)) {
+ wpa_msg(wpa_s, MSG_INFO, WPS_EVENT_OVERLAP
+ "PBC session overlap");
+ *out_timeout = 10;
+ return -1;
+ }
+
+ /* Do not trigger new association unless the BSSID has changed
+ * or if reassociation is requested. If we are in process of
+ * associating with the selected BSSID, do not trigger new
+ * attempt. */
+ if (wpa_s->reassociate ||
+ (os_memcmp(selected->bssid, wpa_s->bssid, ETH_ALEN) != 0 &&
+ (wpa_s->wpa_state != WPA_ASSOCIATING ||
+ os_memcmp(selected->bssid, wpa_s->pending_bssid,
+ ETH_ALEN) != 0))) {
+ if (wpa_supplicant_scard_init(wpa_s, ssid)) {
+ *out_timeout = 10;
+ return -1;
}
- rsn_preauth_scan_results(wpa_s->wpa, wpa_s->scan_res);
+ wpa_supplicant_associate(wpa_s, selected, ssid);
} else {
- wpa_printf(MSG_DEBUG, "No suitable AP found.");
- timeout = 5;
+ wpa_printf(MSG_DEBUG, "Already associated with the "
+ "selected AP.");
+ }
+
+ return 0;
+}
+
+static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s)
+{
+ int timeout;
+
+ wpa_supplicant_notify_scanning(wpa_s, 0);
+
+ if (wpa_supplicant_get_scan_results(wpa_s) < 0) {
+ if (wpa_s->conf->ap_scan == 2)
+ return;
+ wpa_printf(MSG_DEBUG, "Failed to get scan results - try "
+ "scanning again");
+ timeout = 1;
goto req_scan;
}
- return;
+ /*
+ * Don't post the results if this was the initial cached
+ * and there were no results.
+ */
+ if (wpa_s->scan_res_tried == 1 && wpa_s->conf->ap_scan == 1 &&
+ wpa_s->scan_res->num == 0) {
+ wpa_msg(wpa_s, MSG_DEBUG, "Cached scan results are "
+ "empty - not posting");
+ } else {
+ wpa_msg(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS);
+ wpa_supplicant_dbus_notify_scan_results(wpa_s);
+ wpas_wps_notify_scan_results(wpa_s);
+ }
+
+ /* Update scan timestamp if there are any scan results */
+ if (wpa_s->scan_res->num > 0)
+ os_get_time(&(wpa_s->last_scan));
+
+ if ((wpa_s->conf->ap_scan == 2 && !wpas_wps_searching(wpa_s)) ||
+ wpa_s->disconnected)
+ return;
+
+ /* Find a BSS and kick off an association with it */
+ if (wpa_supplicant_select_bss_and_associate(wpa_s, &timeout) == 0) {
+ rsn_preauth_scan_results(wpa_s->wpa, wpa_s->scan_res);
+ return;
+ } else {
+ wpa_printf(MSG_DEBUG, "No suitable AP found.");
+ }
req_scan:
if (wpa_s->scan_res_tried == 1 && wpa_s->conf->ap_scan == 1) {
diff -up wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h.scan-faster wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h
--- wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h.scan-faster 2009-11-29 13:35:44.514283924 -0800
+++ wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h 2009-11-29 13:35:44.520285108 -0800
@@ -347,6 +347,7 @@ struct wpa_supplicant {
* to speed up the first association if the driver
* has already available scan results. */
int scan_runs; /* number of scan runs since WPS was started */
+ struct os_time last_scan; /* timestamp of last scan results */
struct wpa_client_mlme mlme;
int use_client_mlme;
@@ -415,6 +416,8 @@ void wpa_supplicant_notify_scanning(stru
/* events.c */
void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s);
+int wpa_supplicant_select_bss_and_associate (struct wpa_supplicant *wpa_s,
+ int *out_timeout);
/* driver_ops */
static inline void * wpa_drv_init(struct wpa_supplicant *wpa_s,

View File

@ -1,16 +1,16 @@
diff -up wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c.assoc-timeout wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c
--- wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c.assoc-timeout 2008-08-27 17:01:00.000000000 -0400
+++ wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c 2008-08-27 17:01:22.000000000 -0400
@@ -1094,10 +1094,10 @@ void wpa_supplicant_associate(struct wpa
diff -up wpa_supplicant-0.7.3/wpa_supplicant/wpa_supplicant.c.assoc-timeout wpa_supplicant-0.7.3/wpa_supplicant/wpa_supplicant.c
--- wpa_supplicant-0.7.3/wpa_supplicant/wpa_supplicant.c.assoc-timeout 2010-09-07 10:43:39.000000000 -0500
+++ wpa_supplicant-0.7.3/wpa_supplicant/wpa_supplicant.c 2010-12-07 18:57:45.163457000 -0600
@@ -1262,10 +1262,10 @@ void wpa_supplicant_associate(struct wpa
if (assoc_failed) {
/* give IBSS a bit more time */
- timeout = ssid->mode ? 10 : 5;
+ timeout = ssid->mode ? 20 : 10;
- timeout = ssid->mode == WPAS_MODE_IBSS ? 10 : 5;
+ timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 10;
} else if (wpa_s->conf->ap_scan == 1) {
/* give IBSS a bit more time */
- timeout = ssid->mode ? 20 : 10;
+ timeout = ssid->mode ? 20 : 20;
- timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 10;
+ timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 20;
}
wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0);
}

View File

@ -0,0 +1,44 @@
diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index bdfbbac..8bd42c5 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -691,6 +691,11 @@ void wpas_dbus_signal_prop_changed(struct wpa_supplicant *wpa_s,
wpas_dbus_getter_current_network;
prop = "CurrentNetwork";
break;
+ case WPAS_DBUS_PROP_BSSS:
+ getter = (WPADBusPropertyAccessor)
+ wpas_dbus_getter_bsss;
+ prop = "BSSs";
+ break;
default:
wpa_printf(MSG_ERROR, "dbus: %s: Unknown Property value %d",
__func__, property);
@@ -1199,6 +1204,7 @@ int wpas_dbus_unregister_bss(struct wpa_supplicant *wpa_s,
}
wpas_dbus_signal_bss_removed(wpa_s, bss_obj_path);
+ wpas_dbus_signal_prop_changed (wpa_s, WPAS_DBUS_PROP_BSSS);
return 0;
}
@@ -1263,6 +1269,7 @@ int wpas_dbus_register_bss(struct wpa_supplicant *wpa_s,
}
wpas_dbus_signal_bss_added(wpa_s, bss_obj_path);
+ wpas_dbus_signal_prop_changed (wpa_s, WPAS_DBUS_PROP_BSSS);
return 0;
diff --git a/wpa_supplicant/dbus/dbus_new.h b/wpa_supplicant/dbus/dbus_new.h
index 80ea98c..9cdefcb 100644
--- a/wpa_supplicant/dbus/dbus_new.h
+++ b/wpa_supplicant/dbus/dbus_new.h
@@ -30,6 +30,7 @@ enum wpas_dbus_prop {
WPAS_DBUS_PROP_STATE,
WPAS_DBUS_PROP_CURRENT_BSS,
WPAS_DBUS_PROP_CURRENT_NETWORK,
+ WPAS_DBUS_PROP_BSSS,
};
enum wpas_dbus_bss_prop {

View File

@ -0,0 +1,19 @@
diff -up wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.fedora wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service
--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.fedora 2008-03-02 20:58:35.000000000 -0500
+++ wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service 2008-03-02 20:58:41.000000000 -0500
@@ -1,4 +1,4 @@
[D-BUS Service]
Name=fi.w1.wpa_supplicant1
-Exec=/sbin/wpa_supplicant -u
+Exec=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
User=root
diff -up wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.fedora wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service
--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.fedora 2008-03-02 20:58:35.000000000 -0500
+++ wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service 2008-03-02 20:58:41.000000000 -0500
@@ -1,4 +1,4 @@
[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
-Exec=/sbin/wpa_supplicant -u
+Exec=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
User=root

View File

@ -0,0 +1,16 @@
diff -up wpa_supplicant-0.7.3/wpa_supplicant/Makefile.qt4 wpa_supplicant-0.7.3/wpa_supplicant/Makefile
--- wpa_supplicant-0.7.3/wpa_supplicant/Makefile.qt4 2010-09-07 10:43:39.000000000 -0500
+++ wpa_supplicant-0.7.3/wpa_supplicant/Makefile 2010-12-08 10:07:44.152664004 -0600
@@ -1352,10 +1352,10 @@ wpa_gui: wpa_gui/Makefile
$(MAKE) -C wpa_gui
wpa_gui-qt4/Makefile:
- qmake -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro
+ qmake-qt4 -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro
wpa_gui-qt4/lang/wpa_gui_de.qm: wpa_gui-qt4/lang/wpa_gui_de.ts
- lrelease wpa_gui-qt4/wpa_gui.pro
+ lrelease-qt4 wpa_gui-qt4/wpa_gui.pro
wpa_gui-qt4: wpa_gui-qt4/Makefile wpa_gui-qt4/lang/wpa_gui_de.qm
$(MAKE) -C wpa_gui-qt4

View File

@ -0,0 +1,15 @@
diff -up wpa_supplicant-0.7.3/src/crypto/tls_openssl.c.more-openssl-algs wpa_supplicant-0.7.3/src/crypto/tls_openssl.c
--- wpa_supplicant-0.7.3/src/crypto/tls_openssl.c.more-openssl-algs 2010-09-07 10:43:39.000000000 -0500
+++ wpa_supplicant-0.7.3/src/crypto/tls_openssl.c 2010-12-08 10:01:02.967664004 -0600
@@ -710,6 +710,11 @@ void * tls_init(const struct tls_config
#endif /* OPENSSL_FIPS */
#endif /* CONFIG_FIPS */
SSL_load_error_strings();
+ /* Only add potentially weak hashes and encryption algorithms
+ * when FIPS mode is not enabled.
+ */
+ if (!conf || !conf->fips_mode)
+ OpenSSL_add_all_algorithms();
SSL_library_init();
#ifndef OPENSSL_NO_SHA256
EVP_add_digest(EVP_sha256());

View File

@ -0,0 +1,13 @@
diff -up wpa_supplicant-0.6.7/wpa_supplicant/events.c.scan-results-msg wpa_supplicant-0.6.7/wpa_supplicant/events.c
--- wpa_supplicant-0.6.7/wpa_supplicant/events.c.scan-results-msg 2009-01-30 12:08:34.000000000 -0500
+++ wpa_supplicant-0.6.7/wpa_supplicant/events.c 2009-01-30 12:08:37.000000000 -0500
@@ -911,7 +911,7 @@ static void wpa_supplicant_event_scan_re
}
wpa_printf(MSG_DEBUG, "New scan results available");
- wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS);
+ wpa_msg_ctrl(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS);
wpas_notify_scan_results(wpa_s);
wpas_notify_scan_done(wpa_s, 1);

View File

@ -1,7 +1,7 @@
diff -up wpa_supplicant-0.6.8/wpa_supplicant/events.c.disconnect-spam wpa_supplicant-0.6.8/wpa_supplicant/events.c
--- wpa_supplicant-0.6.8/wpa_supplicant/events.c.disconnect-spam 2010-05-06 18:10:51.348288705 -0700
+++ wpa_supplicant-0.6.8/wpa_supplicant/events.c 2010-05-06 18:10:51.356288887 -0700
@@ -900,6 +900,15 @@ static void wpa_supplicant_event_disasso
@@ -1302,6 +1302,15 @@ static void wpa_supplicant_event_disasso
wpa_s->keys_cleared = 0;
wpa_clear_keys(wpa_s, wpa_s->bssid);
}
@ -15,8 +15,8 @@ diff -up wpa_supplicant-0.6.8/wpa_supplicant/events.c.disconnect-spam wpa_suppli
+ }
+
wpa_supplicant_mark_disassoc(wpa_s);
}
bgscan_deinit(wpa_s);
wpa_s->bgscan_ssid = NULL;
diff -up wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c.disconnect-spam wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c
--- wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c.disconnect-spam 2010-05-06 18:10:51.340288662 -0700
+++ wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c 2010-05-06 18:12:06.090413976 -0700
@ -55,8 +55,8 @@ diff -up wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c.disconnect-spam wp
* wpa_supplicant_set_state - Set current connection state
* @wpa_s: Pointer to wpa_supplicant data
@@ -478,6 +498,18 @@ void wpa_supplicant_set_state(struct wpa
wpa_supplicant_dbus_notify_state_change(wpa_s, state,
wpa_s->wpa_state);
if (state != WPA_SCANNING)
wpa_supplicant_notify_scanning(wpa_s, 0);
+ if (state != WPA_DISCONNECTED && state != WPA_SCANNING) {
+ /* If the state isn't disconnected, cancel any registered
@ -76,20 +76,21 @@ diff -up wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c.disconnect-spam wp
diff -up wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h.disconnect-spam wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h
--- wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h.disconnect-spam 2009-02-15 10:00:00.000000000 -0800
+++ wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h 2010-05-06 18:10:51.358288792 -0700
@@ -358,6 +358,8 @@ struct wpa_supplicant {
struct wps_context *wps;
@@ -397,6 +397,8 @@ struct wpa_supplicant {
int wps_success; /* WPS success event received */
struct wps_er *wps_er;
int blacklist_cleared;
+
+ int disconnect_count;
};
@@ -381,6 +383,7 @@ void wpa_clear_keys(struct wpa_supplican
void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
struct wpabuf *pending_eapol_rx;
struct os_time pending_eapol_rx_time;
@@ -461,6 +463,7 @@ void wpa_clear_keys(struct wpa_supplican
int sec, int usec);
void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, wpa_states state);
void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
enum wpa_states state);
+void wpa_disconnect_spam_handle(void *eloop_ctx, void *timeout_ctx);
struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s);
void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s);
void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,

View File

@ -1,12 +1,12 @@
Summary: WPA/WPA2/IEEE 802.1X Supplicant
Name: wpa_supplicant
Epoch: 1
Version: 0.6.8
Release: 11%{?dist}
Version: 0.7.3
Release: 1%{?dist}
License: BSD
Group: System Environment/Base
Source0: http://hostap.epitest.fi/releases/%{name}-%{version}.tar.gz
Source1: %{name}.config
Source0: http://w1.fi/releases/%{name}-%{version}.tar.gz
Source1: build-config
Source2: %{name}.conf
Source3: %{name}.init.d
Source4: %{name}.sysconfig
@ -17,43 +17,30 @@ Source6: %{name}.logrotate
%define build_gui 0
%endif
%if %{build_gui}
%define with_qt4 0
%if 0%{?fedora} >= 14
%define with_qt4 1
%endif
%endif
# distro specific customization and not suitable for upstream,
# works around busted drivers
Patch0: wpa_supplicant-assoc-timeout.patch
# build fix for Fedora, not suitable for upstream
Patch1: wpa_supplicant-0.5.7-qmake-location.patch
# ensures that debug output gets flushed immediately to help diagnose driver
# bugs, not suitable for upstream
Patch2: wpa_supplicant-0.5.7-flush-debug-output.patch
Patch1: wpa_supplicant-flush-debug-output.patch
# disto specific customization for log paths, not suitable for upstream
Patch4: wpa_supplicant-0.5.10-dbus-service-file.patch
Patch5: wpa_supplicant-0.6.7-quiet-scan-results-message.patch
Patch6: wpa_supplicant-0.6.8-disconnect-fixes.patch
Patch7: wpa_supplicant-0.6.8-disconnect-init-deinit.patch
Patch8: wpa_supplicant-0.6.8-handle-driver-disconnect-spam.patch
Patch9: wpa_supplicant-0.6.8-ap-stability.patch
Patch10: wpa_supplicant-0.6.8-scanning-property.patch
Patch11: wpa_supplicant-0.6.9-scan-faster.patch
Patch12: wpa_supplicant-0.6.9-eapol-race-fix.patch
Patch13: wpa_supplicant-0.6.8-openssl-init.patch
Patch20: wpa_supplicant-0.6.8-gui-qt4.patch
Patch2: wpa_supplicant-dbus-service-file-args.patch
# quiet an annoying and frequent syslog message
Patch3: wpa_supplicant-quiet-scan-results-message.patch
# recover from streams of driver disconnect messages (iwl3945)
Patch4: wpa_supplicant-squelch-driver-disconnect-spam.patch
# allow more private key encryption algorithms
Patch5: wpa_supplicant-openssl-more-algs.patch
# distro specific customization for Qt4 build tools, not suitable for upstream
Patch6: wpa_supplicant-gui-qt4.patch
# Send PropertyChanged notificationes when the BSS list changes
Patch7: wpa_supplicant-bss-changed-prop-notify.patch
URL: http://w1.fi/wpa_supplicant/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{build_gui}
%if %{with_qt4}
BuildRequires: qt-devel >= 4.0
%else
BuildRequires: qt3-devel
%endif
%endif
BuildRequires: openssl-devel
BuildRequires: readline-devel
@ -80,32 +67,22 @@ Graphical User Interface for wpa_supplicant written using QT
%prep
%setup -q
%patch0 -p1 -b .assoc-timeout
%patch1 -p1 -b .qmake-location
%patch2 -p1 -b .flush-debug-output
%patch4 -p1 -b .dbus-service-file
%patch5 -p1 -b .quiet-scan-results-msg
%patch6 -p1 -b .really-disassoc
%patch7 -p1 -b .disconnect-init-deinit
%patch8 -p1 -b .disconnect-spam
%patch9 -p1 -b .ap-stability
%patch10 -p1 -b .scanning-property
%patch11 -p1 -b .scan-faster
%patch12 -p1 -b .eapol-race-fix
%patch13 -p1 -b .more-openssl-algs
%patch20 -p1 -b .qt4
%patch1 -p1 -b .flush-debug-output
%patch2 -p1 -b .dbus-service-file
%patch3 -p1 -b .quiet-scan-results-msg
%patch4 -p1 -b .disconnect-spam
%patch5 -p1 -b .more-openssl-algs
%patch6 -p1 -b .qt4
%patch7 -p1 -b .bss-changed-prop-notify
%build
pushd wpa_supplicant
cp %{SOURCE1} ./.config
cp %{SOURCE1} .config
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ;
make %{_smp_mflags}
%if %{build_gui}
%if %{with_qt4}
QTDIR=%{_libdir}/qt4 make wpa_gui-qt4 %{_smp_mflags}
%else
QTDIR=%{_libdir}/qt-3.3 make wpa_gui %{_smp_mflags}
%endif
%endif
popd
@ -125,17 +102,14 @@ install -d %{buildroot}/%{_sbindir}
install -m 0755 %{name}/wpa_passphrase %{buildroot}/%{_sbindir}
install -m 0755 %{name}/wpa_cli %{buildroot}/%{_sbindir}
install -m 0755 %{name}/wpa_supplicant %{buildroot}/%{_sbindir}
install -D -m 0644 %{name}/dbus-wpa_supplicant.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
install -D -m 0644 %{name}/dbus-wpa_supplicant.service %{buildroot}/%{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
install -D -m 0644 %{name}/dbus/dbus-wpa_supplicant.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
install -D -m 0644 %{name}/dbus/fi.w1.wpa_supplicant1.service %{buildroot}/%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
install -D -m 0644 %{name}/dbus/fi.epitest.hostap.WPASupplicant.service %{buildroot}/%{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
%if %{build_gui}
# gui
install -d %{buildroot}/%{_bindir}
%if %{with_qt4}
install -m 0755 %{name}/wpa_gui-qt4/wpa_gui %{buildroot}/%{_bindir}
%else
install -m 0755 %{name}/wpa_gui/wpa_gui %{buildroot}/%{_bindir}
%endif
%endif
# running
@ -176,6 +150,7 @@ fi
%{_sysconfdir}/rc.d/init.d/%{name}
%{_sysconfdir}/dbus-1/system.d/%{name}.conf
%{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
%{_sbindir}/wpa_passphrase
%{_sbindir}/wpa_supplicant
%{_sbindir}/wpa_cli
@ -191,6 +166,11 @@ fi
%endif
%changelog
* Wed Dec 8 2010 Dan Williams <dcbw@redhat.com> - 1:0.7.3-1
- Update to 0.7.3
- Drop upstreamed and backported patches
- Drop support for Qt3
* Thu Oct 7 2010 Peter Lemenkov <lemenkov@gmail.com> - 1:0.6.8-11
- Added comments to some patches (see rhbz #226544#c17)
- Shortened %%install section a bit