]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Allow both STA and AP configObject to be set
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 22 Feb 2023 15:07:07 +0000 (17:07 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 22 Feb 2023 15:07:07 +0000 (17:07 +0200)
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 <quic_jouni@quicinc.com>
src/common/dpp.c

index 9d3d306da55c20600ea7422aab5b2852a387c94b..3b9f35e8dfeb3b0e46b7cf735257090ff1e17583 100644 (file)
@@ -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;
        }