[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454973279-9170-18-git-send-email-razor@blackwall.org>
Date: Tue, 9 Feb 2016 00:14:35 +0100
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: roopa@...ulusnetworks.com, stephen@...workplumber.org,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: [PATCH iproute2 v2 17/21] iplink: bridge: add support for IFLA_BR_MCAST_QUERIER_INTVL
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
This patch implements support for the IFLA_BR_MCAST_QUERIER_INTVL
attribute in iproute2 so it can change the querier interval.
Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
---
ip/iplink_bridge.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index fbac442f4402..1138e6ee7599 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
@@ -43,6 +43,7 @@ static void print_explain(FILE *f)
" [ mcast_startup_query_count STARTUP_QUERY_COUNT ]\n"
" [ mcast_last_member_interval LAST_MEMBER_INTERVAL ]\n"
" [ mcast_membership_interval MEMBERSHIP_INTERVAL ]\n"
+ " [ mcast_querier_interval QUERIER_INTERVAL ]\n"
"\n"
"Where: VLAN_PROTOCOL := { 802.1Q | 802.1ad }\n"
);
@@ -244,6 +245,17 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
}
addattr64(n, 1024, IFLA_BR_MCAST_MEMBERSHIP_INTVL,
mcast_membership_intvl);
+ } else if (matches(*argv, "mcast_querier_interval") == 0) {
+ __u64 mcast_querier_intvl;
+
+ NEXT_ARG();
+ if (get_u64(&mcast_querier_intvl, *argv, 0)) {
+ invarg("invalid mcast_querier_interval",
+ *argv);
+ return -1;
+ }
+ addattr64(n, 1024, IFLA_BR_MCAST_QUERIER_INTVL,
+ mcast_querier_intvl);
} else if (matches(*argv, "help") == 0) {
explain();
return -1;
@@ -421,6 +433,10 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_BR_MCAST_MEMBERSHIP_INTVL])
fprintf(f, "mcast_membership_interval %llu ",
rta_getattr_u64(tb[IFLA_BR_MCAST_MEMBERSHIP_INTVL]));
+
+ if (tb[IFLA_BR_MCAST_QUERIER_INTVL])
+ fprintf(f, "mcast_querier_interval %llu ",
+ rta_getattr_u64(tb[IFLA_BR_MCAST_QUERIER_INTVL]));
}
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
--
2.4.3
Powered by blists - more mailing lists