[PATCH 4/9] batctl: tcpdump: resolve bat-host name for ROAMv1 client
Sven Eckelmann <[email protected]> Sun, 05 Jul 2026 19:30:07 +0200
| Newsgroups | org.open-mesh.lists.batman |
|---|---|
| Message-ID | <[email protected]> |
Every packet parser in tcpdump forwards its read_opt argument to
get_name_by_macaddr(), which only consults the bat-hosts table when
read_opt carries USE_BAT_HOSTS. This was (without reason) not done in the
TVLV ROAMv1 parser and the NO_FLAGS is hardcoded for the
get_name_by_macaddr().
Just forward the read_opts flags like in all other functions to have the
same user experience.
Fixes: 4c39fb823b86 ("batctl: tcpdump - parse TVLV containers")
Signed-off-by: Sven Eckelmann <[email protected]>
---
tcpdump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tcpdump.c b/tcpdump.c
index b6305fd..b01581e 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -202,7 +202,7 @@ static void batctl_tvlv_parse_tt_v1(void *buff, ssize_t buff_len,
}
static void batctl_tvlv_parse_roam_v1(void *buff, ssize_t buff_len,
- int read_opt __maybe_unused)
+ int read_opt)
{
struct batadv_tvlv_roam_adv *tvlv = buff;
@@ -214,7 +214,7 @@ static void batctl_tvlv_parse_roam_v1(void *buff, ssize_t buff_len,
}
printf("\tTVLV ROAMv1: client %s, VLAN ID %d\n",
- get_name_by_macaddr((struct ether_addr *)tvlv->client, NO_FLAGS),
+ get_name_by_macaddr((struct ether_addr *)tvlv->client, read_opt),
BATADV_PRINT_VID(ntohs(tvlv->vid)));
}
--
2.47.3