b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@narfation.org>
Subject: [PATCH 0/2] batctl: Minor netlink related bug fixes
Date: Sun, 03 Aug 2025 08:46:54 +0200	[thread overview]
Message-ID: <20250803-various-bugfixes-v1-0-017f917ea98c@narfation.org> (raw)

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>


             reply	other threads:[~2025-08-03  6:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-03  6:46 Sven Eckelmann [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250803-various-bugfixes-v1-0-017f917ea98c@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).