[pkg-wpa-devel] Bug#545766: wpasupplicant: wpa-roam doesnt work w/ physical logical interface map; wpa_action produced "already configured" error.

Paul Donohue DebianBugs at Linux.TopQuark.net
Fri Feb 19 17:00:21 UTC 2016


Tags: patch

A patch for this issue is attached.  Basically, the existing `grep ^$WPA_IFACE=$WPA_IFACE" "$IFSTATE_FILE"` line is replaced with `/sbin/ifquery "$WPA_IFACE" | grep -q '^wpa-roam: '`.

In addition to fixing the reported physical=logical interface issue above, this patch also ensures that wpa-roam works with the recent ifstate file changes made in ifupdown, and future-proofs the code against future changes to the ifstate file behavior in ifupdown.

This patch was originally posted at https://bugs.launchpad.net/ubuntu/+source/wpa/+bug/1545363 which is a duplicate of this bug.
-------------- next part --------------
Index: debian/ifupdown/functions.sh
===================================================================
--- debian/ifupdown/functions.sh	(revision 1965)
+++ debian/ifupdown/functions.sh	(working copy)
@@ -890,7 +890,6 @@
 #
 ifup () {
 	local INTERFACES_FILE
-	local IFSTATE_FILE
 	local IFUP_RETVAL
 	local WPA_LOGICAL_IFACE
 
@@ -901,16 +900,6 @@
 		return 1
 	fi
 
-	if [ -e /etc/network/run/ifstate ]; then
-		# debian's ifupdown
-		IFSTATE_FILE="/etc/network/run/ifstate"
-	elif [ -e /run/network/ifstate ]; then
-		# ubuntu's
-		IFSTATE_FILE="/run/network/ifstate"
-	else
-		unset IFSTATE_FILE
-	fi
-	
 	if [ -z "$IF_WPA_MAPPING_SCRIPT_PRIORITY" ] && [ -n "$WPA_ID_STR" ]; then
 		WPA_LOGICAL_IFACE="$WPA_ID_STR"
 	fi
@@ -953,7 +942,7 @@
 
 		ifupdown_lock
 
-		if [ -n "$IFSTATE_FILE" ] && grep -q "^$WPA_IFACE=$WPA_IFACE" "$IFSTATE_FILE"; then
+		if /sbin/ifquery "$WPA_IFACE" | grep -q '^wpa-roam: ' ; then
 			# Force settings over the unconfigured "master" IFACE
 			/sbin/ifup -v --force "$WPA_IFACE=$WPA_LOGICAL_IFACE"
 		else


More information about the Pkg-wpa-devel mailing list