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.

Signed-off-by: Sven Eckelmann <[email protected]>
---
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,
-- 
Sven Eckelmann <[email protected]>

Reply via email to