Article View: linux.kernel.netdev
Article #8936[PATCH net 10/14] batman-adv: tt: send ROAM_ADV on each roamed back client
From: Simon Wunderlich
Date: Fri, 30 Oct 2026 13:51
Date: Fri, 30 Oct 2026 13:51
61 lines
11285 bytes
11285 bytes
From: Sven Eckelmann <sven@narfation.org>
When a ROAMING_ADV is received for an announced local client,
batadv_roam_tvlv_unicast_handler_v1() creates a global entry with the
BATADV_TT_CLIENT_ROAM flag set.
If the client sends a frame again before the next TTVN commit,
batadv_tt_local_add_roam() is expected to announce this return via a
ROAM_ADV frame. But this doesn't happen because the global entry (created
by the first ROAMING_ADV) carries BATADV_TT_CLIENT_ROAM until the new
originator announces the client.
Let batadv_tt_local_add_roam() always handle a roamed back client -
independent of the ROAM flag of the global entry:
* trigger sending of the ROAM_ADV frame(s)
* remove the (with the roaming) associated global entry
Cc: stable@vger.kernel.org
Fixes: 068ee6e204e1 ("batman-adv: roaming handling mechanism redesign")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
net/batman-adv/translation-table.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index e13c2828da475..0df51523dcf0c 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -819,14 +819,21 @@ static void batadv_tt_local_add_roam(struct batadv_priv *bat_priv,
if (!tt_global)
return;
- /* Check whether it is a roaming, but don't do anything if the roaming
- * process has already been handled
+ /* Handle newly roamed client - but not roamed back client.
+ *
+ * A client which roamed back must always be reclaimed from the
+ * originator(s) which sent the ROAMING_ADV. The global entry created by
+ * this ROAMING_ADV might still carry BATADV_TT_CLIENT_ROAM because the
+ * new originator did not yet announce the client.
*/
- scoped_guard(spinlock_bh, &tt_global->common.flags_lock) {
- if (tt_global->common.flags & BATADV_TT_CLIENT_ROAM)
- return;
+ if (!roamed_back) {
+ scoped_guard(spinlock_bh, &tt_global->common.flags_lock) {
+ /* Check whether it is a roaming, but don't do anything
+ * if the roaming process has already been handled.
+ */
+ if (tt_global->common.flags & BATADV_TT_CLIENT_ROAM)
+ return;
- if (!roamed_back) {
/* The global entry has to be marked as ROAMING and has to be
* kept for consistency purpose.
*
--
2.47.3
Technical Details
Message-ID:
<20261030135105.2555887-11-sw@simonwunderlich.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353799-linux-kernel-netdev=dewy.ruReferences:
<20261030135105.2555887-1-sw@simonwunderlich.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353799-linux-kernel-netdev=dewy.ru From: sw@simonwunderlich.de (Simon Wunderlich) Newsgroups: linux.kernel.netdev Subject: [PATCH net 10/14] batman-adv: tt: send ROAM_ADV on each roamed back client Date: Fri, 30 Oct 2026 14:51:01 +0100 Organization: Usenet Network Message-ID: <20261030135105.2555887-11-sw@simonwunderlich.de> References: <20261030135105.2555887-1-sw@simonwunderlich.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2248555"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:jr3Z+4RM0rGbOXDFwf6PSYdCe10= sha256:TNLy8Fi8yi3UP+AhU2b3cgB+WpsIwC5+3ycFTy6VGBk= sha1:NKyjIZkgwPnec+FK1j0e9cfwM0c= sha256:Z6zOk9lnnmTy6HUYuGYwektBSR1eRh11y6jLkRdjDVc= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id B28CE125C96; Fri, 30 Oct 2026 16:55:56 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.049 X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=simonwunderlich.de X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x9AcFXr-BO1o; Fri, 30 Oct 2026 16:55:54 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353799-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=simonwunderlich.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id DF56F125C93; Fri, 30 Oct 2026 16:55:45 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 6B44D2EE41; Fri, 30 Oct 2026 13:51:32 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793368291; b=laHk38dBrYXfNLtZ0jNDnOqHqLAUl8dIMPCNsBjq+ip5EeqQ6uG0C4lmaLvQQD9s0NOS yuJvApNSpmtuVxWEv2micbw39dyh/iBLuahLM57ap4MqSbBrnmwuNlJ3jnlTOe4Le9GVd j/26f/BrrXJccQv09SGza+9hUE/RzBmhMik/p7z5gYJhfSZktrjdlLqptLSFAA5aPiy+n etnC825hFPEVEikyUQ6zfTxqQ3N37LK6EkJUVWMWusQtsz58DGaPWLx0ZjtKnrCJLoxva YP47IklyJPZc+7PVplY75rM5zRmWvSHITQvtM3WfXCRioJ+B/LqP0+lhuS2xciExrQg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793368291; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=Ll7ri16af1436qp0X+F2gqvbXnAO1/+bWFHqnxgs6Co=; b=Dnwpmlku2ZkF2tjPaYA0wXe22XoGepIAy77aBWSSiGNKHrKmOVyj0imM0QE+9oWc+FAf m64rHe7FVT5UYkRrkNONo1V/lmoxGKMsfZn8OKJPCkwchIZOlA5wHYjJD0EjKe9lhC4fY loyu1/DQzNT7Mag80MOGm1GqtTRvb/deBq/cKCbbUY75GfxCSv+1BC4npySi8jdc2Fpgr LxoIcYB1bAOdYdBcyOk2BgzPHJ5j6EenRKL7G41DJaDvhXhJKIAO2NN0XEuy23Cn/CkjR XphTFh9HBSfqjD20ueT+21KfltoNPGAbS7vnctyPjXuFBxsvXSDUsZGTmOSQ1l0eugA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=0HnOSEa1; dmarc=pass header.from=simonwunderlich.de; spf=pass smtp.mailfrom=simonwunderlich.de; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 564C660A260C; Fri, 30 Oct 2026 13:51:31 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=0HnOSEa1 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.88.38.48 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793368290; b=S/LL8NP1zt83XSmZhmrEy2GeH1HvaDiyFHDw1F/O8wDZiSAtX2rRA2h0NWap6HyGz23m pNwn+gA6loncteWcdEPELcgxf/O2WXk6Wojq9MbgFpLxvuiDjUT7OTqzvuR2xVk5u3gyl R9fINPwKR1YHePJBi3hICGXUo5BoPmoa/3H9I9Mf532K0jBuIMEt5KgXsWHv2kZAy4BqC eLFWPHzqCFgeRD67JnWqu6TmNjcXk2gEdPMwljpyjcXWDp5xQ7eDfttxF5ojlqZ7wllxR RuhFqWuRhqeeoHZTYhgfZil6UwzgXieihHeAugjaDr3Cw+wgb+bLe9ZTw9k/WgSumzQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793368290; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=Ll7ri16af1436qp0X+F2gqvbXnAO1/+bWFHqnxgs6Co=; b=S98uMV2u6wAyLY2dvgWQiF5igOGZ9LkIJfP6lRm0SnPe/dwJxpiRCV+U+1tcti8PRqgH DP4xZkOcMcQJccErPVr5vVQMFPdamxPGyk+l/M568rkYsw+QBvStAamdTMRC9NMMkg9t0 z2eooA9kPa1WR0Q40bnPrJ/U+BOSOziXQqhP9aiDykVM3byBgtoESN5lfXUM3TBh9qcAL eZZNDXQw8LJzKXB+9O9Qc+QjbKD+/fSz4YgRhl395r4QWnOvEouWONfoJfTdCkKMWO1Bm yPp6aYlQQOFPwFxDdcEJc9hgIygW1XwRqulfGbMRKPNI2AxoFn3fw5iP2rFINOqb6LA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=simonwunderlich.de; spf=pass smtp.mailfrom=simonwunderlich.de; dkim=pass header.d=simonwunderlich.de header.i=@simonwunderlich.de header.a=rsa-sha256 header.s=09092022 header.b=0HnOSEa1; arc=none smtp.remote-ip=23.88.38.48 X-Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [23.88.38.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id 8AFCA606A31F; Fri, 30 Oct 2026 13:51:19 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8AFCA606A31F X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=simonwunderlich.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=simonwunderlich.de X-Received: from kero.packetmixer.de (p200300c597124Fd839580c360D3ED6F6.dip0.t-ipconnect.de [IPv6:2003:c5:9712:4fd8:3958:c36:d3e:d6f6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with UTF8SMTPSA id DF170FA2ED; Fri, 30 Oct 2026 14:51:17 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simonwunderlich.de; s=09092022; t=1793368278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ll7ri16af1436qp0X+F2gqvbXnAO1/+bWFHqnxgs6Co=; b=0HnOSEa12Mi7Bqo2qk2jEa2lrqgZPJ4BVWtcRIXlzpu+IaV3gV9RwJmQDtEYFLdWLus2Hz TH2sPmnO18zMdrk4DUhokC7EHRSIenWum3OJD5ZwSBhYqYZALxe/CfAvCEtgXosBOSNWm0 suu+058pKcatKX2vpG3O8RlEpGRfs9/BhYh2/olPn6n87C0WNzgw0eBNjA7jvS8S3mF2w8 CTaC65lcpVvS/KytoAKC5XQ6rD6CeJ4UZCfI8DILTbKkUAcVRbyiViwN8bul+D72OzNexc w7MSLmC3jPm7dEGa910OkwRItEarcrBcWagmcuqkpsio6ZVSpqBLL6iJnGoY3g== X-Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, b.a.t.m.a.n@lists.open-mesh.org, Sven Eckelmann <sven@narfation.org>, stable@vger.kernel.org, Simon Wunderlich <sw@simonwunderlich.de> X-Mailer: git-send-email 2.47.3 X-In-Reply-To: <20261030135105.2555887-1-sw@simonwunderlich.de> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list