netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: roopa@cumulusnetworks.com, stephen@networkplumber.org,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: [PATCH iproute2 2/5] iplink: bridge_slave: add support for IFLA_BRPORT_PROXYARP
Date: Tue, 16 Feb 2016 16:08:52 +0100	[thread overview]
Message-ID: <1455635335-9973-3-git-send-email-razor@blackwall.org> (raw)
In-Reply-To: <1455635335-9973-1-git-send-email-razor@blackwall.org>

From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

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 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ip/iplink_bridge_slave.c b/ip/iplink_bridge_slave.c
index c58f55294261..c27d71837a2f 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"
 	);
 }
 
@@ -168,6 +169,9 @@ static void bridge_slave_print_opt(struct link_util *lu, FILE *f,
 	if (tb[IFLA_BRPORT_CONFIG_PENDING])
 		fprintf(f, "config_pending %u ",
 			rta_getattr_u8(tb[IFLA_BRPORT_CONFIG_PENDING]));
+	if (tb[IFLA_BRPORT_PROXYARP])
+		print_onoff(f, "proxy_arp",
+			    rta_getattr_u8(tb[IFLA_BRPORT_PROXYARP]));
 }
 
 static void bridge_slave_parse_on_off(char *arg_name, char *arg_val,
@@ -232,6 +236,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, "help") == 0) {
 			explain();
 			return -1;
-- 
2.4.3

  parent reply	other threads:[~2016-02-16 15:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 15:08 [PATCH iproute2 0/5] bridge: complete port netlink support Nikolay Aleksandrov
2016-02-16 15:08 ` [PATCH iproute2 1/5] iplink: bridge_slave: export read-only values Nikolay Aleksandrov
2016-02-18  1:52   ` Stephen Hemminger
2016-02-16 15:08 ` Nikolay Aleksandrov [this message]
2016-02-16 15:08 ` [PATCH iproute2 3/5] iplink: bridge_slave: add support for IFLA_BRPORT_PROXYARP_WIFI Nikolay Aleksandrov
2016-02-16 15:08 ` [PATCH iproute2 4/5] iplink: bridge_slave: add support for IFLA_BRPORT_MULTICAST_ROUTER Nikolay Aleksandrov
2016-02-16 15:08 ` [PATCH iproute2 5/5] iplink: bridge_slave: add support for IFLA_BRPORT_FAST_LEAVE Nikolay Aleksandrov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455635335-9973-3-git-send-email-razor@blackwall.org \
    --to=razor@blackwall.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).