commit fc61e5fe46c0e830f688c51ff0aba7f9990eaa5a
parent 94afeabc18b705602dee67134300e43237d92463
Author: James Prestwood <prestwoj@gmail.com>
Date: Tue, 11 Jan 2022 16:55:53 -0800
dpp: rework order of operations after being configured
Now the result is sent immediately. Prior a connect attempt or
scan could have started, potentially losing this frame. In addition
the offchannel operation is cancelled after sending the result
which will allow the subsequent connect or scan to happen much
faster since it doesn't have to wait for ROC to expire.
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/dpp.c b/src/dpp.c
@@ -639,6 +639,11 @@ static void dpp_handle_config_response_frame(const struct mmpdu_header *frame,
}
dpp_write_config(config, network);
+ dpp_configuration_free(config);
+
+ send_config_result(dpp, dpp->auth_addr);
+
+ offchannel_cancel(dpp->wdev_id, dpp->offchannel_id);
if (network && bss)
__station_connect_network(station, network, bss);
@@ -647,15 +652,10 @@ static void dpp_handle_config_response_frame(const struct mmpdu_header *frame,
dpp_scan_triggered,
dpp_scan_results, dpp,
dpp_scan_destroy);
- if (!dpp->connect_scan_id)
- goto scan_failed;
+ if (dpp->connect_scan_id)
+ return;
}
- dpp_configuration_free(config);
-
- send_config_result(dpp, dpp->auth_addr);
-
-scan_failed:
dpp_reset(dpp);
}