naccyde / rpms / iproute

Forked from rpms/iproute 8 months ago
Clone

Blame SOURCES/0065-bonding-export-3ad-actor-and-partner-port-state.patch

049c96
From 773a7f959b38eae8f01301b3fafaa0392759404b Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Tue, 23 Feb 2016 18:27:20 +0100
049c96
Subject: [PATCH] bonding: export 3ad actor and partner port state
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1269528
049c96
Upstream Status: iproute2.git commit 7d6bc3b87abad
049c96
049c96
commit 7d6bc3b87abadddaf2e0a92c113e6ef83c226ed5
049c96
Author: Nikolay Aleksandrov <razor@blackwall.org>
049c96
Date:   Tue Jun 16 12:26:57 2015 +0300
049c96
049c96
    bonding: export 3ad actor and partner port state
049c96
049c96
    This patch adds support to retrieve the new bond slave attributes:
049c96
    IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE
049c96
    IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE
049c96
    which are read-only.
049c96
049c96
    (Removed if_link.h changes already updated in net-next)
049c96
049c96
    Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
049c96
---
049c96
 ip/iplink_bond_slave.c | 8 ++++++++
049c96
 1 file changed, 8 insertions(+)
049c96
049c96
diff --git a/ip/iplink_bond_slave.c b/ip/iplink_bond_slave.c
049c96
index aacba14..33bea91 100644
049c96
--- a/ip/iplink_bond_slave.c
049c96
+++ b/ip/iplink_bond_slave.c
049c96
@@ -78,6 +78,14 @@ static void bond_slave_print_opt(struct link_util *lu, FILE *f, struct rtattr *t
049c96
 	if (tb[IFLA_BOND_SLAVE_AD_AGGREGATOR_ID])
049c96
 		fprintf(f, "ad_aggregator_id %d ",
049c96
 			rta_getattr_u16(tb[IFLA_BOND_SLAVE_AD_AGGREGATOR_ID]));
049c96
+
049c96
+	if (tb[IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE])
049c96
+		fprintf(f, "ad_actor_oper_port_state %d\n",
049c96
+			rta_getattr_u8(tb[IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE]));
049c96
+
049c96
+	if (tb[IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE])
049c96
+		fprintf(f, "ad_partner_oper_port_state %d\n",
049c96
+			rta_getattr_u16(tb[IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE]));
049c96
 }
049c96
 
049c96
 static int bond_slave_parse_opt(struct link_util *lu, int argc, char **argv,
049c96
-- 
049c96
1.8.3.1
049c96