[PATCH 14/17] P2P: when removing a P2P client start from current interface

Jouni Malinen j
Tue May 5 03:38:19 PDT 2015

On Tue, May 05, 2015 at 12:37:02PM +0300, Ilan Peer wrote:
> p2p_remove_client is called on the wpa_s interface used to manage
> the P2P Device operation. When removing a client, the iteration should
> be done over the ssid list in the current wpa_s interface and not the
> parent.

I don't think there is any requirement or expectation of the
P2P_REMOVE_CLIENT to be used on the interface that is used to manage P2P
Device operations and because of that, wpa_s->parent was used there to
find the persistent groups.

>  	/* Remove from any persistent group */
> -	for (s = wpa_s->parent->conf->ssid; s; s = s->next) {
> +	for (s = wpa_s->conf->ssid; s; s = s->next) {

I don't think this is correct. With the newer P2P Device concept, there
may be need to override wpa_s->parent in some cases with
wpa_s->parent->p2p_dev, but this function needs to continue to work with
the case of P2P_REMOVE_CLIENT being issued on a group interface.
Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list