- Fix crash when interfaces are removed (like suspend/resume) (rh #589507)

This commit is contained in:
Daniel Williams 2010-05-07 01:16:58 +00:00
parent 8529a653e7
commit 4b6173f748
2 changed files with 28 additions and 15 deletions

View File

@ -1,7 +1,7 @@
diff -up wpa_supplicant-0.6.4/wpa_supplicant/events.c.disassoc-stream wpa_supplicant-0.6.4/wpa_supplicant/events.c 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.4/wpa_supplicant/events.c.disassoc-stream 2009-04-16 15:08:23.000000000 -0400 --- wpa_supplicant-0.6.8/wpa_supplicant/events.c.disconnect-spam 2010-05-06 18:10:51.348288705 -0700
+++ wpa_supplicant-0.6.4/wpa_supplicant/events.c 2009-04-16 15:44:14.000000000 -0400 +++ wpa_supplicant-0.6.8/wpa_supplicant/events.c 2010-05-06 18:10:51.356288887 -0700
@@ -941,6 +941,15 @@ static void wpa_supplicant_event_disasso @@ -900,6 +900,15 @@ static void wpa_supplicant_event_disasso
wpa_s->keys_cleared = 0; wpa_s->keys_cleared = 0;
wpa_clear_keys(wpa_s, wpa_s->bssid); wpa_clear_keys(wpa_s, wpa_s->bssid);
} }
@ -17,10 +17,20 @@ diff -up wpa_supplicant-0.6.4/wpa_supplicant/events.c.disassoc-stream wpa_suppli
wpa_supplicant_mark_disassoc(wpa_s); wpa_supplicant_mark_disassoc(wpa_s);
} }
diff -up wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c.disassoc-stream wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c 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.4/wpa_supplicant/wpa_supplicant.c.disassoc-stream 2009-04-16 15:27:23.000000000 -0400 --- wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c.disconnect-spam 2010-05-06 18:10:51.340288662 -0700
+++ wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c 2009-04-16 15:44:21.000000000 -0400 +++ wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant.c 2010-05-06 18:12:06.090413976 -0700
@@ -460,6 +460,23 @@ const char * wpa_supplicant_state_txt(in @@ -382,6 +382,9 @@ static void wpa_supplicant_cleanup(struc
wpa_supplicant_cancel_scan(wpa_s);
wpa_supplicant_cancel_auth_timeout(wpa_s);
+ if (eloop_is_timeout_registered(wpa_disconnect_spam_handle, wpa_s, NULL))
+ eloop_cancel_timeout(wpa_disconnect_spam_handle, wpa_s, NULL);
+
ieee80211_sta_deinit(wpa_s);
wpas_wps_deinit(wpa_s);
@@ -461,6 +464,23 @@ const char * wpa_supplicant_state_txt(in
} }
@ -44,7 +54,7 @@ diff -up wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c.disassoc-stream wp
/** /**
* wpa_supplicant_set_state - Set current connection state * wpa_supplicant_set_state - Set current connection state
* @wpa_s: Pointer to wpa_supplicant data * @wpa_s: Pointer to wpa_supplicant data
@@ -477,6 +492,18 @@ void wpa_supplicant_set_state(struct wpa @@ -478,6 +498,18 @@ void wpa_supplicant_set_state(struct wpa
wpa_supplicant_dbus_notify_state_change(wpa_s, state, wpa_supplicant_dbus_notify_state_change(wpa_s, state,
wpa_s->wpa_state); wpa_s->wpa_state);
@ -63,10 +73,10 @@ diff -up wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant.c.disassoc-stream wp
if (state == WPA_COMPLETED && wpa_s->new_connection) { if (state == WPA_COMPLETED && wpa_s->new_connection) {
#if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG) #if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG)
struct wpa_ssid *ssid = wpa_s->current_ssid; struct wpa_ssid *ssid = wpa_s->current_ssid;
diff -up wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant_i.h.disassoc-stream wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant_i.h 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.4/wpa_supplicant/wpa_supplicant_i.h.disassoc-stream 2009-04-16 15:12:48.000000000 -0400 --- 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.4/wpa_supplicant/wpa_supplicant_i.h 2009-04-16 15:26:48.000000000 -0400 +++ wpa_supplicant-0.6.8/wpa_supplicant/wpa_supplicant_i.h 2010-05-06 18:10:51.358288792 -0700
@@ -334,6 +334,8 @@ struct wpa_supplicant { @@ -358,6 +358,8 @@ struct wpa_supplicant {
struct wps_context *wps; struct wps_context *wps;
int wps_success; /* WPS success event received */ int wps_success; /* WPS success event received */
int blacklist_cleared; int blacklist_cleared;
@ -75,7 +85,7 @@ diff -up wpa_supplicant-0.6.4/wpa_supplicant/wpa_supplicant_i.h.disassoc-stream
}; };
@@ -357,6 +359,7 @@ void wpa_clear_keys(struct wpa_supplican @@ -381,6 +383,7 @@ void wpa_clear_keys(struct wpa_supplican
void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s, void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
int sec, int usec); 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, wpa_states state);

View File

@ -2,7 +2,7 @@ Summary: WPA/WPA2/IEEE 802.1X Supplicant
Name: wpa_supplicant Name: wpa_supplicant
Epoch: 1 Epoch: 1
Version: 0.6.8 Version: 0.6.8
Release: 8%{?dist} Release: 9%{?dist}
License: BSD License: BSD
Group: System Environment/Base Group: System Environment/Base
Source0: http://hostap.epitest.fi/releases/%{name}-%{version}.tar.gz Source0: http://hostap.epitest.fi/releases/%{name}-%{version}.tar.gz
@ -155,6 +155,9 @@ fi
%{_bindir}/wpa_gui %{_bindir}/wpa_gui
%changelog %changelog
* Thu May 6 2010 Dan Williams <dcbw@redhat.com> - 1:0.6.8-9
- Fix crash when interfaces are removed (like suspend/resume) (rh #589507)
* Wed Jan 6 2010 Dan Williams <dcbw@redhat.com> - 1:0.6.8-8 * Wed Jan 6 2010 Dan Williams <dcbw@redhat.com> - 1:0.6.8-8
- Fix handling of newer PKCS#12 files (rh #541924) - Fix handling of newer PKCS#12 files (rh #541924)