Skip to content

batctl: Minor netlink related bug fixes

Sven Eckelmann batman 1 version New

Get series with b4
b4 am [email protected] change-id 20250803-various-bugfixes-090544ff7199

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2batctl: event: Fix direct parsing on hardif for set_hardifevent.c+1 -10 replies
2/2batctl: Avoid memory leak in print_routing_algosrouting_algo.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] batctl: Minor netlink related bug fixes

The code to get the hard interface name for an even was accidentally checking for BATADV_ATTR_MESH_IFNAME instead of BATADV_ATTR_HARD_IFNAME. As result, the fallback code was always used when BATADV_ATTR_MESH_IFNAME would have not been available.

Luckily, at the moment, BATADV_ATTR_HARD_IFNAME is always available when BATADV_ATTR_MESH_IFNAME is set BATADV_CMD_SET_HARDIF events.

The opts.remaining_header string is alocated before the netlink callback object is created. But the callback object allocation can fail and the function will return in this case. To fix this, either the string buffer must be freed in this case or the opts.remaining_header allocation can simply be moved to a later point.

---
Sven Eckelmann (2):
batctl: event: Fix direct parsing on hardif for set_hardif
batctl: Avoid memory leak in print_routing_algos

 event.c        | 2 +-
 routing_algo.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

---
base-commit: e690b207753a122eb30b8eaf8b504c81b9178b79
change-id: 20250803-various-bugfixes-090544ff7199

Best regards,

Signature · 1 line
Sven Eckelmann <[email protected]>