Re: [PATCH] wifi: Detect invalid key with auth challenge failed

Christian Hewitt <[email protected]> Tue, 27 Jan 2026 17:56:19 +0400
Newsgroups dev.linux.lists.connman
Message-ID <[email protected]>
> On 15 Dec 2025, at 2:04=E2=80=AFpm, YAN Chao (BCSC/EPA2, Smart Home) =
<[email protected]> wrote:
>=20
> Signed-off-by: YAN Chao (BCSC/EPA2, Smart Home) <[email protected]>

Hello Yan Chao,

Can you please provide a description of the problem that this patch
solves? - I=E2=80=99m wondering if it is the same =E2=80=98invalid-key=E2=80=
=99 error that
users of the distro I help maintain (LibreELEC) have been reporting
for a couple of years. In our distro it shows when using connman and
iwd, but not with connman and wpa_supplicant. We have never managed
to pinpoint/find the root cause.

Christian

> ---
> plugins/wifi.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>=20
> diff --git a/plugins/wifi.c b/plugins/wifi.c
> index 12389fa..551a5fc 100644
> --- a/plugins/wifi.c
> +++ b/plugins/wifi.c
> @@ -74,6 +74,7 @@
> #define P2P_LISTEN_PERIOD 500
> #define P2P_LISTEN_INTERVAL 2000
>=20
> +#define ASSOC_STATUS_AUTH_CHALLENGE_FAILED 15
> #define ASSOC_STATUS_AUTH_TIMEOUT 16
> #define ASSOC_STATUS_NO_CLIENT 17
> #define LOAD_SHAPING_MAX_RETRIES 3
> @@ -2505,7 +2506,8 @@ static bool =
handle_4way_handshake_failure(GSupplicantInterface *interface,
>=20
> if ((wifi->state !=3D G_SUPPLICANT_STATE_4WAY_HANDSHAKE) &&
> !((wifi->state =3D=3D G_SUPPLICANT_STATE_ASSOCIATING) &&
> - (wifi->assoc_code =3D=3D ASSOC_STATUS_AUTH_TIMEOUT)))
> + (wifi->assoc_code =3D=3D ASSOC_STATUS_AUTH_TIMEOUT ||=20
> +     wifi->assoc_code =3D=3D ASSOC_STATUS_AUTH_CHALLENGE_FAILED)))
> return false;
>=20
> if (wifi->connected)