From 61a81751cb25ce21c1daca887b8f0fb5d5a412ab Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Tue, 28 Feb 2017 12:22:06 +0100
Subject: [PATCH] iplink: bridge_slave: add support for IFLA_BRPORT_PROXYARP
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1374360
Upstream Status: iproute2.git commit f6e615dec9ee9
Conflicts: Context changes due to previously backported mcast_router and
mcast_fast_leave attributes.
commit f6e615dec9ee9b688308e85a03a51125a9c9fdb9
Author: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date: Tue Feb 16 16:08:52 2016 +0100
iplink: bridge_slave: add support for IFLA_BRPORT_PROXYARP
Add support to be able to view and change IFLA_BRPORT_PROXYARP port
attribute.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
ip/iplink_bridge_slave.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ip/iplink_bridge_slave.c b/ip/iplink_bridge_slave.c
index 66c3a00..5a84948 100644
--- a/ip/iplink_bridge_slave.c
+++ b/ip/iplink_bridge_slave.c
@@ -29,6 +29,7 @@ static void print_explain(FILE *f)
" [ root_block {on | off} ]\n"
" [ learning {on | off} ]\n"
" [ flood {on | off} ]\n"
+ " [ proxy_arp {on | off} ]\n"
" [ mcast_router MULTICAST_ROUTER ]\n"
" [ mcast_fast_leave {on | off} ]\n"
);
@@ -101,6 +102,10 @@ static void bridge_slave_print_opt(struct link_util *lu, FILE *f,
print_onoff(f, "flood",
rta_getattr_u8(tb[IFLA_BRPORT_UNICAST_FLOOD]));
+ if (tb[IFLA_BRPORT_PROXYARP])
+ print_onoff(f, "proxy_arp",
+ rta_getattr_u8(tb[IFLA_BRPORT_PROXYARP]));
+
if (tb[IFLA_BRPORT_MULTICAST_ROUTER])
fprintf(f, "mcast_router %u ",
rta_getattr_u8(tb[IFLA_BRPORT_MULTICAST_ROUTER]));
@@ -172,6 +177,10 @@ static int bridge_slave_parse_opt(struct link_util *lu, int argc, char **argv,
NEXT_ARG();
bridge_slave_parse_on_off("flood", *argv, n,
IFLA_BRPORT_UNICAST_FLOOD);
+ } else if (matches(*argv, "proxy_arp") == 0) {
+ NEXT_ARG();
+ bridge_slave_parse_on_off("proxy_arp", *argv, n,
+ IFLA_BRPORT_PROXYARP);
} else if (matches(*argv, "mcast_router") == 0) {
__u8 mcast_router;
--
1.8.3.1