mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-25 03:06:26 +00:00
iplink: bridge: add support for IFLA_BR_MCAST_LAST_MEMBER_INTVL
This patch implements support for the IFLA_BR_MCAST_LAST_MEMBER_INTVL attribute in iproute2 so it can change the last member interval. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
This commit is contained in:
parent
ceb6486655
commit
10082a253f
@ -41,6 +41,7 @@ static void print_explain(FILE *f)
|
||||
" [ mcast_hash_max HASH_MAX ]\n"
|
||||
" [ mcast_last_member_count LAST_MEMBER_COUNT ]\n"
|
||||
" [ mcast_startup_query_count STARTUP_QUERY_COUNT ]\n"
|
||||
" [ mcast_last_member_interval LAST_MEMBER_INTERVAL ]\n"
|
||||
"\n"
|
||||
"Where: VLAN_PROTOCOL := { 802.1Q | 802.1ad }\n"
|
||||
);
|
||||
@ -221,6 +222,16 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
|
||||
|
||||
addattr32(n, 1024, IFLA_BR_MCAST_STARTUP_QUERY_CNT,
|
||||
mcast_sqc);
|
||||
} else if (matches(*argv, "mcast_last_member_interval") == 0) {
|
||||
__u64 mcast_last_member_intvl;
|
||||
|
||||
NEXT_ARG();
|
||||
if (get_u64(&mcast_last_member_intvl, *argv, 0))
|
||||
invarg("invalid mcast_last_member_interval",
|
||||
*argv);
|
||||
|
||||
addattr64(n, 1024, IFLA_BR_MCAST_LAST_MEMBER_INTVL,
|
||||
mcast_last_member_intvl);
|
||||
} else if (matches(*argv, "help") == 0) {
|
||||
explain();
|
||||
return -1;
|
||||
@ -390,6 +401,10 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
|
||||
if (tb[IFLA_BR_MCAST_STARTUP_QUERY_CNT])
|
||||
fprintf(f, "mcast_startup_query_count %u ",
|
||||
rta_getattr_u32(tb[IFLA_BR_MCAST_STARTUP_QUERY_CNT]));
|
||||
|
||||
if (tb[IFLA_BR_MCAST_LAST_MEMBER_INTVL])
|
||||
fprintf(f, "mcast_last_member_interval %llu ",
|
||||
rta_getattr_u64(tb[IFLA_BR_MCAST_LAST_MEMBER_INTVL]));
|
||||
}
|
||||
|
||||
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user