Package: wpasupplicant Version: 0.6.0~cvs20070224-3 Severity: normal Tags: patch
When ifup of the wireless interface after association fails, wpa-supplicant happily stays connected (which is useless with an unusable interface) instead of reassociating (having more luck next time or eventually choosing a different AP). The attached patch fixes this. The interesting case of ifup failure is when using the old dhcp-client or a dhcp3-client with #420784 fixed, that properly fail when unable to acquire a lease. I've been successfully using the latter with this patch for a while now. elmar -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: powerpc (ppc) Kernel: Linux 2.6.21 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages wpasupplicant depends on: ii adduser 3.102 Add and remove users and groups ii libc6 2.5-7 GNU C Library: Shared libraries ii libdbus-1-3 1.0.2-5 simple interprocess messaging syst ii libncurses5 5.5-5 Shared libraries for terminal hand ii libreadline5 5.2-2 GNU readline and history libraries ii libssl0.9.8 0.9.8e-5 SSL shared libraries ii lsb-base 3.1-23.1 Linux Standard Base 3.1 init scrip Versions of packages wpasupplicant recommends: ii dhcp3-client 3.0.4-14 DHCP Client -- no debconf information -- .'"`. /"\ | :' : Elmar Hoffmann <[EMAIL PROTECTED]> ASCII Ribbon Campaign \ / `. `' GPG key available via pgp.net against HTML email X `- & vCards / \
--- /etc/wpa_supplicant/functions.sh.dpkg-dist 2007-04-09 03:55:51.000000000 +0200 +++ /etc/wpa_supplicant/functions.sh 2007-04-21 16:33:14.000000000 +0200 @@ -803,12 +803,16 @@ else /sbin/ifup "$WPA_IFACE=$WPA_LOGICAL_IFACE" fi + if ! grep --quiet "^$WPA_IFACE=$WPA_LOGICAL_IFACE" "$IFSTATE_FILE"; then + return 1 + fi else echo "No network defined for \"$WPA_LOGICAL_IFACE\" in \"$INTERFACES_FILE\"" fi else echo "No suitable logical interface mapping for ifupdown to configure" fi + return 0 } ##################################################################### --- /sbin/wpa_action.dpkg-dist 2007-05-16 08:23:19.000000000 +0200 +++ /sbin/wpa_action 2007-04-21 22:48:11.000000000 +0200 @@ -43,7 +43,10 @@ wpa_log_action wpa_log_environment if ifupdown_check; then - ifup + if ! ifup; then + wpa_cli reassociate + exit 1 + fi fi wpa_hysteresis_event wpa_cli status
signature.asc
Description: Digital signature

