[PATCH] Capture group ifname before switching to global p2p instance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The P2P DBus interface is using the wrong interface name when calling 
wpas_p2p_invite_group(). Capture the group interface name before calling the method.

Signed-off-by: Hicham Hassoubi <Hicham_hassoubi@xxxxxxxx>
---
 wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index 565ced0fd..18ca7c130 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -776,7 +776,8 @@ DBusMessage * wpas_dbus_handler_p2p_invite(DBusMessage *message,
        if (parse_peer_object_path(peer_object_path, peer_addr) < 0 ||
            !p2p_peer_known(wpa_s->global->p2p, peer_addr))
                goto err;
-
+       /* Capture the intrefcae name for the group first */
+       const char* group_ifname = wpa_s->ifname;
        wpa_s = wpa_s->global->p2p_init_wpa_s;

        if (persistent) {
@@ -821,7 +822,7 @@ DBusMessage * wpas_dbus_handler_p2p_invite(DBusMessage *message,
                /*
                 * No group ID means propose to a peer to join my active group
                 */
-               if (wpas_p2p_invite_group(wpa_s, wpa_s->ifname,
+               if (wpas_p2p_invite_group(wpa_s, group_ifname,
                                          peer_addr, NULL, false)) {
                        reply = wpas_dbus_error_unknown_error(
                                message, "Failed to join to an active group");
-- 
2.17.1

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux