iplink: bridge: add support for IFLA_BR_MCAST_QUERY_INTVL
This patch implements support for the IFLA_BR_MCAST_QUERY_INTVL attribute in iproute2 so it can change the query interval. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
This commit is contained in:
parent
1f2244b851
commit
5a32388f5c
|
|
@ -44,6 +44,7 @@ static void print_explain(FILE *f)
|
||||||
" [ mcast_last_member_interval LAST_MEMBER_INTERVAL ]\n"
|
" [ mcast_last_member_interval LAST_MEMBER_INTERVAL ]\n"
|
||||||
" [ mcast_membership_interval MEMBERSHIP_INTERVAL ]\n"
|
" [ mcast_membership_interval MEMBERSHIP_INTERVAL ]\n"
|
||||||
" [ mcast_querier_interval QUERIER_INTERVAL ]\n"
|
" [ mcast_querier_interval QUERIER_INTERVAL ]\n"
|
||||||
|
" [ mcast_query_interval QUERY_INTERVAL ]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Where: VLAN_PROTOCOL := { 802.1Q | 802.1ad }\n"
|
"Where: VLAN_PROTOCOL := { 802.1Q | 802.1ad }\n"
|
||||||
);
|
);
|
||||||
|
|
@ -256,6 +257,17 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
|
||||||
}
|
}
|
||||||
addattr64(n, 1024, IFLA_BR_MCAST_QUERIER_INTVL,
|
addattr64(n, 1024, IFLA_BR_MCAST_QUERIER_INTVL,
|
||||||
mcast_querier_intvl);
|
mcast_querier_intvl);
|
||||||
|
} else if (matches(*argv, "mcast_query_interval") == 0) {
|
||||||
|
__u64 mcast_query_intvl;
|
||||||
|
|
||||||
|
NEXT_ARG();
|
||||||
|
if (get_u64(&mcast_query_intvl, *argv, 0)) {
|
||||||
|
invarg("invalid mcast_query_interval",
|
||||||
|
*argv);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
addattr64(n, 1024, IFLA_BR_MCAST_QUERY_INTVL,
|
||||||
|
mcast_query_intvl);
|
||||||
} else if (matches(*argv, "help") == 0) {
|
} else if (matches(*argv, "help") == 0) {
|
||||||
explain();
|
explain();
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -437,6 +449,10 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
|
||||||
if (tb[IFLA_BR_MCAST_QUERIER_INTVL])
|
if (tb[IFLA_BR_MCAST_QUERIER_INTVL])
|
||||||
fprintf(f, "mcast_querier_interval %llu ",
|
fprintf(f, "mcast_querier_interval %llu ",
|
||||||
rta_getattr_u64(tb[IFLA_BR_MCAST_QUERIER_INTVL]));
|
rta_getattr_u64(tb[IFLA_BR_MCAST_QUERIER_INTVL]));
|
||||||
|
|
||||||
|
if (tb[IFLA_BR_MCAST_QUERY_INTVL])
|
||||||
|
fprintf(f, "mcast_query_interval %llu ",
|
||||||
|
rta_getattr_u64(tb[IFLA_BR_MCAST_QUERY_INTVL]));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
|
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue