b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] batctl: Minor netlink related bug fixes
@ 2025-08-03  6:46 Sven Eckelmann
  2025-08-03  6:48 ` [PATCH 1/2] batctl: event: Fix direct parsing on hardif for set_hardif Sven Eckelmann
  2025-08-03  6:49 ` [PATCH 2/2] batctl: Avoid memory leak in print_routing_algos Sven Eckelmann
  0 siblings, 2 replies; 3+ messages in thread
From: Sven Eckelmann @ 2025-08-03  6:46 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

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 <sven@narfation.org>
---
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 <sven@narfation.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-03  6:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-03  6:46 [PATCH 0/2] batctl: Minor netlink related bug fixes Sven Eckelmann
2025-08-03  6:48 ` [PATCH 1/2] batctl: event: Fix direct parsing on hardif for set_hardif Sven Eckelmann
2025-08-03  6:49 ` [PATCH 2/2] batctl: Avoid memory leak in print_routing_algos Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).