[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1455635335-9973-5-git-send-email-razor@blackwall.org>
Date: Tue, 16 Feb 2016 16:08:54 +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 4/5] iplink: bridge_slave: add support for IFLA_BRPORT_MULTICAST_ROUTER
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Add support to be able to view and change IFLA_BRPORT_MULTICAST_ROUTER port
attribute.
Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
---
ip/iplink_bridge_slave.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ip/iplink_bridge_slave.c b/ip/iplink_bridge_slave.c
index 68d140894529..16b364f6bdce 100644
--- a/ip/iplink_bridge_slave.c
+++ b/ip/iplink_bridge_slave.c
@@ -31,6 +31,7 @@ static void print_explain(FILE *f)
" [ flood {on | off} ]\n"
" [ proxy_arp {on | off} ]\n"
" [ proxy_arp_wifi {on | off} ]\n"
+ " [ mcast_router MULTICAST_ROUTER ]\n"
);
}
@@ -177,6 +178,10 @@ static void bridge_slave_print_opt(struct link_util *lu, FILE *f,
if (tb[IFLA_BRPORT_PROXYARP_WIFI])
print_onoff(f, "proxy_arp_wifi",
rta_getattr_u8(tb[IFLA_BRPORT_PROXYARP_WIFI]));
+
+ if (tb[IFLA_BRPORT_MULTICAST_ROUTER])
+ fprintf(f, "mcast_router %u ",
+ rta_getattr_u8(tb[IFLA_BRPORT_MULTICAST_ROUTER]));
}
static void bridge_slave_parse_on_off(char *arg_name, char *arg_val,
@@ -249,6 +254,14 @@ static int bridge_slave_parse_opt(struct link_util *lu, int argc, char **argv,
NEXT_ARG();
bridge_slave_parse_on_off("proxy_arp_wifi", *argv, n,
IFLA_BRPORT_PROXYARP_WIFI);
+ } else if (matches(*argv, "mcast_router") == 0) {
+ __u8 mcast_router;
+
+ NEXT_ARG();
+ if (get_u8(&mcast_router, *argv, 0))
+ invarg("invalid mcast_router", *argv);
+ addattr8(n, 1024, IFLA_BRPORT_MULTICAST_ROUTER,
+ mcast_router);
} else if (matches(*argv, "help") == 0) {
explain();
return -1;
--
2.4.3
Powered by blists - more mailing lists