[pkg-wpa-devel] r1401 - in /wpasupplicant/trunk/debian: README.Debian changelog config/linux patches/12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch patches/13_deauthenticate_fixup.patch patches/14_start_and_finish_with_clean_slate.patch patches/series

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Wed Jun 3 07:06:57 UTC 2009


Author: kelmo-guest
Date: Wed Jun  3 07:06:57 2009
New Revision: 1401

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1401
Log:
* Backport a series of WEXT driver wrapper enhancements from upstream
  development tree. See each patch's header for more details.
  - 12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch
  - 13_deauthenticate_fixup.patch
  - 14_start_and_finish_with_clean_slate.patch
* Disable building of atmel driver backend, neither atmel_{cs,pci},
  nor at76c50x-usb ever used it and atmelwlandriver is not in Debian
  and has been abandoned upstream in 2005. Thanks to Stefan Lippers-
  Hollmann for doing the research.

Added:
    wpasupplicant/trunk/debian/patches/12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch
    wpasupplicant/trunk/debian/patches/13_deauthenticate_fixup.patch
    wpasupplicant/trunk/debian/patches/14_start_and_finish_with_clean_slate.patch
Modified:
    wpasupplicant/trunk/debian/README.Debian
    wpasupplicant/trunk/debian/changelog
    wpasupplicant/trunk/debian/config/linux
    wpasupplicant/trunk/debian/patches/series

Modified: wpasupplicant/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/README.Debian?rev=1401&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/README.Debian (original)
+++ wpasupplicant/trunk/debian/README.Debian Wed Jun  3 07:06:57 2009
@@ -49,7 +49,6 @@
 
 Driver         Description
 ======         ===========
-atmel          ATMEL AT76C5XXx (USB, PCMCIA)
 nl80211        Linux 802.11 netlink interface
 wext           Linux wireless extensions (generic)
 wired          wired Ethernet driver

Modified: wpasupplicant/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/changelog?rev=1401&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/changelog (original)
+++ wpasupplicant/trunk/debian/changelog Wed Jun  3 07:06:57 2009
@@ -1,3 +1,17 @@
+wpasupplicant (0.6.9-4) unstable; urgency=low
+
+  * Backport a series of WEXT driver wrapper enhancements from upstream
+    development tree. See each patch's header for more details.
+    - 12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch
+    - 13_deauthenticate_fixup.patch
+    - 14_start_and_finish_with_clean_slate.patch
+  * Disable building of atmel driver backend, neither atmel_{cs,pci},
+    nor at76c50x-usb ever used it and atmelwlandriver is not in Debian
+    and has been abandoned upstream in 2005. Thanks to Stefan Lippers-
+    Hollmann for doing the research.
+
+ -- Kel Modderman <kel at otaku42.de>  Wed, 03 Jun 2009 17:06:23 +1000
+
 wpasupplicant (0.6.9-3) unstable; urgency=low
 
   * Drop debian/patches/12_syslog_supplement.patch. It adds code which

Modified: wpasupplicant/trunk/debian/config/linux
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/config/linux?rev=1401&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/config/linux (original)
+++ wpasupplicant/trunk/debian/config/linux Wed Jun  3 07:06:57 2009
@@ -27,7 +27,10 @@
 #CONFIG_DRIVER_NDISWRAPPER=y
 
 # Driver interface for Atmel driver
-CONFIG_DRIVER_ATMEL=y
+# XXX: atmelwlandriver hasn't been updated since 2005 and is not in Debian
+#      atmel_{cs,pci} supports wext only
+#      at76c50x-usb still lacks WPA support (2.6.30), but will use wext/nl80211
+#CONFIG_DRIVER_ATMEL=y
 
 # Driver interface for old Broadcom driver
 # Please note that the newer Broadcom driver ("hybrid Linux driver") supports

Added: wpasupplicant/trunk/debian/patches/12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch?rev=1401&op=file
==============================================================================
--- wpasupplicant/trunk/debian/patches/12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch (added)
+++ wpasupplicant/trunk/debian/patches/12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch Wed Jun  3 07:06:57 2009
@@ -1,0 +1,60 @@
+From: Dan Williams <dcbw at redhat.com>
+Date: Wed, 27 May 2009 17:55:15 +0000 (+0300)
+Subject: wext: don't force-disconnect in ad-hoc mode
+X-Git-Url: http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=64a04447c3d2248ab1aac7f6c220346dad0e1921
+
+wext: don't force-disconnect in ad-hoc mode
+
+Otherwise the driver might interpret the request as a request to
+create/join a new adhoc network with the bogus SSID.
+
+Signed-off-by: Dan Williams <dcbw at redhat.com>
+---
+
+--- a/src/drivers/driver_wext.c
++++ b/src/drivers/driver_wext.c
+@@ -1914,21 +1914,36 @@ 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;
+ 
+ 	/*
+-	 * 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;
++	}
++
++	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);
++		for (i = 0; i < 32; i++)
++			ssid[i] = rand() & 0xFF;
++		wpa_driver_wext_set_ssid(drv, ssid, 32);
++	}
+ }
+ 
+ 

Added: wpasupplicant/trunk/debian/patches/13_deauthenticate_fixup.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/13_deauthenticate_fixup.patch?rev=1401&op=file
==============================================================================
--- wpasupplicant/trunk/debian/patches/13_deauthenticate_fixup.patch (added)
+++ wpasupplicant/trunk/debian/patches/13_deauthenticate_fixup.patch Wed Jun  3 07:06:57 2009
@@ -1,0 +1,26 @@
+From: Dan Williams <dcbw at redhat.com>
+Date: Wed, 27 May 2009 17:57:29 +0000 (+0300)
+Subject: wext: Fix deauthentication to do IW_MLME_DEAUTH prior to disconnect
+X-Git-Url: http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=87d01acfeb69f797bffae09b2c7f22e7c928998f
+
+wext: Fix deauthentication to do IW_MLME_DEAUTH prior to disconnect
+
+4853d5ac847efbfe54b80eeefabc2932696414c9 had a small bug in the order
+of these function calls in _wext_deauthenticate() (_disassociate()
+did have the correct order). The deauthentication frame is supposed
+to go out (if driver supports that) before we disconnect more
+forcefully.
+---
+
+--- a/src/drivers/driver_wext.c
++++ b/src/drivers/driver_wext.c
+@@ -1953,8 +1953,8 @@ static int wpa_driver_wext_deauthenticat
+ 	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;
+ }
+ 

Added: wpasupplicant/trunk/debian/patches/14_start_and_finish_with_clean_slate.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/14_start_and_finish_with_clean_slate.patch?rev=1401&op=file
==============================================================================
--- wpasupplicant/trunk/debian/patches/14_start_and_finish_with_clean_slate.patch (added)
+++ wpasupplicant/trunk/debian/patches/14_start_and_finish_with_clean_slate.patch Wed Jun  3 07:06:57 2009
@@ -1,0 +1,48 @@
+From: Dan Williams <dcbw at redhat.com>
+Date: Wed, 27 May 2009 18:01:26 +0000 (+0300)
+Subject: wext: disconnect at init and deinit
+X-Git-Url: http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=2976121955ba0e2f52c09fbffc93f91dbf0d845b
+
+wext: disconnect at init and deinit
+
+To ensure the supplicant starts and ends with a clean slate (keys are
+already cleaned up at init and deinit time), force a null BSSID and
+bogus SSID to ensure the driver isn't connected to anything.
+
+Signed-off-by: Dan Williams <dcbw at redhat.com>
+---
+
+--- a/src/drivers/driver_wext.c
++++ b/src/drivers/driver_wext.c
+@@ -35,6 +35,7 @@
+ static int wpa_driver_wext_flush_pmkid(void *priv);
+ static int wpa_driver_wext_get_range(void *priv);
+ static int 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,
+@@ -994,6 +995,13 @@ static int wpa_driver_wext_finish_drv_in
+ 
+ 	wpa_driver_wext_get_range(drv);
+ 
++	/*
++	 * Unlock the driver's BSSID and force to a random SSID to 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) {
+@@ -1035,8 +1043,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);
+ 

Modified: wpasupplicant/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/series?rev=1401&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/patches/series (original)
+++ wpasupplicant/trunk/debian/patches/series Wed Jun  3 07:06:57 2009
@@ -5,3 +5,6 @@
 07_dbus_service_syslog.patch
 10_multi_driver.patch
 11_syslog.patch
+12_wpa_supplicant_dont_force_disconnect_in_adhoc_mode.patch
+13_deauthenticate_fixup.patch
+14_start_and_finish_with_clean_slate.patch




More information about the Pkg-wpa-devel mailing list