From 2e47ea22cc209bbd3d454e981c362a3b643b0c2e Mon Sep 17 00:00:00 2001 From: Shivani Baranwal Date: Wed, 21 Dec 2022 12:05:12 +0530 Subject: [PATCH] P2P: Fix handling Service Discovery Response received by GO device The received Service Discovery Response frame follows the ap_mgmt_rx() path in P2P GO mode. If gas_query_rx_frame() doesn't process the frame, call the Public Action frame callbacks if any are registered for further processing of the RX frame. Fixes: 9c2b8204e662 ("DPP: Integration for hostapd") Signed-off-by: Shivani Baranwal --- src/ap/ieee802_11.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index e53f0dcbe..8facad369 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -5330,10 +5330,10 @@ static int handle_action(struct hostapd_data *hapd, pos = &mgmt->u.action.u.public_action.action; end = ((const u8 *) mgmt) + len; - gas_query_ap_rx(hapd->gas, mgmt->sa, - mgmt->u.action.category, - pos, end - pos, freq); - return 1; + if (gas_query_ap_rx(hapd->gas, mgmt->sa, + mgmt->u.action.category, + pos, end - pos, freq) == 0) + return 1; } #endif /* CONFIG_DPP */ if (hapd->public_action_cb) {