diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c index 6e44bdadf..aaeb94c2f 100644 --- a/src/ap/dpp_hostapd.c +++ b/src/ap/dpp_hostapd.c @@ -915,7 +915,8 @@ static void hostapd_dpp_gas_resp_cb(void *ctx, const u8 *addr, u8 dialog_token, wpa_printf(MSG_DEBUG, "DPP: No matching exchange in progress"); return; } - if (!resp || status_code != WLAN_STATUS_SUCCESS) { + if (result != GAS_QUERY_AP_SUCCESS || + !resp || status_code != WLAN_STATUS_SUCCESS) { wpa_printf(MSG_DEBUG, "DPP: GAS query did not succeed"); goto fail; }