B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC batadv v2 0/5] batman-adv: allow to specify limits for remote learned objects
@ 2026-05-19  7:02 Sven Eckelmann
  2026-05-19  7:02 ` [PATCH RFC batadv v2 1/5] batman-adv: limit numbers of parallel learned neighbors Sven Eckelmann
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Sven Eckelmann @ 2026-05-19  7:02 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

There are some concerns that an external entity could spam the batman-adv
related interfaces with random mac addresses. The batman-adv would use more
and more resources to safe things like neighbors, originators, TT, ... and
would at some point run out of resources.

One idea is to limit the number of entries for each resource type could
have. Things which might need limits

* orig_node
* neigh_node
* tt_local_entry
* dat_entry
* bla_backbone_gw
* bla_claim

Things which are limited by other things (maybe)

* hardif_neigh_node
* gw_node
* orig_node_vlan
* orig_info

Unknown how to handle overly large tt_global_entries:

* tt_global_entry

This approach is also used for the bridge since commit bdb4dfda3b41 ("net:
bridge: Track and limit dynamically learned FDB entries"). And it is also
disabled by default.

For the moment, I just want to demonstrate how this might work with some
example code. I didn't invest any time to actually check out the other
items in the list. So, please consider these lists as vague suggestions.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
Changes in v2:
- rebase patches
- Link to v1: https://patch.msgid.link/20260516-resource-limit-v1-0-6f597360ed2b@narfation.org

---
Sven Eckelmann (5):
      batman-adv: limit numbers of parallel learned neighbors
      batman-adv: limit numbers of parallel learned originators
      batman-adv: limit numbers of parallel learned DAT entries
      batman-adv: limit numbers of parallel learned BLA backbones
      batman-adv: limit numbers of parallel learned BLA claims

 include/uapi/linux/batman_adv.h        | 30 ++++++++++++++++++++
 net/batman-adv/bat_iv_ogm.c            | 13 ++++++++-
 net/batman-adv/bat_v_ogm.c             | 11 ++++++++
 net/batman-adv/bridge_loop_avoidance.c | 22 +++++++++++++++
 net/batman-adv/distributed-arp-table.c | 11 ++++++++
 net/batman-adv/mesh-interface.c        | 15 ++++++++++
 net/batman-adv/netlink.c               | 51 ++++++++++++++++++++++++++++++++++
 net/batman-adv/originator.c            | 14 ++++++++++
 net/batman-adv/types.h                 | 30 ++++++++++++++++++++
 9 files changed, 196 insertions(+), 1 deletion(-)
---
base-commit: ff182fc0c666754e3f35f7b63c9ccf0dff239e52
change-id: 20260516-resource-limit-5c1a32898f7c

Best regards,
--  
Sven Eckelmann <sven@narfation.org>


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

end of thread, other threads:[~2026-05-20  8:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19  7:02 [PATCH RFC batadv v2 0/5] batman-adv: allow to specify limits for remote learned objects Sven Eckelmann
2026-05-19  7:02 ` [PATCH RFC batadv v2 1/5] batman-adv: limit numbers of parallel learned neighbors Sven Eckelmann
2026-05-19  7:02 ` [PATCH RFC batadv v2 2/5] batman-adv: limit numbers of parallel learned originators Sven Eckelmann
2026-05-19  7:02 ` [PATCH RFC batadv v2 3/5] batman-adv: limit numbers of parallel learned DAT entries Sven Eckelmann
2026-05-19  7:02 ` [PATCH RFC batadv v2 4/5] batman-adv: limit numbers of parallel learned BLA backbones Sven Eckelmann
2026-05-19  9:10   ` Sven Eckelmann
2026-05-20  8:16   ` Simon Wunderlich
2026-05-19  7:02 ` [PATCH RFC batadv v2 5/5] batman-adv: limit numbers of parallel learned BLA claims Sven Eckelmann
2026-05-19  8:37 ` [PATCH RFC batadv v2 0/5] batman-adv: allow to specify limits for remote learned objects Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox