- Increase association timeout, mainly for drivers that don't fully support

WPA ioctls yet
This commit is contained in:
Daniel Williams 2006-03-04 07:24:19 +00:00
parent f2743777dd
commit 60981ed2d0
3 changed files with 133 additions and 1 deletions

View File

@ -0,0 +1,14 @@
--- wpa_supplicant-0.4.8/wpa_supplicant.c.timeout 2006-03-03 22:26:13.000000000 -0500
+++ wpa_supplicant-0.4.8/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 = 15;
else
timeout = 60;
wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0);

View File

@ -0,0 +1,110 @@
--- wpa_supplicant-0.4.8/driver_wext.c.debug 2006-03-03 22:57:59.000000000 -0500
+++ wpa_supplicant-0.4.8/driver_wext.c 2006-03-03 22:58:41.000000000 -0500
@@ -1612,20 +1612,32 @@
*/
if (drv->auth_alg_fallback &&
wpa_driver_wext_auth_alg_fallback(drv, params) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because auth_alg_fallback failed", __FUNCTION__);
ret = -1;
+}
if (!params->bssid &&
wpa_driver_wext_set_bssid(drv, NULL) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_bssid failed", __FUNCTION__);
ret = -1;
+}
if (wpa_driver_wext_set_mode(drv, params->mode) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_mode failed", __FUNCTION__);
ret = -1;
+}
/* TODO: should consider getting wpa version and cipher/key_mgmt suites
* from configuration, not from here, where only the selected suite is
* available */
if (wpa_driver_wext_set_gen_ie(drv, params->wpa_ie, params->wpa_ie_len)
< 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_gen_ie failed", __FUNCTION__);
ret = -1;
+}
if (params->wpa_ie == NULL || params->wpa_ie_len == 0)
value = IW_AUTH_WPA_VERSION_DISABLED;
else if (params->wpa_ie[0] == RSN_INFO_ELEM)
@@ -1634,23 +1646,38 @@
value = IW_AUTH_WPA_VERSION_WPA;
if (wpa_driver_wext_set_auth_param(drv,
IW_AUTH_WPA_VERSION, value) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_auth_param(WPA_VERSION) failed", __FUNCTION__);
ret = -1;
+}
value = wpa_driver_wext_cipher2wext(params->pairwise_suite);
if (wpa_driver_wext_set_auth_param(drv,
IW_AUTH_CIPHER_PAIRWISE, value) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_auth_param(CIPHER_PAIRWISE) failed", __FUNCTION__);
ret = -1;
+}
value = wpa_driver_wext_cipher2wext(params->group_suite);
if (wpa_driver_wext_set_auth_param(drv,
IW_AUTH_CIPHER_GROUP, value) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_auth_param(CIPHER_GROUP) failed", __FUNCTION__);
ret = -1;
+}
value = wpa_driver_wext_keymgmt2wext(params->key_mgmt_suite);
if (wpa_driver_wext_set_auth_param(drv,
IW_AUTH_KEY_MGMT, value) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_auth_param(KEY_MGMT) failed", __FUNCTION__);
ret = -1;
+}
value = params->key_mgmt_suite != KEY_MGMT_NONE;
if (wpa_driver_wext_set_auth_param(drv,
IW_AUTH_PRIVACY_INVOKED, value) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_auth_param(PRIVACY_INVOKED) failed", __FUNCTION__);
ret = -1;
+}
/* Allow unencrypted EAPOL messages even if pairwise keys are set when
* not using WPA. IEEE 802.1X specifies that these frames are not
@@ -1664,14 +1691,26 @@
if (wpa_driver_wext_set_auth_param(drv,
IW_AUTH_RX_UNENCRYPTED_EAPOL,
allow_unencrypted_eapol) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_auth_param(RX_UNENCRYPTED_EAPOL) failed", __FUNCTION__);
ret = -1;
+}
if (params->freq && wpa_driver_wext_set_freq(drv, params->freq) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_freq failed", __FUNCTION__);
ret = -1;
+}
if (wpa_driver_wext_set_ssid(drv, params->ssid, params->ssid_len) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_ssid failed", __FUNCTION__);
ret = -1;
+}
if (params->bssid &&
wpa_driver_wext_set_bssid(drv, params->bssid) < 0)
+{
+wpa_printf(MSG_DEBUG, "%s: assoc failed because set_bssid2 failed", __FUNCTION__);
ret = -1;
+}
return ret;
}
@@ -1696,6 +1735,8 @@
res = wpa_driver_wext_set_auth_param(drv, IW_AUTH_80211_AUTH_ALG,
algs);
drv->auth_alg_fallback = res == -2;
+if (res == -2)
+wpa_printf(MSG_DEBUG, "%s: falling back to ENCODE for AUTH", __FUNCTION__);
return res;
}

View File

@ -2,7 +2,7 @@ Summary: WPA/WPA2/IEEE 802.1X Supplicant
Name: wpa_supplicant
Epoch: 1
Version: 0.4.8
Release: 4
Release: 5
License: GPL
Group: System Environment/Base
Source0: http://hostap.epitest.fi/releases/%{name}-%{version}.tar.gz
@ -14,6 +14,8 @@ Source5: madwifi-headers.tar.bz2
Patch0: wpa_supplicant-auth-fallback-v4.patch
Patch1: wpa_supplicant-ctrl-iface-ap-scan.patch
Patch2: wpa_supplicant-ctrl-iface-hide-keys.patch
Patch3: wpa_supplicant-assoc-timeout.patch
Patch4: wpa_supplicant-driver-wext-debug.patch
URL: http://hostap.epitest.fi/wpa_supplicant/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -42,6 +44,8 @@ Graphical User Interface for wpa_supplicant written using QT3
%patch0 -p0 -b .we-auth-fallback
%patch1 -p1 -b .ap-scan
%patch2 -p1 -b .ctrl-iface-hide-keys
%patch3 -p1 -b .assoc-timeout
%patch4 -p1 -b .driver-wext-debug
%build
cp %{SOURCE1} ./.config
@ -119,6 +123,10 @@ fi
%{_bindir}/wpa_gui
%changelog
* Fri Mar 3 2006 Dan Williams <dcbw@redhat.com> - 0.4.8-5
- Increase association timeout, mainly for drivers that don't
fully support WPA ioctls yet
* Fri Mar 3 2006 Dan Williams <dcbw@redhat.com> - 0.4.8-4
- Add additional BuildRequires #rh181914#
- Add prereq on chkconfig #rh182905# #rh182906#