wpas_p2p_group_delete: Removing STA connection in case of group formation failure

Krishna Chaitanya chaitanya.mgit at gmail.com
Mon Jun 15 15:07:27 EDT 2015

On Tue, Jun 16, 2015 at 12:11 AM, Jouni Malinen <j at w1.fi> wrote:
> On Mon, Jun 15, 2015 at 09:09:56PM +0530, Krishna Chaitanya wrote:
>> When we are doing concurrent p2p connection (STA + P2P-GO) using
>> dynamic interface, after some trails the GO-NEG fails which is causing
>> the STA connection to be deauthenticated.
>> The reason for GO-NEG fail is that "add_iface" is failing, so
>> "p2p_group_interface" is not set, but in
>> wpas_p2p_group_delete based on the below condition we are deleting the
>> STA managed interface.
> wpas_p2p_group_delete() should not be called on the non-P2P station
> interface..
>>         else if (wpa_s->p2p_group_interface == P2P_GROUP_INTERFACE_CLIENT ||
>>                  (ssid && ssid->mode == WPAS_MODE_INFRA)) {
>>                 wpa_s->reassociate = 0;
>>                 wpa_s->disconnected = 1;
>>                 gtype = "client";
>> Is there any reason for checking INFRA mode in p2p module?
> Yes, WPAS_MODE_INFRA is used for P2P Client as well as non-P2P station.
>> Snippet of logs is below:
> ...
> Thanks. I was able to reproduce this by forcing interface UP failing for
> the group interface. It looks like some of the calls in at least one of
> the error paths end up getting going through both p2p-wlan0-# and wlan0
> interface when handling this type of failure case. The pending
> p2p-wlan0-# instance gets removed properly, but wlan0 instance should
> not have tried to remove the pending P2P group since it was not on that
> instance in the first place. I'll figure out how to fix this.
Good to hear that you were able to repro, will await your fix.

More information about the HostAP mailing list