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

Eduardo Abinader eduardo.abinader at openbossa.org
Wed Jun 4 08:03:58 EDT 2014


Hi Jouni,

On Sat, May 31, 2014 at 5:56 AM, Jouni Malinen <j at w1.fi> wrote:
> 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?

Here the logs for p2p_group_add failure: http://pastebin.com/U28azbKu

I have called p2p_group_add 4 times:
1) p2p_group_add --> Adds a p2p_go intf
2) p2p_group_add --> Remove all (even the previous one)
3) p2p_group_add --> Add a p2p_go intf
4) p2p_group_add --> Remove all (even the previous one)


Thanks.
>
> --
> Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list