From patchwork Thu Apr 4 10:52:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 1919741 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=X9SLxYVt; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nbd.name header.i=@nbd.name header.a=rsa-sha256 header.s=20160729 header.b=a4bMCkQq; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9JP02ZRDz1yYn for ; Thu, 4 Apr 2024 21:52:52 +1100 (AEDT) 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:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=plRNdwS/KLTsECipqMmsiqATUuaAoq17b/arVBP7Z+0=; b=X9SLxYVtXicfdE q9wojxWpkBnHxUIFeSdOc9/6P2H4+dz4+xNT9eX0mHH9x0+I61mNIg1AJLZ25lc5bn6hiVgLlk2YY 4jGG9Mi12tJPuPH9M7gsIHdr4owARePbz+7AmxrCQ9P5hRabIC42VVkycIT6p9Gz6Lg4GQggSKpRs ikX8vTsUw2y/oVJMCAIj6MvtuJ3TpbTu0e5NCp0AW6OI3ce4Gr28DHHJ9VSp9mAdkq52nMuUbJS24 oHtzHCqTnasYq/VR2pOol3VgnODNip0xjiAAWGjW7UDPQnqfcX6ZfyjSNHbCd3eKCd3uapM1kegW5 IjLM8isSNvOdODO1ff3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsKhm-00000002FJQ-2mW1; Thu, 04 Apr 2024 10:52:26 +0000 Received: from nbd.name ([46.4.11.11]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsKhg-00000002FGG-2DJU for hostap@lists.infradead.org; Thu, 04 Apr 2024 10:52:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7St4GBuq9vQ5jOieaYbyEF1TJ1O32KWXLFQdY63Ayzo=; b=a4bMCkQqzmwI0Z5kLRDwuFIpZ4 PKrllpv/1ozNODAcHJyu/L2mxuAkLqMawCXxBygnfybxLoIfO8qGpzQ94gZZoz0oFcoZfmu1DqiYp z2oc+CCuUsV7Vbfl1Tg0IYcIKANZd1qGqq1o2KtSTy3Z4b83xlZm9GR9qxDYtoqqdjvs=; Received: from p54ae9c93.dip0.t-ipconnect.de ([84.174.156.147] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1rsKhe-00CyWX-UN for hostap@lists.infradead.org; Thu, 04 Apr 2024 12:52:19 +0200 From: Felix Fietkau To: hostap@lists.infradead.org Subject: [PATCH 5/7] mesh: allow processing authentication frames in blocked state Date: Thu, 4 Apr 2024 12:52:15 +0200 Message-ID: <20240404105217.12478-5-nbd@nbd.name> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240404105217.12478-1-nbd@nbd.name> References: <20240404105217.12478-1-nbd@nbd.name> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240404_035220_642533_5156B2D6 X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) 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: If authentication fails repeatedly e.g. because of a weak signal, the link can end up in blocked state. If one of the nodes tries to establish a link again before it is unblocked on the other side, it [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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 If authentication fails repeatedly e.g. because of a weak signal, the link can end up in blocked state. If one of the nodes tries to establish a link again before it is unblocked on the other side, it will block the link to that other side. The same happens on the other side when it unblocks the link. In that scenario, the link never recovers on its own. To fix this, allow restarting authentication even if the link is in blocked state, but don't initiate the attempt until the blocked period is over. Signed-off-by: Felix Fietkau --- src/ap/ieee802_11.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 5a3132de45ef..ff1b1fcff44d 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3049,15 +3049,6 @@ static void handle_auth(struct hostapd_data *hapd, seq_ctrl); return; } -#ifdef CONFIG_MESH - if ((hapd->conf->mesh & MESH_ENABLED) && - sta->plink_state == PLINK_BLOCKED) { - wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR - " is blocked - drop Authentication frame", - MAC2STR(sa)); - return; - } -#endif /* CONFIG_MESH */ #ifdef CONFIG_PASN if (auth_alg == WLAN_AUTH_PASN && (sta->flags & WLAN_STA_ASSOC)) {