aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-03-27 17:16:42 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-27 18:05:25 (GMT)
commitdb1ef82538f1d00a2e4a35b50ea508cf22a18aa9 (patch)
tree7072d152f45eccd3d1c5e170964be791a07ebbc5 /src/common
parent06dd32903d95339c93b4eea5db2e12d2281da255 (diff)
downloadhostap-db1ef82538f1d00a2e4a35b50ea508cf22a18aa9.zip
hostap-db1ef82538f1d00a2e4a35b50ea508cf22a18aa9.tar.gz
hostap-db1ef82538f1d00a2e4a35b50ea508cf22a18aa9.tar.bz2
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>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/dpp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common/dpp.c b/src/common/dpp.c
index c71a642..7b4825e 100644
--- a/src/common/dpp.c
+++ b/src/common/dpp.c
@@ -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;