aboutsummaryrefslogtreecommitdiff
path: root/src/common/dpp.c
diff options
context:
space:
mode:
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;
}
}