B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC batadv 0/5] batman-adv: allow to specify limits for remote learned objects
@ 2026-05-16 12:35 Sven Eckelmann
  2026-05-16 12:35 ` [PATCH RFC batadv 1/5] batman-adv: limit numbers of parallel learned neighbors Sven Eckelmann
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Sven Eckelmann @ 2026-05-16 12:35 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>
---
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: 7700c90cbd12d04b8aabb62fe031ce6b31d6a4d9
change-id: 20260516-resource-limit-5c1a32898f7c

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


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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16 12:35 [PATCH RFC batadv 0/5] batman-adv: allow to specify limits for remote learned objects Sven Eckelmann
2026-05-16 12:35 ` [PATCH RFC batadv 1/5] batman-adv: limit numbers of parallel learned neighbors Sven Eckelmann
2026-05-16 12:35 ` [PATCH RFC batadv 2/5] batman-adv: limit numbers of parallel learned originators Sven Eckelmann
2026-05-16 12:35 ` [PATCH RFC batadv 3/5] batman-adv: limit numbers of parallel learned DAT entries Sven Eckelmann
2026-05-16 12:35 ` [PATCH RFC batadv 4/5] batman-adv: limit numbers of parallel learned BLA backbones Sven Eckelmann
2026-05-16 12:35 ` [PATCH RFC batadv 5/5] batman-adv: limit numbers of parallel learned BLA claims Sven Eckelmann
2026-05-17 17:43 ` [PATCH RFC batadv 0/5] batman-adv: allow to specify limits for remote learned objects Linus Lüssing

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