Parcourir la source

DPP: Do not process dpp_auth_ok_on_ack multiple times

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>
Jouni Malinen il y a 7 ans
Parent
commit
d3cb7ebe1b
2 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. 3 1
      src/ap/dpp_hostapd.c
  2. 3 0
      wpa_supplicant/dpp_supplicant.c

+ 3 - 1
src/ap/dpp_hostapd.c

@@ -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);
+	}
 }
 
 

+ 3 - 0
wpa_supplicant/dpp_supplicant.c

@@ -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;
 }