iwinfo: adjust for changed wpa_supplicant control socket path
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 10 May 2014 15:31:49 +0000 (15:31 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 10 May 2014 15:31:49 +0000 (15:31 +0000)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 40747

package/network/utils/iwinfo/Makefile
package/network/utils/iwinfo/src/iwinfo_nl80211.c

index 9bebb7a61983f23b7a55bf2b947abb7d639c894b..699682b95e97df36a597ed5a2b348a1261a4e0ce 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2013 Jo-Philipp Wich <xm@subsignal.org>
+# Copyright (C) 2010-2014 Jo-Philipp Wich <xm@subsignal.org>
 #
 # This is free software, licensed under the GPL 2 license.
 #
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=47
+PKG_RELEASE:=48
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 PKG_CONFIG_DEPENDS := \
index a258d2f2b208e722f4503e1bb479e55873d9ad1d..854be6bbf8f91c41ada60238ae9a424a2e987f1e 100644 (file)
@@ -526,7 +526,13 @@ static char * nl80211_wpactl_info(const char *ifname, const char *cmd,
                goto out;
 
        if (connect(sock, (struct sockaddr *) &remote, remote_length))
-               goto out;
+       {
+               remote_length = sizeof(remote.sun_family) + sprintf(remote.sun_path,
+                       "/var/run/wpa_supplicant/%s", ifname);
+
+               if (connect(sock, (struct sockaddr *) &remote, remote_length))
+                       goto out;
+       }
 
        local.sun_family = AF_UNIX;
        local_length = sizeof(local.sun_family) +