[PATCH] P2P: Fix Ctrl interfance for parsing of command p2p_connect

Shah, Nirav J2 nirav.j2.shah at intel.com
Fri May 4 19:30:56 EDT 2012


I think I might have made a mistake here. my patch breaks normal p2p group formation. So don't accept this version of this patch. 

The reason I did this is I am trying to figure out how p2p_invite works for non persistent groups.

I was trying to do "p2p_connect <go_peer> join auth" to pre-authorize a peer to invite this instance to a group (non-persistent).

But I looked at this 

	/* <addr> <"pbc" | "pin" | PIN> [label|display|keypad] [persistent]
	 * [join] [auth] [go_intent=<0..15>] [freq=<in MHz>] */


and I realized that command is not accepted because p2p_connect expects <"pbc" | "pin" | PIN>

Does p2p_connect need wps authentication. If so how should I be doing this?

Thanks,
Nirav.

-----Original Message-----
From: Shah, Nirav J2 
Sent: Friday, May 04, 2012 3:30 PM
To: hostap at lists.shmoo.com
Cc: Shah, Nirav J2
Subject: [PATCH] P2P: Fix Ctrl interfance for parsing of command p2p_connect

The ctrl interface does not recognize the command following peer
address as it moves past a ' '(space) which it looks for later on
in os_strstr.

Signed-hostap: Nirav Shah <nirav.j2.shah at intel.com>
intended-for: hostap-1
---
 wpa_supplicant/ctrl_iface.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 538f8df..00f3614 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2800,7 +2800,6 @@ static int p2p_ctrl_connect(struct wpa_supplicant *wpa_s, char *cmd,
 	pos = cmd + 17;
 	if (*pos != ' ')
 		return -1;
-	pos++;
 
 	persistent_group = os_strstr(pos, " persistent") != NULL;
 	pos2 = os_strstr(pos, " persistent=");
-- 
1.7.5.4



More information about the HostAP mailing list