[PATCH 1/1] P2P: when p2p_group_add fails, remove only deinit iface

Jouni Malinen j at w1.fi
Sat May 31 05:56:51 EDT 2014


On Wed, May 28, 2014 at 03:51:07PM -0400, Eduardo Abinader wrote:
> Upon p2p_group_add failure, deinit_iface should not exclude
> all p2p GO interfaces, but the uninitialized one.
> 
> This issue occurs mainly for autonomous groups.

> diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
> @@ -3777,7 +3777,7 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
>  	if (wpa_s == wpa_s->parent)
> -		wpas_p2p_group_remove(wpa_s, "*");
> +		wpas_p2p_group_remove(wpa_s, wpa_s->ifname);

Hmm.. This looks a bit odd. That wpa_s == wpa_s->parent condition would
indicate that there is no separate group interface in use and as such,
there cannot be multiple P2P group instances if this comes from
p2p_group_add failure. As such, removing all groups should remove just
the failing group in case this comes from p2p_group_add failure.

This wildcard is used here on purpose (see commit
e83e15ee771988c57b73cb4badf728aaf0943291) and it is needed to handle
removal of the parent interface in other cases where there are multiple
P2P group interfaces. 

Could you please share a debug log showing issues with this for
p2p_group_add failure?

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list