[PATCH 11/11] P2PS: Save correctly WPS prov. info and intended address on PD req
Andrei Otcheretianski
andrei.otc
Tue Jul 28 01:29:52 PDT 2015
On Sun, Jul 26, 2015 at 9:29 PM, Jouni Malinen <j at w1.fi> wrote:
> On Mon, Jul 13, 2015 at 09:49:17AM +0300, Ilan Peer wrote:
>> When PD request is answered with a success status, WPS provisioning info and
>> intended address (if provided) should be stored for this peer.
>> This wasn't done for the case when P2PS method is used, which potentially
>> resulted in a redundant legacy PD flow with this peer.
>> Fix this by saving all the required info if the status is SUCCESS.
>
>> diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
>> @@ -831,8 +831,9 @@ out:
>> msg.capability ? msg.capability[1] :
>> 0,
>> msg.group_id, msg.group_id_len);
>> + }
>
> This if block starts with following conditions:
> if (reject == P2P_SC_SUCCESS && p2p->cfg->prov_disc_req) {
>
>> - if (dev) {
>> + if (dev && reject == P2P_SC_SUCCESS) {
>
> In practice, this looks identical to the previous case since the
> p2p->cfg->prov_disc_req callback function is always set.
>
>> switch (config_methods) {
>> case WPS_CONFIG_DISPLAY:
>> dev->wps_prov_info = WPS_CONFIG_KEYPAD;
>> @@ -854,7 +855,6 @@ out:
>> if (msg.intended_addr)
>> os_memcpy(dev->interface_addr,
>> msg.intended_addr, ETH_ALEN);
>> - }
>> }
>
> I don't see this changing anything in the behavior.. Am I missing
> something here?
This "if" is changed in "[PATCH 01/11] P2PS: Fix PD PIN event notifications".
Since this patch comes to fix an issue introduced in the same patch
series, it makes more sense to squash them.
We will send a fixed version.
Andrei
>
> --
> 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