B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@narfation.org>
Subject: [PATCH 2/2] alfred: don't stop translation table dump after first entry
Date: Tue, 28 Jul 2026 19:26:19 +0200	[thread overview]
Message-ID: <20260728-bugfixes-netlink-v1-2-d338671f316b@narfation.org> (raw)
In-Reply-To: <20260728-bugfixes-netlink-v1-0-d338671f316b@narfation.org>

translate_mac_netlink_cb() is handling the response for
BATADV_CMD_GET_TRANSTABLE_GLOBAL dump. It returns NL_STOP and cause the
dump to be aborted.

As result, the MAC addresses of all other alfred servers could no longer be
translated to their originator address and their TQ was considered to be 0.
The selection algorithm might then not select the actual best originator
for the data sync.

Continue the dump with NL_OK to fill the translation hash with all (best)
originator entries.

Fixes: a7bc3d9a2b3f ("alfred: Cache the global translation table entries")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 batadv_querynl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/batadv_querynl.c b/batadv_querynl.c
index 199fe9d..9e372d9 100644
--- a/batadv_querynl.c
+++ b/batadv_querynl.c
@@ -79,7 +79,7 @@ static int translate_mac_netlink_cb(struct nl_msg *msg, void *arg)
 	tg_hash_add(opts->tg_hash, &mac_addr, &mac_orig);
 	opts->query_opts.err = 0;
 
-	return NL_STOP;
+	return NL_OK;
 }
 
 int translate_mac_netlink(const char *mesh_iface, struct hashtable_t *tg_hash)

-- 
2.47.3


      parent reply	other threads:[~2026-07-28 22:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 17:26 [PATCH 0/2] alfred: netlink: random fixes Sven Eckelmann
2026-07-28 17:26 ` [PATCH 1/2] alfred: import batadv_netlink_policy from batctl Sven Eckelmann
2026-07-28 17:26 ` Sven Eckelmann [this message]

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=20260728-bugfixes-netlink-v1-2-d338671f316b@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /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