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 <jouni@codeaurora.org>
This commit is contained in:
parent
3b4f7dfaa1
commit
6dcb8aaf13
2 changed files with 10 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue