Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp493969lqg; Fri, 1 Mar 2024 11:14:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXxxEbKEElY6eh+9PeRMsGMz8XfwnekdHOigXkn1P+u4JG42oCJ/A3496j7T1kqSj93C9bFM2KVYEEeLh2Ng/03ZlQtrpKskMflC2cOeg== X-Google-Smtp-Source: AGHT+IEcyhr5jWWesfhgSaOVLs8uwl2rsWc+yLEtB90/KmPsFPVIsKz7aiJg2YU2i0BOkS98duMw X-Received: by 2002:a17:90a:cb94:b0:29b:171c:a787 with SMTP id a20-20020a17090acb9400b0029b171ca787mr2517737pju.19.1709320469767; Fri, 01 Mar 2024 11:14:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709320469; cv=pass; d=google.com; s=arc-20160816; b=bK+CVzn2k/AHTi5gpQn21KCrMJKZHf5zyNw3Itts9xQy5jA5bm2QJjLYSxUbSwhh7m DVBrw7sGvyPBLEznUxvJVVU1maMxybFNoC3BAdAW28VEsfuDFdT+xOwJxA3wISugzHDi ELhYt1e5TZ4bfoqFHc9tTqPWW9fGg+fAJKNnVDy1d3gkXIHHkR1PCO1LbiPSeD6sCxro 47eU9tFK6rMMS6pFrn11rbWgz3KOkXitDHBGN7kfv6Gz3s6PEGp6cBOaDXWyEiYAjBYC /O0En59E4ddX52K81KTFZNqLFsovnsJWjzElqeM/VFU/qIPEuj1AX3xk+FZIMJI8E9kQ 7Tcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ixXvsH69elV7ql2yjm+az9ytGzPGVTvVRlYbB0GPdjs=; fh=udUcNW/QoMoiPP5suH/SU1hteNn4teh2AVuFZPyvVrQ=; b=hp/daGPGod31gk9wtNuuwAWcRXQHSs2qP7umJL2pwEOkyjav6YO2qjO/3OgENRcITx Y90ltSV6ATeSBqFjt7pxQqmEYKNCSqFm8hDHO/bWic5QXJcvzhGBHg8+iHHnvpQFduQj 8GN5YAyBslgefBPJAxWBWpopUn6YKvtMwuo0x1XL1oGFd9vQbnavkfWZOOwTSVhO5TzT zWfy6lVYSc+EaMzpaBwFkrh51YDCwL1C4WNuBzBch07SuJX/CZvnSN2ABJDJFLuZKKxU WPXZwKlZ2NPZGjL0F9iBw/XHizXl5x2YrbqOlSJkz4pmroRGeHVJZENQHlegp4HQEUBx B1qQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Rhpudlth; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-4306-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y61-20020a17090a53c300b00299c528462asi6066159pjh.182.2024.03.01.11.14.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 11:14:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4306-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Rhpudlth; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-4306-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 08119B2B8A6 for ; Fri, 1 Mar 2024 18:37:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CAE81E88A; Fri, 1 Mar 2024 18:36:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="Rhpudlth" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 069CA1E48C for ; Fri, 1 Mar 2024 18:36:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709318215; cv=none; b=d7mf87J54pcLDynnqIPPIfK/ljS4mEfVGM3CSodCjwACkTDI0unZ4fYxgySILgTzRa9WkvQoGr/4WAGVDf8blZDyl1uKzKW3jpXFg+fPFHTJubnFic6IC4Qv0aYVIpXPGkYootIJD5vLcslsZrXlkpZur+k9CUfaWR5Dr21HYkk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709318215; c=relaxed/simple; bh=nSw5ihD3dIwp/Z+NJ3O797854Njl/DWC54KAM+SY4uc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fPpjdPjoJxKjGAgodjzV/kh/Lw5XR/LT2hqqi5qw2G5fA9/7yb/G3JFNJ0+2uSeIWw0bd/ltkkgyeaFrlYsa6nMLmM6T1Xb9U8q1ODhQt7pX2s9i5A8jN4lu2OC3vYypGAwxu59U3spi2Z9VCY+4iv9AwWyOdRx/XzqG8s3h960= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=Rhpudlth; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=ixXvsH69elV7ql2yjm+az9ytGzPGVTvVRlYbB0GPdjs=; t=1709318213; x=1710527813; b=RhpudlthM2KdaBgZy9RN4qImLwu3FAk09qcUGxGb+2uwdugJv2x1uYjLtYUGV2oMt5xHwH2wSUa OPQf2UOs/WIllLuG6iDlYFgZDPu6X2PXYK4VBht7kQyxdIJyc0xnDn1bDIKPNpL3HEIqzh6x4/7k/ urfaHnHrmVo9F/+1pARYalE4nksb0X6lfCKxH5aoQct8kfWxZE1dAVYEgr8/MLOrX7IkvRQKkUG5v R76JC+H5nfB6/LIbcg7vT7vH3PAgn4O6d9Rbq0YJWKNq90FloqCm8WPPxOxWWHioIIqQO/qFU+16k Uw/sya5aMN1ndvqZJO8o7V3SMdpCMBUL8MNw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rg7kX-0000000FC4Q-2Hr0; Fri, 01 Mar 2024 19:36:49 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Dan Carpenter , Miriam Rachel Korenblit Subject: [PATCH 1/2] wifi: mac80211: always initialize match_auth Date: Fri, 1 Mar 2024 19:36:32 +0100 Message-ID: <20240301193633.1a3fc370f211.I979dd222b3b5eb5e1437886e5f7c2355eeccb9f7@changeid> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg My previous patch only initialized match_auth when the ifmgd->auth_data exists, but that was wrong, it should always be set. Fix that. Fixes: 310c8387c638 ("wifi: mac80211: clean up connection process") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/3151f5d0-c18f-413d-b34b-b94f095b947c@moroto.mountain Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 5f2e9f5e1779..89c4165f2753 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8129,10 +8129,10 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, sizeof(ifmgd->s1g_capa_mask)); /* keep some setup (AP STA, channel, ...) if matching */ - if (ifmgd->auth_data) - match_auth = ether_addr_equal(ifmgd->auth_data->ap_addr, - assoc_data->ap_addr) && - ifmgd->auth_data->link_id == req->link_id; + match_auth = ifmgd->auth_data && + ether_addr_equal(ifmgd->auth_data->ap_addr, + assoc_data->ap_addr) && + ifmgd->auth_data->link_id == req->link_id; if (req->ap_mld_addr) { uapsd_supported = true; -- 2.44.0