]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Remove dpp-listen radio work when stopping
authorChenming Huang <quic_chenhuan@quicinc.com>
Mon, 13 Dec 2021 07:57:58 +0000 (15:57 +0800)
committerJouni Malinen <j@w1.fi>
Mon, 20 Dec 2021 22:09:28 +0000 (00:09 +0200)
The radio work starting may be delayed. If the DPP listen operation is
stopped before the radio work starts, the pending dpp-listen radio work
won't get cleaned up, which might lead to failing to start the next DPP
listen operation.

Issue scenario: DPP start -> dpp-listen radio work added but not started
-> DPP stop, pending radio work not cleaned up -> radio work start ->
trying to start DPP but failing because a dpp-listen work already
exists.

This commit removes the potential pending dpp-listen radio
work when DPP stops.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wpa_supplicant/dpp_supplicant.c

index 4378546d04aa54daf285d667d3d976ea04f737c5..584654a6cb2c99d445aa3ca236de579cce8daf63 100644 (file)
@@ -1021,6 +1021,7 @@ void wpas_dpp_listen_stop(struct wpa_supplicant *wpa_s)
        wpa_drv_dpp_listen(wpa_s, false);
        wpa_s->dpp_listen_freq = 0;
        wpas_dpp_listen_work_done(wpa_s);
+       radio_remove_works(wpa_s, "dpp-listen", 0);
 }