|
|
4aca6e |
From fe330edb2a14d72af6175027c00b19c336501c6c Mon Sep 17 00:00:00 2001
|
|
|
4aca6e |
From: Phil Sutter <psutter@redhat.com>
|
|
|
4aca6e |
Date: Tue, 28 Feb 2017 16:12:01 +0100
|
|
|
4aca6e |
Subject: [PATCH] iplink: bridge: add support for IFLA_BR_MCAST_QUERIER
|
|
|
4aca6e |
|
|
|
4aca6e |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
|
|
|
4aca6e |
Upstream Status: iproute2.git commit 0778b741225a5
|
|
|
4aca6e |
|
|
|
4aca6e |
commit 0778b741225a51bb6d72fe42683267e86bc31215
|
|
|
4aca6e |
Author: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
|
4aca6e |
Date: Tue Feb 9 00:14:28 2016 +0100
|
|
|
4aca6e |
|
|
|
4aca6e |
iplink: bridge: add support for IFLA_BR_MCAST_QUERIER
|
|
|
4aca6e |
|
|
|
4aca6e |
This patch implements support for the IFLA_BR_MCAST_QUERIER attribute
|
|
|
4aca6e |
in iproute2 so it can toggle the mcast querier value.
|
|
|
4aca6e |
|
|
|
4aca6e |
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
|
4aca6e |
---
|
|
|
4aca6e |
ip/iplink_bridge.c | 13 +++++++++++++
|
|
|
4aca6e |
1 file changed, 13 insertions(+)
|
|
|
4aca6e |
|
|
|
4aca6e |
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
|
|
|
4aca6e |
index 7b2bba8..620a9f9 100644
|
|
|
4aca6e |
--- a/ip/iplink_bridge.c
|
|
|
4aca6e |
+++ b/ip/iplink_bridge.c
|
|
|
4aca6e |
@@ -36,6 +36,7 @@ static void print_explain(FILE *f)
|
|
|
4aca6e |
" [ mcast_snooping MULTICAST_SNOOPING ]\n"
|
|
|
4aca6e |
" [ mcast_router MULTICAST_ROUTER ]\n"
|
|
|
4aca6e |
" [ mcast_query_use_ifaddr MCAST_QUERY_USE_IFADDR ]\n"
|
|
|
4aca6e |
+ " [ mcast_querier MULTICAST_QUERIER ]\n"
|
|
|
4aca6e |
"\n"
|
|
|
4aca6e |
"Where: VLAN_PROTOCOL := { 802.1Q | 802.1ad }\n"
|
|
|
4aca6e |
);
|
|
|
4aca6e |
@@ -175,6 +176,14 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
|
|
|
4aca6e |
|
|
|
4aca6e |
addattr8(n, 1024, IFLA_BR_MCAST_QUERY_USE_IFADDR,
|
|
|
4aca6e |
mcast_qui);
|
|
|
4aca6e |
+ } else if (matches(*argv, "mcast_querier") == 0) {
|
|
|
4aca6e |
+ __u8 mcast_querier;
|
|
|
4aca6e |
+
|
|
|
4aca6e |
+ NEXT_ARG();
|
|
|
4aca6e |
+ if (get_u8(&mcast_querier, *argv, 0))
|
|
|
4aca6e |
+ invarg("invalid mcast_querier", *argv);
|
|
|
4aca6e |
+
|
|
|
4aca6e |
+ addattr8(n, 1024, IFLA_BR_MCAST_QUERIER, mcast_querier);
|
|
|
4aca6e |
} else if (matches(*argv, "help") == 0) {
|
|
|
4aca6e |
explain();
|
|
|
4aca6e |
return -1;
|
|
|
4aca6e |
@@ -324,6 +333,10 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
|
|
|
4aca6e |
if (tb[IFLA_BR_MCAST_QUERY_USE_IFADDR])
|
|
|
4aca6e |
fprintf(f, "mcast_query_use_ifaddr %u ",
|
|
|
4aca6e |
rta_getattr_u8(tb[IFLA_BR_MCAST_QUERY_USE_IFADDR]));
|
|
|
4aca6e |
+
|
|
|
4aca6e |
+ if (tb[IFLA_BR_MCAST_QUERIER])
|
|
|
4aca6e |
+ fprintf(f, "mcast_querier %u ",
|
|
|
4aca6e |
+ rta_getattr_u8(tb[IFLA_BR_MCAST_QUERIER]));
|
|
|
4aca6e |
}
|
|
|
4aca6e |
|
|
|
4aca6e |
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
|
|
|
4aca6e |
--
|
|
|
4aca6e |
1.8.3.1
|
|
|
4aca6e |
|