P2P: Do not update peer Listen channel based on PD/Invitation
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 26 Apr 2012 13:11:17 +0000 (16:11 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 26 Apr 2012 13:11:17 +0000 (16:11 +0300)
commitc98b83f2d3f8b9ad435c75f386829105f9837baa
treefbb8f37eb6d573f45033a70e30f7759d402e5f27
parent7c4e92115a795dd2ee2135cf49d7e9e172fb5851
P2P: Do not update peer Listen channel based on PD/Invitation

Commits 17bef1e97a5061a8b5443dc24166e28439911f0b and
ffe98dfb88a19b66418184955ef272789e3abb68 started using p2p_add_device()
with other frames than just Probe Response frames from scan results.
However, these changes did not take into account that the PD Request
and Invitation Request frames are normally received on the our own
Listen channel, not on the Listen channel of the peer. As such, these
frames must not be used to update Listen channel information for the
peer.

Fix this by letting p2p_add_device() know whether the results are from
scan results and if not, skip the peer table updates that are specific
to Probe Response frames.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
src/p2p/p2p.c
src/p2p/p2p_i.h
src/p2p/p2p_invitation.c
src/p2p/p2p_pd.c