[PATCH] For P2P_EVENT_PROV_DISC_SHOW_PIN, store the generated PIN.

Jouni Malinen j at w1.fi
Mon Nov 21 11:34:56 EST 2011


On Mon, Nov 21, 2011 at 02:08:06AM -0800, Jithu Jance wrote:
> If p2p_connect join is issued with pin display option, the p2p_connect context generates a pin and stores it. In addition to this PIN, 
> Provision discovery response also generates another PIN which is different from the original PIN. This patch avoids generating a new
> pin, if the PIN is already set. If PIN is not present, then it uses the newly generated pin and stores it.

The generated PIN here is available just to make it easier for an UI to
to generate a new PIN, i.e., it was not really designed to be the only
PIN that could be used in the P2P connection. I'm not completely sure I
understand what you are trying to achieve with this patch. Could you
please give some more details on the sequence of commands in which this
stored (or remembered?) PIN would be used? Provision discovery would be
used prior to the p2p_connect command and p2p_connect overrided
wpa_s->p2p_pin anyway..

In addition, this change would result in different PIN getting passed in
the ctrl_iface event and D-Bus event
(wpas_notify_p2p_provision_discovery call at the end of
wpas_prov_disc_req). This does not sound correct.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list