From: Jouni Malinen Date: Fri, 23 Jan 2026 15:21:50 +0000 (+0200) Subject: DPP: Add some more debug prints on GAS frame parsing errors X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7b962ef51337d79950ae6b72abbe03f1c9d1861;p=thirdparty%2Fhostap.git DPP: Add some more debug prints on GAS frame parsing errors These cases were referenced in a hwsim test case dpp_hostapd_enrollee_gas_proto, but hostapd did not actually print the matching strings into debug log. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/gas_query_ap.c b/src/ap/gas_query_ap.c index a471c793c..5629e2090 100644 --- a/src/ap/gas_query_ap.c +++ b/src/ap/gas_query_ap.c @@ -536,16 +536,24 @@ int gas_query_ap_rx(struct gas_query_ap *gas, const u8 *sa, u8 categ, } if (action == WLAN_PA_GAS_COMEBACK_RESP) { - if (pos + 1 > data + len) + if (pos + 1 > data + len) { + wpa_printf(MSG_DEBUG, + "GAS: No room for frag_id in the response from " + MACSTR, MAC2STR(sa)); return 0; + } frag_id = *pos & 0x7f; more_frags = (*pos & 0x80) >> 7; pos++; } /* Comeback Delay */ - if (pos + 2 > data + len) + if (pos + 2 > data + len) { + wpa_printf(MSG_DEBUG, + "GAS: No room for Comeback Delay in the response from " + MACSTR, MAC2STR(sa)); return 0; + } comeback_delay = WPA_GET_LE16(pos); if (comeback_delay > GAS_QUERY_MAX_COMEBACK_DELAY) comeback_delay = GAS_QUERY_MAX_COMEBACK_DELAY;