From: Jouni Malinen Date: Mon, 11 May 2020 13:02:51 +0000 (+0300) Subject: DPP2: Reconfig Announcement relaying from AP to Controller X-Git-Tag: hostap_2_10~1340 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6dcb8aaf13f0b15334c31554ce8034fb58d81c04;p=thirdparty%2Fhostap.git DPP2: Reconfig Announcement relaying from AP to Controller Recognize the Reconfig Announcement message type and handle it similarly to the Presence Announcement in the Relay, i.e., send it to the first Controller if the local Configurator does not have matching C-sign-key. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c index f7d286747..548e8856e 100644 --- a/src/ap/dpp_hostapd.c +++ b/src/ap/dpp_hostapd.c @@ -1258,6 +1258,10 @@ hostapd_dpp_rx_reconfig_announcement(struct hostapd_data *hapd, const u8 *src, conf = dpp_configurator_find_kid(hapd->iface->interfaces->dpp, csign_hash); if (!conf) { + if (dpp_relay_rx_action(hapd->iface->interfaces->dpp, + src, hdr, buf, len, freq, NULL, + NULL) == 0) + return; wpa_printf(MSG_DEBUG, "DPP: No matching Configurator information found"); return; diff --git a/src/common/dpp_tcp.c b/src/common/dpp_tcp.c index 5a824943d..bfac377bb 100644 --- a/src/common/dpp_tcp.c +++ b/src/common/dpp_tcp.c @@ -448,7 +448,8 @@ int dpp_relay_rx_action(struct dpp_global *dpp, const u8 *src, const u8 *hdr, */ if (type != DPP_PA_PEER_DISCOVERY_REQ && type != DPP_PA_PEER_DISCOVERY_RESP && - type != DPP_PA_PRESENCE_ANNOUNCEMENT) { + type != DPP_PA_PRESENCE_ANNOUNCEMENT && + type != DPP_PA_RECONFIG_ANNOUNCEMENT) { dl_list_for_each(ctrl, &dpp->controllers, struct dpp_relay_controller, list) { dl_list_for_each(conn, &ctrl->conn, @@ -460,15 +461,15 @@ int dpp_relay_rx_action(struct dpp_global *dpp, const u8 *src, const u8 *hdr, } } - if (!r_bootstrap) - return -1; - - if (type == DPP_PA_PRESENCE_ANNOUNCEMENT) { + if (type == DPP_PA_PRESENCE_ANNOUNCEMENT || + type == DPP_PA_RECONFIG_ANNOUNCEMENT) { /* TODO: Could send this to all configured Controllers. For now, * only the first Controller is supported. */ ctrl = dl_list_first(&dpp->controllers, struct dpp_relay_controller, list); } else { + if (!r_bootstrap) + return -1; ctrl = dpp_relay_controller_get(dpp, r_bootstrap); } if (!ctrl)