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

Jouni Malinen j at w1.fi
Sun Jul 26 17:46:56 EDT 2015

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:
>  			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.

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?

Jouni Malinen                                            PGP id EFC895FA

More information about the HostAP mailing list