Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp599700lqh; Thu, 28 Mar 2024 10:30:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUEj4MuGIGPMpsnOX2FXuBxBaZ3IEHe5EyBLoasBsK2iNTrsVMEffQFv829X86/vwAxd43alAzoMY9rrC3ttNW/CpT2m/kpz6wuBSeulg== X-Google-Smtp-Source: AGHT+IHNRjL9ZPAHcgq8XUdWCgNpMgbmol5RWq006ADixlGC1hpMBPOsjn19HQXCEgaYY2QNTekd X-Received: by 2002:a05:620a:b08:b0:789:e490:2840 with SMTP id t8-20020a05620a0b0800b00789e4902840mr135910qkg.37.1711647034908; Thu, 28 Mar 2024 10:30:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711647034; cv=pass; d=google.com; s=arc-20160816; b=fSn2I5JuScZwYkyfBzKapnoZC/O7hOfT5tmQ4sUhqzpz3QN1oJJ17la8/WWCJShfUj mCipWiWRNfdLN7gsWEgNL1WL+/gxi73WIoj6xlvrDNZ5lj153X4z7UicKfb7MQAjb2N4 AtZhevxooDH2X9snaZqTA9GpYCeIWh/tFDnSmVYH/jUjt0YgFZ2EV4Cen54+O45prVp9 0EvVsITeeslk9FpFhau9LEqA5A7Hx7hngQEtAVqOXk6G9C8THmt3lPwiRiAlXPzpWC4L ahk5nmKnB7S1n0Z0bP2KbaEdpCP9SzVS8LGlMN/BJzkPwwNJ/HeAcAnwstWmGG6uA/4e cGuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Jq4doMyKqkHlVSsevcF1dh92Xq/jgl5mE1PkvRljp5A=; fh=6K5zm3a9XPgZnik3Nbqqi680yiDwSjR6b7YaZf2RdV8=; b=P/FbEphEfprtPw3bIYnYTgzKKEuRGuk4yU7wjWN1Akt/EHYobk+IxrbjKdAccEN627 zZ3+PqVk/eB9Jp5dsUbmeGUHLPwrlXvdvt85kb95A/HMoS7FDa6mUZHipyjwornhC63b lKgapEBLow3/YElQupdJ82uSmm+FZfg4i5Ly3i3BWQXRr0RzNIpGOdjPkISZ3UrUUJL6 rrbx1gLXnJvV9EDhLy855Icb2itY7w/ZyByJwfj5OGhAISNgq/9rnqAILoCzXG2opZ18 7a5M0AxRVHdgx0d8YTmlH7T9YMsMMb32rBImtxr789TzaP5QWTrGnLJx4acOOehrJUSE w+ng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fL47y5wl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-5480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5480-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ye25-20020a05620a3b9900b0078a3a23711esi1816483qkn.478.2024.03.28.10.30.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 10:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fL47y5wl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-5480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5480-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9E58E1C2A623 for ; Thu, 28 Mar 2024 17:30:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51A888004F; Thu, 28 Mar 2024 17:30:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fL47y5wl" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC0B67EF00 for ; Thu, 28 Mar 2024 17:30:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711647032; cv=none; b=gFMPVL3RJ3iE51JoFtf1l+L0lGaFEPQaPR34X9HQo4KYkfz1Q1mUNOWkyKitJxAxxVQ64oTS5/D3zqSSt3FAHHdLPp2RGbNbLV54VJX08dJf6lDy/QIFlvnKbPjDjuCY8utamrS29+GWsFJMjVlUNClVTberek4m6pjT7gkhHh0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711647032; c=relaxed/simple; bh=FT0x0ahMc6hYytVWkABLg1QurNLvt8BLJtRllKqEyJA=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=J3xcA+Eixk5DwVJxjbXKJtn9dMWzVeLoKVy/ETNuLMbvfQpxrRxOgW9dcUgpbE1Wom3BmNjPnGNFB1CQVW9+38iZNXwyRPBAoODGKOdRmyFqQ8/pQl1Cwp2qy4amkseGzs+GjDEQWOZ4CvLx3kxFVgMykJ5wBcZRiNZMiJ7jMvE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fL47y5wl; arc=none smtp.client-ip=209.85.160.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-4317fbb669cso6951441cf.2 for ; Thu, 28 Mar 2024 10:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711647030; x=1712251830; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Jq4doMyKqkHlVSsevcF1dh92Xq/jgl5mE1PkvRljp5A=; b=fL47y5wlntmJ6mr+Uokb+Mln1qb5aNG6tRL5CTNNQrEcC9SuBssEVRbs4BjzCkHlKs WRnRYBfykaEKbQcRLc0DhVyDjUU0AgkOOrum0O4dDLypDsgMRC1f6ODaoureKssEcp/y ruzGR5igzZZEXRiF9HDHRpqndgmlGlqMr+YDrBr2nikns+BuFrvBWmR6KsSQqazN4DId dnYZi8XoybZjmpYydw+xUiDvwFLAtDhrGyFI/hx/VbbQjtSmHXE09MkF3/WREF2t3HZ9 Kh6a1F9S1npTXio/oTGaKYJwrtRV0BjOkRVD9ewA7YmeC65u80P1WjEcIoAXR6ywl3gO bV5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711647030; x=1712251830; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Jq4doMyKqkHlVSsevcF1dh92Xq/jgl5mE1PkvRljp5A=; b=HLimjpsJIv77yNzkkoWsETT8m9U3S8IboITCA1olSLvTsu8Mfcwv6UL3RkUfxnQKtf DwO53TFQpnAZkY88LjLeizeLmajewpUr0In/v4+jN+i6pmhC7Fi1wYn+OYMzTlq/RvWw 5T3Uh5X3T0MSSexS+lYlKI09QmG4fL/VrZiY1FEmk1D/8S2PZHZIlsDC/b6oBgEhB605 kaaESuedCU67R4LWlh3YXE4cLxmn7N9yf9/koSFntW/XL3yQZX3XX3HEPlnNKZ5dToGs o08+MaqBohGEhEuV56H2gFHmryUt0oQvNMNqTIDyJc+vM59Nn/8I+VFqHQ5uckPWcgGg Qd8Q== X-Forwarded-Encrypted: i=1; AJvYcCXUbWlskagAB7fEGqt4H1cO4tejx3YY/Q26ZnnfzQqFwP7W4qGdC8IWlIzW7rKxLKrvYifafTVJ2VC1TzIf8JW11xD2s+i5g0xY1QfP8YM= X-Gm-Message-State: AOJu0YwT8JwuKPuiyQ840Dh1/CTUeqL/2OHNK+kGgOgCNKDbb6JwtM/m xdrC5q/rlhlfaoJAjut2yX6f9fi38jrmKzMsTCAt9zfaXZ4/P3HBTPTy5cDm X-Received: by 2002:a0c:e444:0:b0:698:e89b:6982 with SMTP id d4-20020a0ce444000000b00698e89b6982mr895246qvm.28.1711647029688; Thu, 28 Mar 2024 10:30:29 -0700 (PDT) Received: from [10.102.4.159] ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id r1-20020a0562140c4100b0069183a8de64sm808032qvj.75.2024.03.28.10.30.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Mar 2024 10:30:29 -0700 (PDT) Message-ID: Date: Thu, 28 Mar 2024 10:30:22 -0700 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: No way to cancel SAE after CMD_AUTHENTICATE? Content-Language: en-US To: Johannes Berg , "open list:MEDIATEK MT76 WIRELESS LAN DRIVER" References: <055b857a-83f0-4abb-b6ff-f0eaaf572e64@gmail.com> <968024261cf1d4e72832451e1c4cc64922d05364.camel@sipsolutions.net> From: James Prestwood In-Reply-To: <968024261cf1d4e72832451e1c4cc64922d05364.camel@sipsolutions.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Johannes, On 3/28/24 9:05 AM, Johannes Berg wrote: > On Thu, 2024-03-28 at 08:23 -0700, James Prestwood wrote: >> Hi, >> >> I noticed some odd behavior where userspace is unable to cancel an SAE >> connection until associated. If you issue a CMD_AUTHENTICATE then >> immediately (or prior to association) send a CMD_DISCONNECT the kernel >> will not cancel the authentication and afaict ignore the CMD_DISCONNECT. >> The kernel will continue to send authenticate events, and even retry >> authentication until the retry limit after CMD_DISCONNECT is issued. >> >> I see the checks in cfg80211_disconnect which seem to back up this >> behavior where its essentially ignored if not "connected". I'm not sure >> where to actually fix this since the auth retries are internal to >> mac80211. Since the device isn't even authenticated I'm unsure what >> value/structure to even check in order to detect this situation and >> clean up. But there needs to be some way to cancel the authentication, >> right? > NL80211_CMD_DEAUTHENTICATE should do that? I'm not really surprised you > cannot disconnet when you're not even connected yet, for the most part > the kernel doesn't care about tracking auth state (any more, for many > years now). Your right, I did try that so I thought but I must have screwed up the test. Swapping the CMD_DISCONNECT call with CMD_DEAUTHENTICATE does stop the retry attempts, and in turn get an expected deauth event. Sorry for the noise. Thanks, James > > johannes