From 6f63aca7b13be34ad759d3ffdf708874c8de1f8b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 22 Feb 2023 17:07:07 +0200 Subject: [PATCH] DPP: Allow both STA and AP configObject to be set Extend @CONF-OBJ-SEP@ behavior to allow the second entry to be used for different netRole. In other words, allow both the AP and STA netRole (though, only a single one per netRole) configuration to be set. Signed-off-by: Jouni Malinen --- src/common/dpp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/dpp.c b/src/common/dpp.c index 9d3d306da..3b9f35e8d 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -1310,8 +1310,14 @@ static int dpp_configuration_parse_helper(struct dpp_authentication *auth, auth->conf_sta = conf_sta; auth->conf_ap = conf_ap; } else if (idx == 1) { - auth->conf2_sta = conf_sta; - auth->conf2_ap = conf_ap; + if (!auth->conf_sta) + auth->conf_sta = conf_sta; + else + auth->conf2_sta = conf_sta; + if (!auth->conf_ap) + auth->conf_ap = conf_ap; + else + auth->conf2_ap = conf_ap; } else { goto fail; } -- 2.47.3