[pkg-wpa-devel] [wpa] 01/01: Fix #833402.
Andrew Shadura
andrewsh at debian.org
Thu Aug 4 08:21:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
andrewsh pushed a commit to branch master
in repository wpa.
commit e6f57b44b6e6cbc2e4493d2783b3235b0768afe2
Author: Andrew Shadura <andrewsh at debian.org>
Date: Thu Aug 4 11:18:05 2016 +0300
Fix #833402.
---
debian/changelog | 7 ++++
...monitor_to_attach_if_no_control_interface.patch | 26 +++++++++++++
...linux_iface_up_for_a_dedicated_p2p_device.patch | 43 ++++++++++++++++++++++
debian/patches/series | 3 ++
..._wait_for_monitor_on_p2p_device_interface.patch | 28 ++++++++++++++
5 files changed, 107 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 0156cd4..33f9764 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+wpa (2.5-2) unstable; urgency=medium
+
+ * Apply patches from upstream to unbreak dedicated P2P Device support
+ (hopefully closes: #833402).
+
+ -- Andrew Shadura <andrewsh at debian.org> Thu, 04 Aug 2016 11:17:37 +0300
+
wpa (2.5-1) unstable; urgency=medium
[ Stefan Lippers-Hollmann ]
diff --git a/debian/patches/do_not_wait_for_monitor_to_attach_if_no_control_interface.patch b/debian/patches/do_not_wait_for_monitor_to_attach_if_no_control_interface.patch
new file mode 100644
index 0000000..9e44b4b
--- /dev/null
+++ b/debian/patches/do_not_wait_for_monitor_to_attach_if_no_control_interface.patch
@@ -0,0 +1,26 @@
+From 1c94570f1b4d12d5fdcfe072b4b2f2042e8268f0 Mon Sep 17 00:00:00 2001
+From: Ilan Peer <ilan.peer at intel.com>
+Date: Sun, 27 Dec 2015 16:25:06 +0200
+Subject: Do not wait for monitor to attach if no control interface
+
+In case an interface has started without a control interface
+initialized, skip waiting for monitor to attach at the start of
+wpa_supplicant (-W).
+
+Signed-off-by: Ilan Peer <ilan.peer at intel.com>
+---
+ wpa_supplicant/ctrl_iface_unix.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/wpa_supplicant/ctrl_iface_unix.c
++++ b/wpa_supplicant/ctrl_iface_unix.c
+@@ -848,6 +848,9 @@
+ struct sockaddr_un from;
+ socklen_t fromlen = sizeof(from);
+
++ if (priv->sock == -1)
++ return;
++
+ for (;;) {
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE - %s - wait for monitor to "
+ "attach", priv->wpa_s->ifname);
diff --git a/debian/patches/nl80211_dont_call_linux_iface_up_for_a_dedicated_p2p_device.patch b/debian/patches/nl80211_dont_call_linux_iface_up_for_a_dedicated_p2p_device.patch
new file mode 100644
index 0000000..efdec05
--- /dev/null
+++ b/debian/patches/nl80211_dont_call_linux_iface_up_for_a_dedicated_p2p_device.patch
@@ -0,0 +1,43 @@
+From ef3866ab016e8ff58c2adbfb1ec673a7f7e1dfd8 Mon Sep 17 00:00:00 2001
+From: Ilan Peer <ilan.peer at intel.com>
+Date: Sun, 27 Dec 2015 14:36:11 +0200
+Subject: nl80211: Don't call linux_iface_up() for a dedicated P2P Device
+
+As a dedicated P2P Device interface does not have a network
+interface associated with it, trying to call linux_iface_up()
+on it would always fail so this call can be skipped for
+such an interface.
+
+Getting interface nlmode can be done only after bss->wdev_id is
+set, so move this call to wpa_driver_nl80211_finish_drv_init(),
+and do it only in case the nlmode != NL80211_IFTYPE_P2P_DEVICE.
+
+Signed-off-by: Ilan Peer <ilan.peer at intel.com>
+---
+ src/drivers/driver_nl80211.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -1681,9 +1681,6 @@
+ os_free(rcfg);
+ }
+
+- if (linux_iface_up(drv->global->ioctl_sock, ifname) > 0)
+- drv->start_iface_up = 1;
+-
+ if (wpa_driver_nl80211_finish_drv_init(drv, set_addr, 1, driver_params))
+ goto failed;
+
+@@ -2186,6 +2183,11 @@
+ if (!bss->if_dynamic && nl80211_get_ifmode(bss) == NL80211_IFTYPE_AP)
+ bss->static_ap = 1;
+
++ if (first &&
++ nl80211_get_ifmode(bss) != NL80211_IFTYPE_P2P_DEVICE &&
++ linux_iface_up(drv->global->ioctl_sock, bss->ifname) > 0)
++ drv->start_iface_up = 1;
++
+ if (wpa_driver_nl80211_capa(drv))
+ return -1;
+
diff --git a/debian/patches/series b/debian/patches/series
index a803bda..3c9ca88 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,6 @@ wpa_supplicant_fix-dependency-odering-when-invoked-with-dbus.patch
2016-1/0004-Reject-SET_CRED-commands-with-newline-characters-in-.patch
2016-1/0005-Reject-SET-commands-with-newline-characters-in-the-s.patch
openssl-initialise-pkcs-11.patch
+nl80211_dont_call_linux_iface_up_for_a_dedicated_p2p_device.patch
+do_not_wait_for_monitor_to_attach_if_no_control_interface.patch
+wpa_supplicant_do_not_wait_for_monitor_on_p2p_device_interface.patch
diff --git a/debian/patches/wpa_supplicant_do_not_wait_for_monitor_on_p2p_device_interface.patch b/debian/patches/wpa_supplicant_do_not_wait_for_monitor_on_p2p_device_interface.patch
new file mode 100644
index 0000000..ec0e444
--- /dev/null
+++ b/debian/patches/wpa_supplicant_do_not_wait_for_monitor_on_p2p_device_interface.patch
@@ -0,0 +1,28 @@
+From ede7770180f6ad27f1cade7ed0cf782e39400e79 Mon Sep 17 00:00:00 2001
+From: Ilan Peer <ilan.peer at intel.com>
+Date: Sun, 27 Dec 2015 16:25:07 +0200
+Subject: wpa_supplicant: Do not wait for monitor on P2P Device interface
+
+External programs are not aware of the creation of a
+dedicated P2P Device interface, so it does not make sense
+to wait for a monitor to connect on such an interface.
+
+Fix this by not waiting on a dedicated P2P Device interface
+for monitor to attach.
+
+Signed-off-by: Ilan Peer <ilan.peer at intel.com>
+---
+ wpa_supplicant/wpa_supplicant.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -4944,7 +4944,7 @@
+
+ if (global->params.wait_for_monitor) {
+ for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next)
+- if (wpa_s->ctrl_iface)
++ if (wpa_s->ctrl_iface && !wpa_s->p2p_mgmt)
+ wpa_supplicant_ctrl_iface_wait(
+ wpa_s->ctrl_iface);
+ }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/wpa.git
More information about the Pkg-wpa-devel
mailing list