[PATCH 10/11] P2PS: Consider WPS P2PS method when joining a group

Andrei Otcheretianski andrei.otc at gmail.com
Tue Jul 28 08:03:10 EDT 2015

On Mon, Jul 27, 2015 at 12:46 AM, Jouni Malinen <j at w1.fi> wrote:
> On Mon, Jul 13, 2015 at 09:49:16AM +0300, Ilan Peer wrote:
>> If P2PS PD concludes to use default P2PS method wpas_p2p_scan_res_join()
>> ignores this value and tries to perform a redundant legacy PD.
>> Fix this by considering WPS_P2PS method too.
>> diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
>> @@ -4503,6 +4503,9 @@ static void wpas_p2p_scan_res_join(struct wpa_supplicant *wpa_s,
>>               case WPS_PBC:
>>                       method = WPS_CONFIG_PUSHBUTTON;
>>                       break;
>> +             case WPS_P2PS:
>> +                     method = WPS_CONFIG_P2PS;
>> +                     break;
>>               default:
>>                       method = 0;
>>                       break;
> This seems to break PD-prior-to-join. The GO is rejecting such a PD
> Request due to mismatching WPS config methods and it looks like the P2PS
> case does not allow the P2P Client side to continue the join operation
> even though at least the legacy P2P design clearly stated that the
> client can continue even if the PD Response does not having matching WPS
> config methods listed.

In P2PS flow the client joins the GO after the PD is completed. So, if
this is a normal P2PS flow we expect to enter the subsequent "if
((p2p_get_provis..." and skip the redundant PD before join.
If we join using p2ps method without performing p2ps pd before, a
legacy PD will be issued and is expected to fail since WPS_CONFIG_P2PS
method isn't allowed in legacy PD.

> It looks like at least with p2ps_connect_p2ps_method_2 test case the PD
> Request for this prior-to-join case does not include msg.adv_id and
> because of that, there is no match in p2p_process_prov_disc_req().
> How is this supposed to work? Is msg.adv_id really needed for
> join-a-group and if so, why does it not get added here? And if not,
> should p2p_process_prov_disc_req() add WPS_CONFIG_P2PS into
> allowed_config_methods in  some additional cases?

msg.adv_id means that this is a P2PS PD and not a legacy one. You
shouldn't see legacy PD during p2ps tests.
This is one of the things that this patch series tries to fix.
Maybe you didn't apply patch 11?

> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap

More information about the HostAP mailing list