DPP: Add config response status value to DPP-CONF-SENT

This can be helpful for upper layers to be able to determine whether the
configuration was rejected.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-07-29 18:55:37 +03:00 committed by Jouni Malinen
parent 10104915af
commit 89de431f23
3 changed files with 19 additions and 10 deletions

View file

@ -1583,7 +1583,8 @@ static void hostapd_dpp_rx_conf_result(struct hostapd_data *hapd, const u8 *src,
if (status == DPP_STATUS_OK && auth->send_conn_status) {
wpa_msg(hapd->msg_ctx, MSG_INFO,
DPP_EVENT_CONF_SENT "wait_conn_status=1");
DPP_EVENT_CONF_SENT "wait_conn_status=1 conf_status=%d",
auth->conf_resp_status);
wpa_printf(MSG_DEBUG, "DPP: Wait for Connection Status Result");
eloop_cancel_timeout(hostapd_dpp_config_result_wait_timeout,
hapd, NULL);
@ -1599,7 +1600,8 @@ static void hostapd_dpp_rx_conf_result(struct hostapd_data *hapd, const u8 *src,
hostapd_drv_send_action_cancel_wait(hapd);
hostapd_dpp_listen_stop(hapd);
if (status == DPP_STATUS_OK)
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT);
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT
"conf_status=%d", auth->conf_resp_status);
else
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_FAILED);
dpp_auth_deinit(auth);
@ -3142,7 +3144,8 @@ void hostapd_dpp_gas_status_handler(struct hostapd_data *hapd, int ok)
hostapd_drv_send_action_cancel_wait(hapd);
if (ok)
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT);
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT
"conf_status=%d", auth->conf_resp_status);
else
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_FAILED);
dpp_auth_deinit(hapd->dpp_auth);

View file

@ -248,7 +248,8 @@ static void dpp_controller_gas_done(struct dpp_connection *conn)
return;
}
wpa_msg(conn->msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT);
wpa_msg(conn->msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT "conf_status=%d",
auth->conf_resp_status);
dpp_connection_remove(conn);
}
@ -880,8 +881,9 @@ static int dpp_controller_rx_conf_result(struct dpp_connection *conn,
status = dpp_conf_result_rx(auth, hdr, buf, len);
if (status == DPP_STATUS_OK && auth->send_conn_status) {
wpa_msg(msg_ctx, MSG_INFO,
DPP_EVENT_CONF_SENT "wait_conn_status=1");
wpa_msg(msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT
"wait_conn_status=1 conf_resp_status=%d",
auth->conf_resp_status);
wpa_printf(MSG_DEBUG, "DPP: Wait for Connection Status Result");
auth->waiting_conn_status_result = 1;
eloop_cancel_timeout(
@ -893,7 +895,8 @@ static int dpp_controller_rx_conf_result(struct dpp_connection *conn,
return 0;
}
if (status == DPP_STATUS_OK)
wpa_msg(msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT);
wpa_msg(msg_ctx, MSG_INFO, DPP_EVENT_CONF_SENT
"conf_resp_status=%d", auth->conf_resp_status);
else
wpa_msg(msg_ctx, MSG_INFO, DPP_EVENT_CONF_FAILED);
return -1; /* to remove the completed connection */

View file

@ -2124,7 +2124,8 @@ static void wpas_dpp_rx_conf_result(struct wpa_supplicant *wpa_s, const u8 *src,
int freq;
wpa_msg(wpa_s, MSG_INFO,
DPP_EVENT_CONF_SENT "wait_conn_status=1");
DPP_EVENT_CONF_SENT "wait_conn_status=1 conf_status=%d",
auth->conf_resp_status);
wpa_printf(MSG_DEBUG, "DPP: Wait for Connection Status Result");
eloop_cancel_timeout(wpas_dpp_config_result_wait_timeout,
wpa_s, NULL);
@ -2144,7 +2145,8 @@ static void wpas_dpp_rx_conf_result(struct wpa_supplicant *wpa_s, const u8 *src,
offchannel_send_action_done(wpa_s);
wpas_dpp_listen_stop(wpa_s);
if (status == DPP_STATUS_OK)
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_SENT);
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_SENT "conf_status=%d",
auth->conf_resp_status);
else
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_FAILED);
dpp_auth_deinit(auth);
@ -4194,7 +4196,8 @@ wpas_dpp_gas_status_handler(void *ctx, struct wpabuf *resp, int ok)
offchannel_send_action_done(wpa_s);
wpas_dpp_listen_stop(wpa_s);
if (ok)
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_SENT);
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_SENT "conf_status=%d",
auth->conf_resp_status);
else
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_FAILED);
dpp_auth_deinit(wpa_s->dpp_auth);