From: netdev-bot+sashiko@kernel.org
To: sw@simonwunderlich.de
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
b.a.t.m.a.n@lists.open-mesh.org, sven@narfation.org,
sashiko-bot@kernel.org
Subject: Re: [PATCH net 07/10] batman-adv: tt: only transmit local ROAM flag together with DEL
Date: Tue, 27 Oct 2026 08:55:22 +0000 [thread overview]
Message-ID: <179309132249.3134.16887364336514212941@kernel.org> (raw)
In-Reply-To: <20261026085309.1074911-8-sw@simonwunderlich.de>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The fix leaves the requester-side client drop in place even
though the commit message lists it as a symptom, and the message…
--
batman-adv: tt: only transmit local ROAM flag together with DEL
This patch stops local TT entries from sending BATADV_TT_CLIENT_ROAM
unless it comes with BATADV_TT_CLIENT_DEL. The ROAM bit is now cleared
for non-DEL events in __batadv_tt_local_event() and for full table
responses in batadv_tt_local_valid(). The goal is to stop receivers from
treating a plain ADD as a roaming advertisement.
> diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
> index 3349376a9087d..39b61426f1680 100644
> --- a/net/batman-adv/translation-table.c
> +++ b/net/batman-adv/translation-table.c
[ ... ]
> @@ -3342,8 +3350,12 @@ static bool batadv_tt_local_valid(void *entry_ptr,
> if (tt_flags & BATADV_TT_CLIENT_NEW)
> return false;
>
> + /* the entry is (still) announced. A ROAM flag of an entry which is
> + * pending to be removed must not be transmitted. Otherwise, the
> + * receiver would handle it like a roaming advertisement
> + */
> if (flags)
> - *flags = tt_flags;
> + *flags = tt_flags & ~BATADV_TT_CLIENT_ROAM;
>
> return true;
> }
[Severity: Medium]
Does this fix the requester-side symptom described in the commit
message? The commit message says:
When the requester is the node which sent the ROAMING_ADV, it then
marks its own (new) local client as roamed back to the old originator
and drops it when it is still NEW.
After this change, batadv_tt_local_valid() still reports an entry that
batadv_tt_local_mark_removed() marked ROAM|PENDING as valid. It only
clears the ROAM bit. So the entry still goes out as a plain ADD in the
full table response built by batadv_send_my_tt_response().
Take node B, which sent the ROAMING_ADV for client C to the old
originator A. B gets A's full table response before A's next TT commit:
batadv_tt_fill_gtable()
batadv_tt_global_del_orig(bat_priv, orig_node, -1, "Received full table")
/* removes B's ROAM-marked global entry for C if A was the only orig */
_batadv_tt_update_changes()
batadv_tt_global_add(..., flags without ROAM, ...)
out_remove:
batadv_tt_global_purge_local(bat_priv, tt_global_entry, flags)
batadv_tt_local_remove(..., flags & BATADV_TT_CLIENT_ROAM) /* false */
batadv_tt_local_mark_removed()
if (common->flags & BATADV_TT_CLIENT_NEW)
break;
batadv_tt_local_remove_now()
The NEW check in batadv_tt_local_mark_removed() does not depend on
roaming. B's newly roamed-in local entry for C is therefore still
removed right away by batadv_tt_local_remove_now(). If the entry was
already committed, a DEL is queued instead. B's global table then
points C at A.
On A, the local entry for C is ROAM|PENDING, so batadv_is_my_client()
returns false there as well. Would traffic for C then be disrupted
until C sends another frame through B and batadv_tt_local_add()
recreates the entry?
The first bullet list in the commit message also has a related
statement:
* batadv_tt_global_purge_local() removes a local entry of the receiver
It is listed there as an effect of an ADD carrying ROAM. However,
batadv_tt_global_add() reaches out_remove and calls
batadv_tt_global_purge_local() on every successful non-multicast global
add, whether or not ROAM is set. ROAM only selects the roaming argument
passed to batadv_tt_local_remove().
Is more needed to keep B from dropping its local client in this case?
If not, should the commit message say that this patch only fixes the
ROAM marking of the global entry and the resulting CRC mismatch?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261026085309.1074911-2-sw%40simonwunderlich.de
next prev parent reply other threads:[~2026-10-27 8:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 8:52 [PATCH net 00/10] pull request: batman-adv 2026-10-26 Simon Wunderlich
2026-10-26 8:53 ` [PATCH net 01/10] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure Simon Wunderlich
2026-10-26 8:56 ` netdev-bot+sinfo
2026-10-26 8:53 ` [PATCH net 02/10] batman-adv: Close OGM aggregation before transmission Simon Wunderlich
2026-10-27 8:55 ` netdev-bot+sashiko
2026-10-27 12:19 ` Sven Eckelmann
2026-10-26 8:53 ` [PATCH net 03/10] batman-adv: tpmeter: fix u32 truncation of reported bytes Simon Wunderlich
2026-10-26 8:53 ` [PATCH net 04/10] batman-adv: dat: initialize orig_node of unfilled candidate slots Simon Wunderlich
2026-10-26 8:53 ` [PATCH net 05/10] batman-adv: fix skb leak when hard_iface is being released Simon Wunderlich
2026-10-26 8:53 ` [PATCH net 06/10] batman-adv: stop originator purge worker before freeing TT Simon Wunderlich
2026-10-26 8:53 ` [PATCH net 07/10] batman-adv: tt: only transmit local ROAM flag together with DEL Simon Wunderlich
2026-10-27 8:55 ` netdev-bot+sashiko [this message]
2026-10-27 12:11 ` Sven Eckelmann
2026-10-26 8:53 ` [PATCH net 08/10] batman-adv: tt: only update flags for TT events Simon Wunderlich
2026-10-26 8:53 ` [PATCH net 09/10] batman-adv: tt: don't drop local events queued during TVLV update Simon Wunderlich
2026-10-27 8:55 ` netdev-bot+sashiko
2026-10-27 13:31 ` Sven Eckelmann
2026-10-26 8:53 ` [PATCH net 10/10] batman-adv: tt: limit local table to single TVLV response size Simon Wunderlich
2026-10-27 8:55 ` netdev-bot+sashiko
2026-10-27 12:35 ` Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179309132249.3134.16887364336514212941@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko-bot@kernel.org \
--cc=sven@narfation.org \
--cc=sw@simonwunderlich.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox