[pkg-wpa-devel] Bug#853293: wpasupplicant: Consider all `ifupdown' configuration, not only /etc/network/interfaces

Jan-Benedict Glaw jbglaw at lug-owl.de
Tue Jan 31 09:06:47 UTC 2017


Package: wpasupplicant
Version: 2.6-3

Hi!

I again got trapped by /etc/wpa_supplicant/functions.sh only looking
at the /etc/network/interfaces file. However, common configurations
contain an include statement for ie. /etc/network/interfaces.d/* .

  How about not doing the parsing here, but just query properties of
the given interface? If that works, there's a matching "iface" stanca.

Please consider this patch:


--- functions.sh~orig	2017-01-31 09:57:40.567896381 +0100
+++ functions.sh	2017-01-31 10:00:38.463890021 +0100
@@ -931,10 +931,8 @@
 	fi
 
 	if [ -n "$WPA_LOGICAL_IFACE" ]; then
-		if egrep -q "^iface[[:space:]]+${WPA_LOGICAL_IFACE}[[:space:]]+inet" "$INTERFACES_FILE"; then
-			: # logical network is defined
-		else
-			wpa_msg log "network settings not defined for $WPA_LOGICAL_IFACE in $INTERFACES_FILE"
+		if ! /sbin/ifquery "${WPA_LOGICAL_IFACE}" > /dev/null 2/&1; then
+			wpa_msg log "network settings not defined for $WPA_LOGICAL_IFACE in $INTERFACES_FILE and included files."
 			WPA_LOGICAL_IFACE="default"
 		fi
 

Thanks,
  Jan-Benedict
-- 
      Jan-Benedict Glaw      jbglaw at lug-owl.de              +49-172-7608481
 Signature of:                            If it doesn't work, force it.
 the second  :                   If it breaks, it needed replacing anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-wpa-devel/attachments/20170131/4c845f73/attachment.sig>


More information about the Pkg-wpa-devel mailing list