batctl: add vlan_dyn_max command
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.
Signed-off-by Linus Lüssing <[email protected]>
---
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
@@ -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
@@ -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
@@ -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