Subject: [PATCH] hostapd: Add testing option for association_response_status_code
Jouni Malinen
j at w1.fi
Sun Jan 25 10:27:58 PST 2026
On Mon, Oct 27, 2025 at 12:47:17PM +0000, Raga, Gopi wrote:
> From 654e923d8322da21fb1f925766711ff2ee1c0a6c Mon Sep 17 00:00:00 2001
> From: gopiraga <mailto:gopiraga at amazon.com>
That From: entry (i.e., source of author information for the commit)
does not look correct..
> This adds a new testing option to allow controlling the association
> response status code returned by hostapd for testing purposes.
>
> Signed-off-by: Gopi Raga <mailto:gopiraga at amazon.com>
Nor that email address..
> diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
> @@ -3402,6 +3402,11 @@ own_ip_addr=127.0.0.1
> +# Send Custom Status Code in Association Response
> +# Example association_response_status_code=15
> +#association_response_status_code=0
This feels quite strange item to configure as a fixed value for all
association frames. What kind of testing is this for? I would have
expected something more dynamic like specifying status code for the
following single (Re)Association Response frame using the control
interface would be more useful.
> diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
> @@ -6179,6 +6179,15 @@ static void handle_assoc(struct hostapd_data *hapd,
>
> +#ifdef CONFIG_TESTING_OPTIONS
> + if (hapd->conf->association_response_status_code >= 0) {
> + wpa_printf(MSG_INFO,
> + "TESTING: Overriding association response status code from %d to %d for STA " MACSTR,
> + resp, hapd->conf->association_response_status_code, MAC2STR(mgmt->sa));
> + resp = hapd->conf->association_response_status_code;
> + }
> +#endif /* CONFIG_TESTING_OPTIONS */
This was under CONFIG_TESTING_OPTIONS, but the other parts were not..
Those other ones should have been as well to be consistent.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list