[PATCH batadv v4 0/4] batman-adv: collected fixes (Yuan Tan)

Sven Eckelmann <[email protected]>
Newsgroups org.open-mesh.lists.batman
Message-ID <[email protected]>
I was contacted by Yuan Tan regarding some of the problems which were found
by them. I've proposed to go through the list and prepare changes for
things which looked sensible. I've also prepared some PoC patches (lets
call it part2) - just so Antonio+Simon+Marek can discuss about them
internally.

The ones which don't need further discussion are shown in this patchset.
For the others, I am waiting on the results of the internal discussion.

It is more than likely that there will be updates to these patches because
the team around Yuan Tan need to verify that these are actually working.

Thanks to Yuan Tan, Yifan Wu, Juefei Pu, Xin Liu and all the other people
involved in finding + fixing these bugs.

Signed-off-by: Sven Eckelmann <[email protected]>
---
Changes in v4:
- always update length in batadv_tvlv_realloc_packet_buff()
- fix allocation size in batadv_tvlv_realloc_packet_buff()
- reorder TVLV fixes to first reject failed TVLV appends and only then
  handle check for oversized TVLVs
- fall back to non-TVLV version in case batadv_tvlv_container_ogm_append()
  failed for B.A.T.M.A.N. IV - see
  https://patch.msgid.link/20260515-bat_iv-own-fwd-failure-recover-v1-1-caa171e7d59e@narfation.org
  for an idea how to handle it differently
- Link to v3: https://patch.msgid.link/[email protected]

Changes in v3:
- drop applied patches 1-3
- add patch to return errors in batadv_tvlv_container_ogm_append()
- add patch to avoid reallocating the ogm buffer for each send ogm (this is
  actually a feature and should not be added for net.git)
- Link to v2: https://patch.msgid.link/[email protected]

Changes in v2:
- add role checks in all tp_meter functions
- free skb in batadv_v_ogm_queue_on_if
- propagate bat_priv from batadv_v_ogm_queue_on_if to batadv_v_ogm_send_to_if
- Link to v1: https://patch.msgid.link/[email protected]

---
Sven Eckelmann (4):
      batman-adv: v: stop OGMv2 on disabled interface
      batman-adv: tvlv: abort OGM send on tvlv append failure
      batman-adv: tvlv: reject oversized TVLV packets
      batman-adv: tvlv: avoid unnecessary OGM buffer reallocations

 net/batman-adv/bat_iv_ogm.c | 47 ++++++++++++++----------
 net/batman-adv/bat_v_ogm.c  | 73 ++++++++++++++++++++-----------------
 net/batman-adv/tvlv.c       | 88 ++++++++++++++++++++++++++++-----------------
 net/batman-adv/tvlv.h       |  5 ++-
 net/batman-adv/types.h      | 31 ++++++++++------
 5 files changed, 149 insertions(+), 95 deletions(-)
---
base-commit: 724c381c1dcd0f0682ba36909ca6b843d11d3c2f
change-id: 20260509-yuantan098-bugfixes-feb66522feb6

Best regards,
--  
Sven Eckelmann <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.