aboutsummaryrefslogtreecommitdiff
path: root/src/common/dpp.c
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2019-12-04 15:49:43 -0800
committerHai Shalom <haishalom@google.com>2019-12-17 16:48:04 -0800
commit0676811be5ab5ef5c8f2b81bff8e0bb956fc7570 (patch)
treed826e62b850166d56182dd19a0349eae735c2e81 /src/common/dpp.c
parent115730a4a71190c2a3b619c3ca40f9e33e64eb9c (diff)
downloadwpa_supplicant_8-0676811be5ab5ef5c8f2b81bff8e0bb956fc7570.tar.gz
[DPP R2] Added support for DPP R2 events
Added support for DPP R2 events that provide additional details about the onboarding process of a remote enrollee. Specifically, DPP R2 configurator waits for response from the enrollee, which reports back the SSID, tried channels and band support in case it cannot find the AP. When it reports success, then it means that it is acutally connected. Bug: 139381558 Test: Manual tests with DPP R1 and R2 enrollees Test: atest DppManagerTest Test: act.py -c ../WifiDppConfig.json -tc WifiDppTest Change-Id: I0eba7fcca016ebbdbbd1bd5b44f02837fd982466
Diffstat (limited to 'src/common/dpp.c')
-rw-r--r--src/common/dpp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/dpp.c b/src/common/dpp.c
index ab7072cf..44cb9100 100644
--- a/src/common/dpp.c
+++ b/src/common/dpp.c
@@ -5298,17 +5298,23 @@ dpp_conf_req_rx(struct dpp_authentication *auth, const u8 *attr_start,
wpa_printf(MSG_DEBUG, "DPP: mudurl = '%s'", token->string);
token = json_get_member(root, "bandSupport");
+ auth->band_list_size = 0;
if (token && token->type == JSON_ARRAY) {
+ memset(auth->band_list, 0, sizeof(auth->band_list));
wpa_printf(MSG_DEBUG, "DPP: bandSupport");
token = token->child;
while (token) {
- if (token->type != JSON_NUMBER)
+ if (token->type != JSON_NUMBER) {
wpa_printf(MSG_DEBUG,
"DPP: Invalid bandSupport array member type");
- else
+ } else {
+ if (auth->band_list_size < DPP_MAX_CHANNELS) {
+ auth->band_list[auth->band_list_size++] = token->number;
+ }
wpa_printf(MSG_DEBUG,
"DPP: Supported global operating class: %d",
token->number);
+ }
token = token->sibling;
}
}