From: Jouni Malinen Date: Wed, 22 Feb 2023 15:07:07 +0000 (+0200) Subject: DPP: Allow both STA and AP configObject to be set X-Git-Tag: hostap_2_11~1270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f63aca7b13be34ad759d3ffdf708874c8de1f8b;p=thirdparty%2Fhostap.git 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 --- 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; }