๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21973

Re: [PATCH net-next 04/15] batman-adv: bla: register own backbone gw when claiming for local node

#21973
From: netdev-bot+sashiko
Date: Tue, 24 Nov 2026 17:20
111 lines
11909 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit fixes a real BLA bug that users can see on the LAN,
  but it has no Fixes: tag.
- [Low] The commit message says the own backbone gateway entry may be
  missing "for example due to an earlier error".

--

batman-adv: bla: register own backbone gw when claiming for local node

With this patch, batadv_handle_claim() passes own_backbone=true to
batadv_bla_get_backbone_gw() when the backbone address is the primary
interface address. Before, an own backbone gateway entry created on the
rx claim path was set up like a foreign one. No initial announcement was
sent and the UNSYNCED grace period was skipped.

Closes: https://sashiko.dev/#/bug/linux-dba9d95d-5eeb-40fd-abf4-e054aee1f735

> When no backbone gateway entry for the local node exists yet on this VLAN
> (for example due to an earlier error), the entry is therefore created like
> a foreign backbone gateway.

[Severity: Low]
Is "for example due to an earlier error" the usual way to reach this state?

In batadv_bla_rx(), batadv_handle_claim() is called with the primary
interface address before batadv_bla_update_own_backbone_gw() runs at the
allow label:

net/batman-adv/bridge_loop_avoidance.c:batadv_bla_rx() {
    ...
		batadv_handle_claim(bat_priv, primary_if,
				    primary_if->net_dev->dev_addr,
				    ethhdr->h_source, vid);
		goto allow;
    ...
allow:
	batadv_bla_update_own_backbone_gw(bat_priv, primary_if, vid);
    ...
}

batadv_bla_update_orig_address() also purges every backbone entry when
there is no old primary interface or BLA is disabled:

net/batman-adv/bridge_loop_avoidance.c:batadv_bla_update_orig_address() {
    ...
	if (!oldif) {
		batadv_bla_purge_claims(bat_priv, NULL, 1);
		batadv_bla_purge_backbone_gw(bat_priv, 1);
		return;
	}
    ...
}

This runs when the primary interface is selected and when BLA is toggled
through batadv_bla_status_update().

After bring-up or a BLA toggle, the first frame on a VLAN received from
the mesh with an unclaimed source (or a unicast source claimed by a
foreign gateway) seems to create the own entry through
batadv_handle_claim(). That happens in normal operation, without any
earlier error.

Could the commit message say that this is the normal startup path? Stable
maintainers would then have an accurate picture of how often the bug
occurs.

> diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
> index 68ff2f94cf49d..3da070a087da6 100644
> --- a/net/batman-adv/bridge_loop_avoidance.c
> +++ b/net/batman-adv/bridge_loop_avoidance.c
> @@ -986,18 +986,22 @@ static bool batadv_handle_claim(struct batadv_priv *bat_priv,
>  				unsigned short vid)
>  {
>  	struct batadv_bla_backbone_gw *backbone_gw;
> +	bool own_backbone;
> +
> +	own_backbone = batadv_compare_eth(backbone_addr,
> +					  primary_if->net_dev->dev_addr);
>  
>  	/* register the gateway if not yet available, and add the claim. */
>  
>  	backbone_gw = batadv_bla_get_backbone_gw(bat_priv, backbone_addr, vid,
> -						 false);
> +						 own_backbone);

[Severity: Low]
Should this patch have a Fixes: tag?

The false argument replaced here came from commit 52aebd6a9fe4
("batman-adv: send announcement when backbone gw is registered"). That
commit's message says the announcement should go out as soon as a
backbone gw is added, for example when "a packet passes the rx or tx
path". This rx call site never passed own_backbone=true, though.

Commit d807f2728708 later added the UNSYNCED/num_requests hold-back. It
sits in the same if (own_backbone) block in batadv_bla_get_backbone_gw(),
so this call site skipped it too.

Would something like this work?

Fixes: 52aebd6a9fe4 ("batman-adv: send announcement when backbone gw is registered")

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261123171827.3294525-2-sw%40simonwunderlich.de
Technical Details
Message-ID: <179554083850.3135.5611010478427382077@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370608-linux-kernel-netdev=dewy.ru
References: <20261123171827.3294525-5-sw@simonwunderlich.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370608-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 04/15] batman-adv: bla: register own backbone gw
 when claiming for local node
Date: Tue, 24 Nov 2026 17:20:38 +0000
Organization: Usenet Network
Message-ID: <179554083850.3135.5611010478427382077@kernel.org>
References: <20261123171827.3294525-5-sw@simonwunderlich.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="4188604"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:+O0e4tzgA593ej29MXYN0B1Ipuw= sha256:E1abJLiFusHjlYTTWHkznp+1QJN7hxImBSF0+KkICWY=
	sha1:5KWRI1z1f/y7nHl0hy3sRI9PeSg= sha256:r2420lB/ACGpdqbtBEQj+JYZWBRMLVzMafIfwGpPVqM=
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 EA65B125E2E; Tue, 24 Nov 2026 20:20:59 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	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=kernel.org
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 4pY3bGxjjybo;
	Tue, 24 Nov 2026 20:20:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-370608-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id D1FAA125E29; Tue, 24 Nov 2026 20:20:46 +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 2A76F241E8; Tue, 24 Nov 2026 17:20:41 +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=1795540840;
	b=oXypRh8f9Ysj9saf3EzspaS2cpffhiRhjuieItGr1F8Ajq7HwYtQMjbaQMXckomdAsPc
	 /HYN1r27jMfiqP2t1ArJXGRMUZNZLmJQBW1BpTJXWFhEK5gZikzsb1nGqGvr9uNHJhN+R
	 AubWzQgQCL1l0tj6jC3oqjprr7N/7pwvZbNklmnMtaoH/gVfGjUQiWohE3T3H3RxBy1X0
	 juLwizVQVApfbKLpo5FGogqgmaLtpDEzj8EYJKLzDO+QsuEDnO9l/PDTUMXQG2rZYRle5
	 vDQPQFGZzJHd9Krq3QmZD7jfXcZZ4vQhABPmf2K4pmmrZuiwBGNlkeTKh/mty+eQRPw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795540840;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=FUK8eWr2NDwVWOIiPWW2mhsPXB2tXYeP2xK491Ae/Us=;
	b=4xVh6kUmdmQ/mGy/pbzihuk8N9z/RAYK0FDr3YmhAN/HO/KQTxBC5L05nkzreH2aseWt
	 tWFs+35VMg2KK0s4mBxtJnxZYllVis61IqLo8GxJ/2cpo24UohqKlPphEXuexYeCUsWKq
	 6FBBILBy0fUCqMEHDEX8HtaFrVDj6Hak7JlqV1GnpXyYenYJVRfztPd+M1VJSF/E9KGLO
	 imxLA2ZVKpElIXdzZIr4WhMQsmSP604qZKiqF7yWEQhiPvj3M4Hd/twfanPf87/umdegx
	 NjWr/8R5KB2cGMGykAxZRxcC99wnwMqkrn/WWe3/O+tUw1mCfp1mGJffexn8UTkeRjg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aOsFhM4I;
	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 7AB74606A326;
	Tue, 24 Nov 2026 17:20:40 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aOsFhM4I
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795540839;
	b=Fn/5ihBaFKNNFq5dicWDTym7MdmoIJN7twQF6VdmNUPZTnKg47EclKdScGRs0IQ0JqCQ
	 9TSI3rcCpylaiWH5Dtw+X+ZIv5FSYC1gCkrB7bjm019Y8P7gjYvm8c+oein45QG86IGc4
	 bV6oiC9EzO7Hpe1WqffZbFYhSdpFAXqKpxUnFhk6em02zlAqQtOVajhonwFOM8qza/k7Y
	 2re3g2QGYaFpGtObz7LelE1PyT2FWSi55rZ/PiKjcSo4L5CvwkMa2b4QAAUpS1M7EmfEZ
	 JMAgPx7+veCR/TD3+CkVRI6UquWJhDF3KJ++TJDm3XpayqOi4RNUdFRhmCiR+5adxxA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795540839;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=FUK8eWr2NDwVWOIiPWW2mhsPXB2tXYeP2xK491Ae/Us=;
	b=4fjpRZzjtx76Ro49fXGta4Albim1L96ROuTcRaiqYYtzEq0jhV6y0Hq1ut5bKUFTU9Dm
	 rI01leSwsMfSVHglgNuaqkdJZtYTWcAFCXvdAhhY/LC77GVhd1ylttpT+oFC/1mfcdIm2
	 Z8Mk435ku3vVXW/zRueG2zKSVPLYmhxlokHlIbc0lXvvEgXRxClKvS8tUX+MRkFMgAt6R
	 tWC1AVxr+mINB5Pd0yABpe90XOKMlLxTalHiRe4S/nf+u2a8px2Rh9v6memalEhyGod6f
	 x0fMOrvqMYQjyesvUlIi4cadHAblk6dkTYmG18VHibIeMWXTGQeXR0WsUlzPUCKRgwg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aOsFhM4I;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B7BD606A329
	for <netdev@vger.kernel.org>; Tue, 24 Nov 2026 17:20:39 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E83E71F000D2;
	Tue, 24 Nov 2026 17:20:38 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795540839;
	bh=FUK8eWr2NDwVWOIiPWW2mhsPXB2tXYeP2xK491Ae/Us=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=aOsFhM4IzJ/6vH5lymBfEfHvbRwNjxJ9y7HK+CRJ1dFcu/bP9p2hWaq4r/YCx4F3+
	 u7qu12tcuWPd/H41TbsLiousWPl7hUoqFW1IQhM49qkL994Z+uxlxartH4MGCJOA2j
	 97bNJ25PUWbU1l0sfIbW+DHwsER8eXv6HySxNamQ0VVitotkFTER66BpGoTEwDYi1/
	 IGHn9ZH31hBeqG/yYTlnVdMrKg8cHIoIiW2a4mjFwPOvUsVdsdZY1g5270Sto09Rn7
	 BidzR1OxLsZ2X6aoQ1AJOWivIN89y/p1bqrIgnD2llz6ygQC9Pldnl8aS0hh+AfhKA
	 ygzrrNNljLRZw==
X-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
X-In-Reply-To: <20261123171827.3294525-5-sw@simonwunderlich.de>
X-sashiko-severity: Low
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