[PATCHv2] DPP: prevent processing dpp action frames when stopped
Jouni Malinen
j at w1.fi
Sat Mar 6 11:17:16 GMT 2021
On Wed, Mar 03, 2021 at 10:26:05AM +0000, Michal Kazior wrote:
> diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
> @@ -706,6 +706,7 @@ int hostapd_dpp_listen(struct hostapd_data *hapd, const char *cmd)
>
> void hostapd_dpp_listen_stop(struct hostapd_data *hapd)
> {
> + hapd->dpp_allowed_roles = 0;
> hostapd_drv_dpp_listen(hapd, false);
> /* TODO: Stop listen operation on non-operating channel */
> }
This breaks chirping mode since hostapd_dpp_chirp_next() calls
hostapd_dpp_listen_stop() in the middle of the iteration. I don't think
this approach in hostapd_dpp_listen_stop() changing dpp_allowed_roles is
going to be acceptable.
I'm not sure I fully understood your use case, but please note that the
DPP_STOP_LISTEN command is also calling hostapd_dpp_stop(). Would that
function be more appropriate place for clearing dpp_allowed_roles? Or
well, I'm not sure clearing dpp_allowed_roles is really the correct
thing to do to address this issue, i.e., it might be safer to provide a
different variable for tracking whether there should be any action
taken based on received DPP Action frames.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list