From patchwork Wed May 13 06:59:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 2237504 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=z8r0uAVO; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=i4D4uaaH; 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 4gFkrp68Rrz1yLY for ; Wed, 13 May 2026 17:01:12 +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=FFBD0RQjp7qrtgR329Bao+AItUEvkjAnOuykhbEaPx8=; b=z8r0uAVOxZ5cQi uePnas1JyJNSIMESaDhp+eNZG2pssUNzRORFajSAju1cNnbBxkVm5GqZc6ASXEqY4LUrXzx9X5Zym peSRf0bluAtXVBTYL23wOJSmPBASFIDWeQzDl1kp/OqZwWOTi2a0gH0rylD2PzzaPBDHrAp5d5uSB j1Y4rXdRCqON/qlCOFP7pyikSF8scYLtRcgC3WGWLpAKow+Z5BS34oJiDCUIi1m4buve4DjeAEVNN QlC60o3kxwE3MbNbxBXAEDdOBbBOeOcr5uGRGXhZG5taPsT0nf+yI9gvRmQsNMitr5szAHoy/ETpM J9fR4/pejm1/6f8//5Tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wN3Z6-00000001UYw-1Iae; Wed, 13 May 2026 06:59:32 +0000 Received: from mgamail.intel.com ([198.175.65.10]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wN3Z0-00000001UWo-3XHp for hostap@lists.infradead.org; Wed, 13 May 2026 06:59:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778655567; x=1810191567; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wS75grn8UsFNAyEWjpqDJ0xmeIRlpHNnIig4c6I34B8=; b=i4D4uaaHEiMhcYew3jte2jJ5Sh3m9RsvUBuwORmHoyodR4IigQUPh44Q MKMttQY/D3n3jzraQ9WgLQMjsaGeHvuKrKcypcBk5nPdcjfDnU0epPrIY vtwhiVykamPBBwuH/xIa7EOJvJ/CwHSCP0feHvtnaCgSS9h2VQ2dkgro5 fUk+RtTIQwMf7zQJb76gxuId7a9op/3O3kT45WMfbrgMY/k44WjiYWgvW bciQnMooXBAQax97dgHlVy/PBpSztkfi3hg7Ph6Hdw3WznjN/F1XG9+Qw U6FAe0itOfc4+5ob5VjUPyIit2A8CK3w9VFCJ7XNu2n3ujVDZeeZEDehw w==; X-CSE-ConnectionGUID: 31hlmZc8Rfe69YUoGKTh0w== X-CSE-MsgGUID: 9q7AaeLdS2+7qyyxQX3HMA== X-IronPort-AV: E=McAfee;i="6800,10657,11784"; a="97001285" X-IronPort-AV: E=Sophos;i="6.23,232,1770624000"; d="scan'208";a="97001285" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2026 23:59:27 -0700 X-CSE-ConnectionGUID: JXhSsk5rSaeZDyJnT9qkTQ== X-CSE-MsgGUID: 2JuWOZsER2GaMY7+k4SGZw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,232,1770624000"; d="scan'208";a="233721874" Received: from iapp347.iil.intel.com (HELO 87c02287900a.iil.intel.com) ([10.167.28.6]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2026 23:59:25 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: maheshkkv@google.com, vamsin@qti.qualcomm.com, Ilan Peer Subject: [PATCH] NAN: Do not clear NAN NDL state on failure Date: Wed, 13 May 2026 09:59:00 +0300 Message-ID: <20260513065909.12048-2-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260512_235926_933525_741F2CD4 X-CRM114-Status: GOOD ( 11.51 ) X-Spam-Score: -4.8 (----) 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: From: Ilan Peer When an NDP response is rejected by the subscriber a NAF with rejection status needs to be sent to the publisher. Since in the NDL processing of the NDP rejection, the peer NMI station is removed and [...] Content analysis details: (-4.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.175.65.10 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.4 DKIMWL_WL_HIGH DKIMwl.org - High trust sender -0.0 DMARC_PASS DMARC pass policy 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 From: Ilan Peer When an NDP response is rejected by the subscriber a NAF with rejection status needs to be sent to the publisher. Since in the NDL processing of the NDP rejection, the peer NMI station is removed and with it the resource allocated to it, e.g., peer schedule etc., the NAF would be sent on the general resources of NAN Device and the transmission can be delayed (or even dropped). To fix this, when a NAF is expected to be sent to the peer, do not remove the peer NMI station (it would be removed on Tx status handling). This way, the NAF would be sent using the resources allocated to the station. Signed-off-by: Ilan Peer --- src/nan/nan_ndl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/nan/nan_ndl.c b/src/nan/nan_ndl.c index c463f05595..9ee1867e1d 100644 --- a/src/nan/nan_ndl.c +++ b/src/nan/nan_ndl.c @@ -736,11 +736,15 @@ out_fail: ndl->status = NAN_NDL_STATUS_REJECTED; ndl->reason = reason; ndl->send_naf_on_error = 1; + + /* + * Do not modify the state. Full cleanup will be done on Tx + * status handling + */ + } else { + nan_ndl_clear(nan, peer); } - /* Clear the NDL info but leave the state, status, and reason. Full - * cleanup will be done on Tx status handling. */ - nan_ndl_clear(nan, peer); return -1; }