diff options
| author | Jouni Malinen <jouni@qca.qualcomm.com> | 2014-10-21 12:16:47 +0300 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2014-11-04 08:24:45 -0700 |
| commit | dad4d8aec0303abfe19d63baf9a318886ac8c4f7 (patch) | |
| tree | 75622254c240c72bdab89056bf453a37555459fd | |
| parent | 933a5b3936f3b5c45739f7ee87abf15621457a30 (diff) | |
| download | android_external_wpa_supplicant_8-dad4d8aec0303abfe19d63baf9a318886ac8c4f7.tar.gz android_external_wpa_supplicant_8-dad4d8aec0303abfe19d63baf9a318886ac8c4f7.tar.bz2 android_external_wpa_supplicant_8-dad4d8aec0303abfe19d63baf9a318886ac8c4f7.zip | |
GAS: Do not reply to P2P SD query from generic GAS/ANQP server
This avoids an issue where a wpa_supplicant build with CONFIG_P2P=y and
CONFIG_HS20=y ended up processing a P2P SD query twice when operating as
a GO and sending out two replies. Only the P2P SD implementation should
reply to P2P SD query in such a case.
CRs-fixed: 746126
Git-commit: a6b1215769ce9bb9f33ba5c59d4926773e9b99a8
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: I4060642288a58fede3113223a15f1094702ff983
| -rw-r--r-- | src/ap/gas_serv.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c index ad07107d..e16c1070 100644 --- a/src/ap/gas_serv.c +++ b/src/ap/gas_serv.c @@ -748,6 +748,7 @@ struct anqp_query_info { size_t home_realm_query_len; const u8 *icon_name; size_t icon_name_len; + int p2p_sd; }; @@ -919,6 +920,21 @@ static void rx_anqp_vendor_specific(struct hostapd_data *hapd, return; } +#ifdef CONFIG_P2P + if (*pos == P2P_OUI_TYPE) { + /* + * This is for P2P SD and will be taken care of by the P2P + * implementation. This query needs to be ignored in the generic + * GAS server to avoid duplicated response. + */ + wpa_printf(MSG_DEBUG, + "ANQP: Ignore WFA vendor type %u (P2P SD) in generic GAS server", + *pos); + qi->p2p_sd = 1; + return; + } +#endif /* CONFIG_P2P */ + if (*pos != HS20_ANQP_OUI_TYPE) { wpa_printf(MSG_DEBUG, "ANQP: Unsupported WFA vendor type %u", *pos); @@ -969,6 +985,14 @@ static void gas_serv_req_local_processing(struct hostapd_data *hapd, buf); if (!buf) return; +#ifdef CONFIG_P2P + if (wpabuf_len(buf) == 0 && qi->p2p_sd) { + wpa_printf(MSG_DEBUG, + "ANQP: Do not send response to P2P SD from generic GAS service (P2P SD implementation will process this)"); + wpabuf_free(buf); + return; + } +#endif /* CONFIG_P2P */ if (wpabuf_len(buf) > hapd->gas_frag_limit || hapd->conf->gas_comeback_delay) { |
