Skip to contentSkip to conversation

batctl: add vlan_dyn_max command

RFC PATCH New Linus Lüssing 1 participant 1 message Dec 2, 2024 Kbuild

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 batctl: add vlan_dyn_max command

This adds a vlan_dyn_max command to get and set the maximum number of allowed learned VLANs from bridged-in clients in batman-adv.

Still TODO: Documentation in README and manpage.

---
Posting this as a quick RFC for now as it probably doesn't make sense to expose/advertise this setting yet as long as there are still issues with a setting >0 while BLA is enabled?

---
 Makefile       |   1 +
 batman_adv.h   |   6 +++
 netlink.c      |   3 ++
 vlan_dyn_max.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 vlan_dyn_max.c
Makefile +1 -0
index 92f84e5bf012..5f6a703acc36 100755
@@ -86,6 +86,7 @@ $(eval $(call add_command,translate,y))
 $(eval $(call add_command,translocal,y))
 $(eval $(call add_command,transtable_global_json,y))
 $(eval $(call add_command,transtable_local_json,y))
+$(eval $(call add_command,vlan_dyn_max,y))
 $(eval $(call add_command,vlan_json,y))
 
 MANPAGE = man/batctl.8
batman_adv.h +6 -0
index 9498ccb09d67..d93f5b0fbdd6 100644
@@ -481,6 +481,12 @@ enum batadv_nl_attrs {
 	 */
 	BATADV_ATTR_MULTICAST_FANOUT,
 
+	/**
+	 * @BATADV_ATTR_VLAN_DYN_MAX: defines the maximum number of allowed
+	 * learned VLANs from bridged-in clients.
+	 */
+	BATADV_ATTR_VLAN_DYN_MAX,
+
 	/* add attributes above here, update the policy in netlink.c */
 
 	/**
netlink.c +3 -0
index e92fa8003d3b..9cd5eca507db 100644
@@ -231,6 +231,9 @@ struct nla_policy batadv_netlink_policy[NUM_BATADV_ATTR] = {
 	[BATADV_ATTR_MULTICAST_FANOUT] = {
 		.type = NLA_U32,
 	},
+	[BATADV_ATTR_VLAN_DYN_MAX] = {
+		.type = NLA_U16,
+	},
 };
 
 int netlink_create(struct state *state)
vlan_dyn_max.c new file +100 -0

100 lines not on this page · raw message

Signature · 1 line
2.45.2