From patchwork Fri Jul 29 10:17:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: xinpeng wang X-Patchwork-Id: 1661970 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ntv7Ol59; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LvNn25cCTz9sGv for ; Fri, 29 Jul 2022 20:20:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From: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=Wg5gEqhdHOSePlFhBq6HGCkk58X+BDV3TRR6P3nfusM=; b=ntv7Ol59cKsi+o 2VzplW7HcBrDU0DS5akCzjY9pzt3GVGvz1m+da0kUaJux9iFtJ9AVjkWUwrNWEdqqgjrr0sZKxLzD v5WUJSZNHN0jER1cZF+KLE//lsaUz+YSLlY3YkkkeK2TtrJ6x1ptu/EyWactCgp6GWb2Auosm9iQk Upn9/72noQiz8Enx3D+q6/VOa2UcLZlVDjfXFFJ60E6RrwDNkCpzHOfxOgIRdoTyUaQ+SIGKwLBIq 260i1xGmjYt/GNsHWiWgKXOJY+3FB87ah4wuybMX7aiefDPIZMDehwkzIGLyibnczR2D2Op0o824/ ooblJLh28BbRrxzTJRLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHN4u-0042RO-Q1; Fri, 29 Jul 2022 10:18:44 +0000 Received: from smtpbg154.qq.com ([15.184.224.54]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHN4p-0042LP-Cs for hostap@lists.infradead.org; Fri, 29 Jul 2022 10:18:41 +0000 X-QQ-mid: bizesmtp73t1659089888tml4ql3v Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 29 Jul 2022 18:17:55 +0800 (CST) X-QQ-SSF: 01400000002000D0F000B00A0000000 X-QQ-FEAT: wbizDlKcf6lxFLnKQFYImY4V9y1R0nPlwsGjSojPwJymcOvh6UUpxgW1OMzHQ u5e/jj+2Y+wPBHfxGafI5PkKza3V5scyRttyfISKItoexXRZ2y0I8FfWQGMRW+Ju67sWEwF LPMCMjq6r+bY2liI374vWngH/BYLL1b4ogy1jr/rh43QBdcKorEjkvdspA/7rHje7bbL3tl S/1dRqjvmgTcBIft/tWnVjyKUaZoJVXFUoZFqtFKz3ixbqKbML3DrtNOKi6ynjBgW3aKt5B 2xX8IiVYIngxI1QOGHIQaJw17nOiayNsxkunDzAdwSjoc59RMDBnjuBNCB3GQkmlcxjIa1e BStf0kd/3UvTQoXsz7rCaZfNvC7W84xLX5CY/DkeDIlLa7dhiBx/JCjTMmGvw== X-QQ-GoodBg: 2 From: xinpeng wang To: hostap@lists.infradead.org Cc: xinpeng wang Subject: [PATCH] wpa:change state to AUTHENTICATING after trigger external_auth ok Date: Fri, 29 Jul 2022 18:17:50 +0800 Message-Id: <20220729101750.425-1-wangxinpeng@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign10 X-QQ-Bgrelay: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220729_031839_911331_D7D74BBE X-CRM114-Status: GOOD ( 11.27 ) X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When the connection to wifi fails, nm judges whether recall ask-password-dialog according to the status change of wpa; for sae, if it is in external authentication mode, when the authentication fails, [...] Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [15.184.224.54 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org When the connection to wifi fails, nm judges whether recall ask-password-dialog according to the status change of wpa; for sae, if it is in external authentication mode, when the authentication fails, the state is from ASSOCIATING to DISCONNECTED; if it is not external authentication, when the authentication fails, the state is AUTHENTICATING To DISCONNECTED. Therefore, nm needs to ask for a password when the state of wpa changes from AUTHENTICATING or ASSOCIATING to DISCONNECTED when sae. This range is too large, and there may be misjudgments. Therefore, consider changing the status to AUTHENTICATING for the successful triggering of external authentication. Signed-off-by: xinpeng wang --- wpa_supplicant/sme.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 2dad36ddc..1e317d06d 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -1198,6 +1198,8 @@ void sme_external_auth_trigger(struct wpa_supplicant *wpa_s, if (sme_handle_external_auth_start(wpa_s, data) < 0) sme_send_external_auth_status(wpa_s, WLAN_STATUS_UNSPECIFIED_FAILURE); + else + wpa_supplicant_set_state(wpa_s,WPA_AUTHENTICATING); } else if (data->external_auth.action == EXT_AUTH_ABORT) { /* Report failure to driver for the wrong trigger */ sme_send_external_auth_status(wpa_s,