From: Avrahams Stern <avraham.stern@xxxxxxxxx> Receiving a provision discovery request for an ASP service that has auto accept set to false should result in a provision discovery response with the status field set to "currently unavailable". Having stale P2PS provision data, results in sending a response with the status set to success because it is mistakenly referred to as the follow-on provision discovery request. Fix that by clearing stale P2PS provision data in the following cases: 1. When provision discovery is complete 2. When ASP services are flushed (in which case old ASP provisioning is no longer valid). Signed-off-by: Avrahams Stern <avraham.stern@xxxxxxxxx> --- src/p2p/p2p.c | 1 + src/p2p/p2p_pd.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index cdf6d99..cd2fba3 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -2822,6 +2822,7 @@ void p2p_service_flush_asp(struct p2p_data *p2p) } p2p->p2ps_adv_list = NULL; + p2ps_prov_free(p2p); p2p_dbg(p2p, "All ASP advertisements flushed"); } diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c index 54b2ab4..3994ec0 100644 --- a/src/p2p/p2p_pd.c +++ b/src/p2p/p2p_pd.c @@ -1163,6 +1163,9 @@ out: msg.group_id, msg.group_id_len); } + if (reject != P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE) + p2ps_prov_free(p2p); + if (reject == P2P_SC_SUCCESS) { switch (config_methods) { case WPS_CONFIG_DISPLAY: -- 1.9.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap