diff --git a/.cvsignore b/.cvsignore index bae267c..7d6648d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -6,3 +6,4 @@ madwifi-headers-r1475.tar.bz2 wpa_supplicant-0.4.9.tar.gz wpa_supplicant-0.5.7.tar.gz wpa_supplicant-0.6.3.tar.gz +wpa_supplicant-0.6.4.tar.gz diff --git a/sources b/sources index 55e8083..f2146b3 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -b82289b140cc1c66db11564bde248d8a madwifi-headers-r1475.tar.bz2 -b51b2975f21006f85f7297f3fb1acde1 wpa_supplicant-0.6.3.tar.gz +eb06a9a05d3916addf9451297a558aa2 wpa_supplicant-0.6.4.tar.gz diff --git a/wpa_supplicant-0.6.3-dont-reschedule-specific-scans.patch b/wpa_supplicant-0.6.3-dont-reschedule-specific-scans.patch deleted file mode 100644 index 09d3b08..0000000 --- a/wpa_supplicant-0.6.3-dont-reschedule-specific-scans.patch +++ /dev/null @@ -1,163 +0,0 @@ -commit 7e1488494e0150ee7fdef83355266b5633c5c1b0 -Author: Dan Williams -Date: Tue Jun 3 11:37:48 2008 +0300 - - Do not continually reschedule specific scans to help finding hidden SSIDs - - In situations where the driver does background scanning and sends a - steady stream of scan results, wpa_supplicant would continually - reschedule the scan. This resulted in specific SSID scans never - happening for a hidden AP, and the supplicant never connecting to the AP - because it never got found. Instead, if there's an already scheduled - scan, and a request comes in to reschedule it, and there are enabled - scan_ssid=1 network blocks, let the scan happen anyway so the hidden - SSID has a chance to be found. - -diff --git a/src/utils/eloop.c b/src/utils/eloop.c -index f988e94..4edb2a7 100644 ---- a/src/utils/eloop.c -+++ b/src/utils/eloop.c -@@ -315,6 +315,25 @@ int eloop_cancel_timeout(eloop_timeout_handler handler, - } - - -+int eloop_is_timeout_registered(eloop_timeout_handler handler, -+ void *eloop_data, void *user_data) -+{ -+ struct eloop_timeout *tmp; -+ -+ tmp = eloop.timeout; -+ while (tmp != NULL) { -+ if (tmp->handler == handler && -+ tmp->eloop_data == eloop_data && -+ tmp->user_data == user_data) -+ return 1; -+ -+ tmp = tmp->next; -+ } -+ -+ return 0; -+} -+ -+ - #ifndef CONFIG_NATIVE_WINDOWS - static void eloop_handle_alarm(int sig) - { -diff --git a/src/utils/eloop.h b/src/utils/eloop.h -index 4dd2871..cf83f38 100644 ---- a/src/utils/eloop.h -+++ b/src/utils/eloop.h -@@ -207,6 +207,19 @@ int eloop_cancel_timeout(eloop_timeout_handler handler, - void *eloop_data, void *user_data); - - /** -+ * eloop_is_timeout_registered - Check if a timeout is already registered -+ * @handler: Matching callback function -+ * @eloop_data: Matching eloop_data -+ * @user_data: Matching user_data -+ * Returns: 1 if the timeout is registered, 0 if the timeout is not registered -+ * -+ * Determine if a matching timeout is registered -+ * with eloop_register_timeout(). -+ */ -+int eloop_is_timeout_registered(eloop_timeout_handler handler, -+ void *eloop_data, void *user_data); -+ -+/** - * eloop_register_signal - Register handler for signals - * @sig: Signal number (e.g., SIGHUP) - * @handler: Callback function to be called when the signal is received -diff --git a/src/utils/eloop_none.c b/src/utils/eloop_none.c -index 6943109..215030b 100644 ---- a/src/utils/eloop_none.c -+++ b/src/utils/eloop_none.c -@@ -197,6 +197,26 @@ int eloop_cancel_timeout(void (*handler)(void *eloop_ctx, void *sock_ctx), - } - - -+int eloop_is_timeout_registered(void (*handler)(void *eloop_ctx, -+ void *timeout_ctx), -+ void *eloop_data, void *user_data) -+{ -+ struct eloop_timeout *tmp; -+ -+ tmp = eloop.timeout; -+ while (tmp != NULL) { -+ if (tmp->handler == handler && -+ tmp->eloop_data == eloop_data && -+ tmp->user_data == user_data) -+ return 1; -+ -+ tmp = tmp->next; -+ } -+ -+ return 0; -+} -+ -+ - /* TODO: replace with suitable signal handler */ - #if 0 - static void eloop_handle_signal(int sig) -diff --git a/src/utils/eloop_win.c b/src/utils/eloop_win.c -index 73f0eaf..a1ccd94 100644 ---- a/src/utils/eloop_win.c -+++ b/src/utils/eloop_win.c -@@ -320,6 +320,25 @@ int eloop_cancel_timeout(eloop_timeout_handler handler, - } - - -+int eloop_is_timeout_registered(eloop_timeout_handler handler, -+ void *eloop_data, void *user_data) -+{ -+ struct eloop_timeout *tmp; -+ -+ tmp = eloop.timeout; -+ while (tmp != NULL) { -+ if (tmp->handler == handler && -+ tmp->eloop_data == eloop_data && -+ tmp->user_data == user_data) -+ return 1; -+ -+ tmp = tmp->next; -+ } -+ -+ return 0; -+} -+ -+ - /* TODO: replace with suitable signal handler */ - #if 0 - static void eloop_handle_signal(int sig) -diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c -index b046d90..c2549e2 100644 ---- a/wpa_supplicant/scan.c -+++ b/wpa_supplicant/scan.c -@@ -172,6 +172,28 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) - */ - void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec) - { -+ /* If there's at least one network that should be specifically scanned -+ * then don't cancel the scan and reschedule. Some drivers do -+ * background scanning which generates frequent scan results, and that -+ * causes the specific SSID scan to get continually pushed back and -+ * never happen, which causes hidden APs to never get probe-scanned. -+ */ -+ if (eloop_is_timeout_registered(wpa_supplicant_scan, wpa_s, NULL) && -+ wpa_s->conf->ap_scan == 1) { -+ struct wpa_ssid *ssid = wpa_s->conf->ssid; -+ -+ while (ssid) { -+ if (!ssid->disabled && ssid->scan_ssid) -+ break; -+ ssid = ssid->next; -+ } -+ if (ssid) { -+ wpa_msg(wpa_s, MSG_DEBUG, "Not rescheduling scan to " -+ "ensure that specific SSID scans occur"); -+ return; -+ } -+ } -+ - wpa_msg(wpa_s, MSG_DEBUG, "Setting scan request: %d sec %d usec", - sec, usec); - eloop_cancel_timeout(wpa_supplicant_scan, wpa_s, NULL); diff --git a/wpa_supplicant-0.6.3-fix-dbus-use-after-free.patch b/wpa_supplicant-0.6.3-fix-dbus-use-after-free.patch deleted file mode 100644 index ecb8c3e..0000000 --- a/wpa_supplicant-0.6.3-fix-dbus-use-after-free.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/wpa_supplicant/dbus_dict_helpers.c b/wpa_supplicant/dbus_dict_helpers.c -index 1232ab2..d810979 100644 ---- a/wpa_supplicant/dbus_dict_helpers.c -+++ b/wpa_supplicant/dbus_dict_helpers.c -@@ -674,7 +674,7 @@ static dbus_bool_t _wpa_dbus_dict_entry_get_byte_array( - /* Zero-length arrays are valid. */ - if (entry->array_len == 0) { - free(entry->bytearray_value); -- entry->strarray_value = NULL; -+ entry->bytearray_value = NULL; - } - - success = TRUE; diff --git a/wpa_supplicant-0.6.3-wext-dont-overwrite-BSS-frequency.patch b/wpa_supplicant-0.6.3-wext-dont-overwrite-BSS-frequency.patch deleted file mode 100644 index 6970beb..0000000 --- a/wpa_supplicant-0.6.3-wext-dont-overwrite-BSS-frequency.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 2e5a7b49a0a52ce36033e4839aae90e638746b6a -Author: Dan Williams -Date: Mon Jun 2 20:47:09 2008 +0300 - - wext: don't overwrite BSS frequency - - mac80211 sends _both_ channel and frequency in it's scan results, with - frequency first and channel second (it's since been fixed to send - channel first and frequency second to work around this issue). This - results in wpa_supplicant getting the right value when the frequency - comes, but overwriting the value with '0' when the channel comes because - wpa_supplicant can't handle 5GHz channel numbers. So if a valid - previous SIOCGIWFREQ event came in, don't try to overwrite it. - -diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c -index f9c86bb..efa88a8 100644 ---- a/src/drivers/driver_wext.c -+++ b/src/drivers/driver_wext.c -@@ -1294,8 +1294,15 @@ static void wext_get_scan_freq(struct iw_event *iwe, - /* - * Some drivers do not report frequency, but a channel. - * Try to map this to frequency by assuming they are using -- * IEEE 802.11b/g. -+ * IEEE 802.11b/g. But don't overwrite a previously parsed -+ * frequency if the driver sends both frequency and channel, -+ * since the driver may be sending an A-band channel that we -+ * don't handle here. - */ -+ -+ if (res->res.freq) -+ return; -+ - if (iwe->u.freq.m >= 1 && iwe->u.freq.m <= 13) { - res->res.freq = 2407 + 5 * iwe->u.freq.m; - return; diff --git a/wpa_supplicant-0.6.3-wext-handle-mac80211-mode-switches.patch b/wpa_supplicant-0.6.3-wext-handle-mac80211-mode-switches.patch deleted file mode 100644 index b212963..0000000 --- a/wpa_supplicant-0.6.3-wext-handle-mac80211-mode-switches.patch +++ /dev/null @@ -1,74 +0,0 @@ -commit 59c9707863336c1255936c755d24c8eb1ed8db2f -Author: Dan Williams -Date: Wed Jun 4 20:55:57 2008 +0300 - - wext: handle mode switches correctly for mac80211 - - Since mac80211 requires that the device be !IFF_UP to change the mode - (and I think the old prism54 fullmac driver does too), do that. This - shouldn't harm fullmac devices since they can handle mode switches on - the fly and usually don't care about up/down that much. - -diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c -index 1226b94..c9d7399 100644 ---- a/src/drivers/driver_wext.c -+++ b/src/drivers/driver_wext.c -@@ -2151,17 +2151,54 @@ int wpa_driver_wext_set_mode(void *priv, int mode) - { - struct wpa_driver_wext_data *drv = priv; - struct iwreq iwr; -- int ret = 0; -+ int ret = -1, flags; -+ unsigned int new_mode = mode ? IW_MODE_ADHOC : IW_MODE_INFRA; - - os_memset(&iwr, 0, sizeof(iwr)); - os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); -- iwr.u.mode = mode ? IW_MODE_ADHOC : IW_MODE_INFRA; -+ iwr.u.mode = new_mode; -+ if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) == 0) { -+ ret = 0; -+ goto done; -+ } - -- if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) < 0) { -+ if (errno != EBUSY) { - perror("ioctl[SIOCSIWMODE]"); -- ret = -1; -+ goto done; -+ } -+ -+ /* mac80211 doesn't allow mode changes while the device is up, so if -+ * the device isn't in the mode we're about to change to, take device -+ * down, try to set the mode again, and bring it back up. -+ */ -+ if (ioctl(drv->ioctl_sock, SIOCGIWMODE, &iwr) < 0) { -+ perror("ioctl[SIOCGIWMODE]"); -+ goto done; -+ } -+ -+ if (iwr.u.mode == new_mode) { -+ ret = 0; -+ goto done; -+ } -+ -+ if (wpa_driver_wext_get_ifflags(drv, &flags) == 0) { -+ (void) wpa_driver_wext_set_ifflags(drv, flags & ~IFF_UP); -+ -+ /* Try to set the mode again while the interface is down */ -+ iwr.u.mode = new_mode; -+ if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) < 0) -+ perror("ioctl[SIOCSIWMODE]"); -+ else -+ ret = 0; -+ -+ /* Ignore return value of get_ifflags to ensure that the device -+ * is always up like it was before this function was called. -+ */ -+ (void) wpa_driver_wext_get_ifflags(drv, &flags); -+ (void) wpa_driver_wext_set_ifflags(drv, flags | IFF_UP); - } - -+done: - return ret; - } - diff --git a/wpa_supplicant-0.6.3-wpa-gui-fixes.patch b/wpa_supplicant-0.6.3-wpa-gui-fixes.patch deleted file mode 100644 index ddd4d07..0000000 --- a/wpa_supplicant-0.6.3-wpa-gui-fixes.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/networkconfig.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/networkconfig.ui.h ---- wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/networkconfig.ui.h.atoi 2006-12-09 19:38:48.000000000 -0500 -+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/networkconfig.ui.h 2008-02-22 11:51:28.000000000 -0500 -@@ -10,6 +10,7 @@ - ** destructor. - *****************************************************************************/ - -+#include - - enum { - AUTH_NONE = 0, -diff -up wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpagui.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/wpagui.ui.h ---- wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpagui.ui.h.atoi 2008-02-22 14:39:19.000000000 -0500 -+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpagui.ui.h 2008-02-22 14:39:31.000000000 -0500 -@@ -16,6 +16,7 @@ - #include - #endif - -+#include - - void WpaGui::init() - { -diff -up wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/userdatarequest.ui.h.atoi wpa_supplicant-0.5.7/wpa_gui/userdatarequest.ui.h ---- wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/userdatarequest.ui.h.atoi 2008-02-22 14:38:32.000000000 -0500 -+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/userdatarequest.ui.h 2008-02-22 14:38:56.000000000 -0500 -@@ -10,6 +10,8 @@ - ** destructor. - *****************************************************************************/ - -+#include -+ - int UserDataRequest::setParams(WpaGui *_wpagui, const char *reqMsg) - { - char *tmp, *pos, *pos2; -diff -up wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpamsg.h.fix wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpamsg.h ---- wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpamsg.h.fix 2008-03-03 11:58:18.000000000 -0500 -+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_gui/wpamsg.h 2008-03-03 11:58:33.000000000 -0500 -@@ -14,6 +14,7 @@ typedef QValueList WpaMsgList; - - class WpaMsg { - public: -+ WpaMsg() {} - WpaMsg(const QString &_msg, int _priority = 2) - : msg(_msg), priority(_priority) - { diff --git a/wpa_supplicant-assoc-timeout.patch b/wpa_supplicant-assoc-timeout.patch index 43baf71..a0f76af 100644 --- a/wpa_supplicant-assoc-timeout.patch +++ b/wpa_supplicant-assoc-timeout.patch @@ -1,14 +1,16 @@ ---- wpa_supplicant-0.6.3/wpa_supplicant/wpa_supplicant.c.timeout 2006-03-03 22:26:13.000000000 -0500 -+++ wpa_supplicant-0.6.3/wpa_supplicant/wpa_supplicant.c 2006-03-03 22:26:45.000000000 -0500 -@@ -1252,9 +1252,9 @@ - /* Timeout for IEEE 802.11 authentication and association */ - int timeout; - if (assoc_failed) -- timeout = 5; -+ timeout = 15; - else if (wpa_s->conf->ap_scan == 1) -- timeout = 10; -+ timeout = 20; - else - timeout = 60; +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 + + if (assoc_failed) { + /* give IBSS a bit more time */ +- timeout = ssid->mode ? 10 : 5; ++ timeout = ssid->mode ? 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; + } wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0); + } diff --git a/wpa_supplicant.config b/wpa_supplicant.config index ede8864..7b83012 100644 --- a/wpa_supplicant.config +++ b/wpa_supplicant.config @@ -1,12 +1,12 @@ CONFIG_CTRL_IFACE=y CONFIG_CTRL_IFACE_DBUS=y -CONFIG_DRIVER_HOSTAP=y +//CONFIG_DRIVER_HOSTAP=y //CONFIG_DRIVER_HERMES=y -CONFIG_DRIVER_MADWIFI=y +//CONFIG_DRIVER_MADWIFI=y CONFIG_DRIVER_ATMEL=y CONFIG_DRIVER_WEXT=y CONFIG_DRIVER_NDISWRAPPER=y -CONFIG_DRIVER_PRISM54=y +//CONFIG_DRIVER_PRISM54=y CONFIG_DRIVER_WIRED=y //CONFIG_DRIVER_BROADCOM=y //CONFIG_DRIVER_IPW=y diff --git a/wpa_supplicant.spec b/wpa_supplicant.spec index 77c0293..41c53d8 100644 --- a/wpa_supplicant.spec +++ b/wpa_supplicant.spec @@ -1,8 +1,8 @@ Summary: WPA/WPA2/IEEE 802.1X Supplicant Name: wpa_supplicant Epoch: 1 -Version: 0.6.3 -Release: 6%{?dist} +Version: 0.6.4 +Release: 1%{?dist} License: BSD Group: System Environment/Base Source0: http://hostap.epitest.fi/releases/%{name}-%{version}.tar.gz @@ -10,19 +10,13 @@ Source1: %{name}.config Source2: %{name}.conf Source3: %{name}.init.d Source4: %{name}.sysconfig -Source5: madwifi-headers-r1475.tar.bz2 Source6: %{name}.logrotate Patch0: wpa_supplicant-assoc-timeout.patch -Patch1: wpa_supplicant-0.6.3-wpa-gui-fixes.patch -Patch2: wpa_supplicant-0.5.7-qmake-location.patch -Patch3: wpa_supplicant-0.5.7-flush-debug-output.patch -Patch4: wpa_supplicant-0.5.7-use-IW_ENCODE_TEMP.patch -Patch5: wpa_supplicant-0.5.10-dbus-service-file.patch -Patch6: wpa_supplicant-0.6.3-fix-dbus-use-after-free.patch -Patch7: wpa_supplicant-0.6.3-wext-dont-overwrite-BSS-frequency.patch -Patch8: wpa_supplicant-0.6.3-dont-reschedule-specific-scans.patch -Patch9: wpa_supplicant-0.6.3-wext-handle-mac80211-mode-switches.patch +Patch1: wpa_supplicant-0.5.7-qmake-location.patch +Patch2: wpa_supplicant-0.5.7-flush-debug-output.patch +Patch3: wpa_supplicant-0.5.7-use-IW_ENCODE_TEMP.patch +Patch4: wpa_supplicant-0.5.10-dbus-service-file.patch URL: http://w1.fi/wpa_supplicant/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -51,21 +45,12 @@ Graphical User Interface for wpa_supplicant written using QT3 %prep %setup -q %patch0 -p1 -b .assoc-timeout -%patch1 -p1 -b .wpa-gui-fixes -%patch2 -p1 -b .qmake-location -%patch3 -p1 -b .flush-debug-output -%patch4 -p1 -b .use-IW_ENCODE_TEMP -%patch5 -p1 -b .dbus-service-file -%patch6 -p1 -b .use-after-free -%patch7 -p1 -b .bss-freq -%patch8 -p1 -b .ssid-scans -%patch9 -p1 -b .mac80211-mode +%patch1 -p1 -b .qmake-location +%patch2 -p1 -b .flush-debug-output +%patch3 -p1 -b .use-IW_ENCODE_TEMP +%patch4 -p1 -b .dbus-service-file %build -pushd src - tar -xjf %{SOURCE5} -popd - pushd wpa_supplicant cp %{SOURCE1} ./.config CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; @@ -153,6 +138,11 @@ fi %{_bindir}/wpa_gui %changelog +* Wed Aug 27 2008 Dan Williams - 1:0.6.4-1 +- Update to 0.6.4 +- Remove 'hostap', 'madwifi', and 'prism54' drivers; use standard 'wext' instead +- Drop upstreamed patches + * Tue Jun 10 2008 Dan Williams - 1:0.6.3-6 - Fix 802.11a frequency bug - Always schedule specific SSID scans to help find hidden APs