DPP2: Comeback delay response for certificate in over TCP case

Send out the GAS Initial Response with comeback delay when Configurator
is operating over TCP.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-06-18 13:03:29 +03:00 committed by Jouni Malinen
parent 0f9463d6ee
commit a352c7230d

View File

@ -1023,6 +1023,30 @@ static int dpp_controller_rx_gas_req(struct dpp_connection *conn, const u8 *msg,
return -1;
resp = dpp_conf_req_rx(auth, pos, slen);
if (!resp && auth->waiting_cert) {
wpa_printf(MSG_DEBUG, "DPP: Certificate not yet ready");
buf = wpabuf_alloc(4 + 18);
if (!buf)
return -1;
wpabuf_put_be32(buf, 18);
wpabuf_put_u8(buf, WLAN_PA_GAS_INITIAL_RESP);
wpabuf_put_u8(buf, dialog_token);
wpabuf_put_le16(buf, WLAN_STATUS_SUCCESS);
wpabuf_put_le16(buf, 500); /* GAS Comeback Delay */
dpp_write_adv_proto(buf);
wpabuf_put_le16(buf, 0); /* Query Response Length */
/* Send Config Response over TCP */
wpa_hexdump_buf(MSG_MSGDUMP, "DPP: Outgoing TCP message", buf);
wpabuf_free(conn->msg_out);
conn->msg_out_pos = 0;
conn->msg_out = buf;
dpp_tcp_send(conn);
return 0;
}
if (!resp)
return -1;