From patchwork Wed Feb 27 01:21:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wang X-Patchwork-Id: 1048866 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="D7GmJksk"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="bpa4D+vi"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 448ZgN1RQpz9s4Z for ; Wed, 27 Feb 2019 23:26:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:Mime-Version:Message-Id :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=HAE+3TwShWfJuoWpG07ceX1KUdfxEbknK6O+Z8KruoQ=; b=D7GmJkskUPcCkD EJg/UJDaaEMbPHxfY+vLksg/rBpt0rQQ/3FSS2Vjix69zOLYDQJGzIPt/0fsgRTipZRh8b4+fZGXL bEzPGV+MsV7vRnq0HB4OiJkIa9D6qTvBUITOM5zu4qNEWvODKzmEXLwCh6EMucYDADM7T6FxHlC/s EoX+DRzAXrYcW99bML7D4Fp3ayhGIIZTq5yjgXc0EHAmS0G45/TFK1gm50B98/eq8FPjP5SkxJYEL ViYK3Kwz3aDVqxo26xrWMIt+hfpFwFFL0O65in+XLIhen1TVrbeDvDUnVNV34yrbSyR4IR6G6P0b/ cVpJW4afrKx2XyZy8KNw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gyyIK-00045h-6v; Wed, 27 Feb 2019 12:26:40 +0000 Received: from mail-yw1-xc46.google.com ([2607:f8b0:4864:20::c46]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gynur-0004rE-MP for hostap@lists.infradead.org; Wed, 27 Feb 2019 01:21:47 +0000 Received: by mail-yw1-xc46.google.com with SMTP id r67so11044416ywd.4 for ; Tue, 26 Feb 2019 17:21:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:message-id:mime-version:subject:from:to:cc; bh=QGPGXDaaqem+03pIqSnWL5W1FryWp6MHvD5D/BvjT8Y=; b=bpa4D+vi1ADEE6iGTA9qxIjT7fMwzj0+HuBzxOuzbEv7jotMbSKnWg6WIo5WTANPf7 eto712ZWJVasOinYFp1TgF/NPSOOemWn5okc/Y24KRvPdwxrEbWxtiiSqvrUFmjlwF1O mxwPqv++QtEc1kjn1hqKlM8oQKjHUDGfrbh08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=QGPGXDaaqem+03pIqSnWL5W1FryWp6MHvD5D/BvjT8Y=; b=pDaUnjj89/C0OxRNTv7Rm/5IVbr78nJHxHMO1x8qLze0A1zMURm9t+nXVVvtuK4O/d 7Ujurx0klN6vcurMhpyPNl6FebEfKGU2KV2vvRXuBZfjV9nppFnskdjMEjV3o4XYGZCf keUQxjRSUBcDXVfXo4PVi6XVqg0KKn95JhZZcIG73FJFN4i2RNPQIqXy6FHAX/0o64Lh Vir2H5XHHwmjRMcqLiEex+PDMVr/Q3zH0s8ubVd/Ujj+GgO/ehg2aHr6UahykkxvmT4v 8KqAAT0BlOPEP+tALUYO1xRU4xePezQvNcjnBMILpYrKSaRc066TfIt3cXVKliGVJjPx fMrQ== X-Gm-Message-State: AHQUAuZi1VCqmOaRlHMlwK4+ldDqa7gwtp3QJMNDfb+6knTBPE2L8VyM bjZcZWb6CYu95n479iX7DRh/3Qvme4zs8awi X-Google-Smtp-Source: AHgI3IZqrbtTYxrMlbNNY2JrLjnhSekblz+ficqGjPe7uJWinpx7G/i8VqWFMMI5ZSEdwei5UU70tlIHQCcll6vY X-Received: by 2002:a25:be47:: with SMTP id d7mr9783417ybm.15.1551230503767; Tue, 26 Feb 2019 17:21:43 -0800 (PST) Date: Tue, 26 Feb 2019 17:21:39 -0800 Message-Id: <20190227012139.188973-1-matthewmwang@chromium.org> Mime-Version: 1.0 X-Mailer: git-send-email 2.21.0.rc2.261.ga7da99ff1b-goog Subject: [PATCH] check for driver SME support when selecting FT suites From: Matthew Wang To: j@w1.fi X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190226_172145_759368_7BA5AF74 X-CRM114-Status: GOOD ( 11.27 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:c46 listed in] [list.dnswl.org] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-Mailman-Approved-At: Wed, 27 Feb 2019 04:26:38 -0800 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hostap@lists.infradead.org, matthewmwang@chromium.org Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Fast BSS Transition (802.11r) cannot be performed without driver support for Station Management Entity (SME). However, wpa_supplicant will select FT suites (FT-PSK and FT-EAP) even when the driver does not support it. This change has wpa_supplicant select the FT suites only if the driver supports SME. Signed-off-by: line for the commit message so that I can consider --- wpa_supplicant/wpa_supplicant.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 20ae588ad..0a758f840 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1440,7 +1440,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s, pmksa_cache_clear_current(wpa_s->wpa); } #endif /* CONFIG_SHA384 */ - } else if (sel & WPA_KEY_MGMT_FT_IEEE8021X) { + } else if ((sel & WPA_KEY_MGMT_FT_IEEE8021X) && + (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)) { wpa_s->key_mgmt = WPA_KEY_MGMT_FT_IEEE8021X; wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT/802.1X"); if (pmksa_cache_get_current(wpa_s->wpa)) { @@ -1450,7 +1451,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s, "WPA: Disable PMKSA caching for FT/802.1X connection"); pmksa_cache_clear_current(wpa_s->wpa); } - } else if (sel & WPA_KEY_MGMT_FT_PSK) { + } else if ((sel & WPA_KEY_MGMT_FT_PSK) && + (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)) { wpa_s->key_mgmt = WPA_KEY_MGMT_FT_PSK; wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT/PSK"); #endif /* CONFIG_IEEE80211R */