DPP2: Presence Announcement processing in AP/Relay

Process the received Presence Announcement frames in AP/Relay. If a
matching bootstrapping entry for the peer is found in a local
Configurator, that Configurator is used. Otherwise, the frame is relayed
to the first configured Controller (if available).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-03-27 19:16:42 +02:00 committed by Jouni Malinen
parent 06dd32903d
commit db1ef82538
2 changed files with 78 additions and 2 deletions

View file

@ -11327,7 +11327,8 @@ int dpp_relay_rx_action(struct dpp_global *dpp, const u8 *src, const u8 *hdr,
* continue that session (send this over TCP) and return 0.
*/
if (type != DPP_PA_PEER_DISCOVERY_REQ &&
type != DPP_PA_PEER_DISCOVERY_RESP) {
type != DPP_PA_PEER_DISCOVERY_RESP &&
type != DPP_PA_PRESENCE_ANNOUNCEMENT) {
dl_list_for_each(ctrl, &dpp->controllers,
struct dpp_relay_controller, list) {
dl_list_for_each(conn, &ctrl->conn,
@ -11342,7 +11343,14 @@ int dpp_relay_rx_action(struct dpp_global *dpp, const u8 *src, const u8 *hdr,
if (!r_bootstrap)
return -1;
ctrl = dpp_relay_controller_get(dpp, r_bootstrap);
if (type == DPP_PA_PRESENCE_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 {
ctrl = dpp_relay_controller_get(dpp, r_bootstrap);
}
if (!ctrl)
return -1;