]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Do not process dpp_auth_ok_on_ack multiple times
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 27 Nov 2017 18:20:26 +0000 (20:20 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 27 Nov 2017 18:20:26 +0000 (20:20 +0200)
An additional TX status callback could result in processing the DPP
authentication completion another time at least with hostapd. Fix this
by clearing the dpp_auth_ok_on_ack when processing it.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/dpp_hostapd.c
wpa_supplicant/dpp_supplicant.c

index 8654ee9be7ef4b2f092da163dc7d1e568abbeb0c..e1d798e7d986a3b9154d3f0e2d302761245b48c6 100644 (file)
@@ -300,8 +300,10 @@ void hostapd_dpp_tx_status(struct hostapd_data *hapd, const u8 *dst,
                return;
        }
 
-       if (hapd->dpp_auth_ok_on_ack)
+       if (hapd->dpp_auth_ok_on_ack) {
+               hapd->dpp_auth_ok_on_ack = 0;
                hostapd_dpp_auth_success(hapd, 1);
+       }
 }
 
 
index 05fe0c84d44168f38db44d26c2b4dd40071ecea5..693d3853c0b28b1e0d1d4808756931874de93211 100644 (file)
@@ -435,6 +435,9 @@ static void wpas_dpp_tx_status(struct wpa_supplicant *wpa_s,
                offchannel_send_action_done(wpa_s);
                wpas_dpp_listen_start(wpa_s, wpa_s->dpp_auth->neg_freq);
        }
+
+       if (wpa_s->dpp_auth_ok_on_ack)
+               wpa_s->dpp_auth_ok_on_ack = 0;
 }