[PATCH 2/2] alfred: don't stop translation table dump after first entry

Sven Eckelmann <[email protected]> Tue, 28 Jul 2026 19:26:19 +0200
Newsgroups org.open-mesh.lists.batman
Message-ID <[email protected]>
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 <[email protected]>
---
 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