[PATCH 02/28] batctl: originators: fix throughput lines with bat_hosts
Sven Eckelmann <[email protected]> Sun, 21 Jun 2026 16:23:52 +0200
| Newsgroups | org.open-mesh.lists.batman |
|---|---|
| Message-ID | <[email protected]> |
When bat_hosts is used, the output should be the same as without it. But
for B.A.T.M.A.N. V, there were two major differences:
* when no hostname was found: extra space before the nexthop neighbor
* when hostname was found: best-flag character before the hostname
Sync the implementation with the B.A.T.M.A.N. IV implementation to get rid
of the unexpected differences.
Fixes: d8dd1ff1a0fe ("batctl: Use netlink to replace some of debugfs")
Signed-off-by: Sven Eckelmann <[email protected]>
---
originators.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/originators.c b/originators.c
index 8059bdd..7f06b09 100644
--- a/originators.c
+++ b/originators.c
@@ -130,9 +130,9 @@ static int originators_callback(struct nl_msg *msg, void *arg)
throughput_mbits, throughput_kbits / 100);
bat_host = bat_hosts_find_by_mac((char *)neigh);
if (bat_host)
- printf(" %c %17s ", c, bat_host->name);
+ printf("%17s ", bat_host->name);
else
- printf(" %02x:%02x:%02x:%02x:%02x:%02x ",
+ printf("%02x:%02x:%02x:%02x:%02x:%02x ",
neigh[0], neigh[1], neigh[2],
neigh[3], neigh[4], neigh[5]);
printf("[%10s]\n", ifname);
--
2.47.3