|
|
049c96 |
From eed74d8f509bda634bb310dcf054da09319a308b Mon Sep 17 00:00:00 2001
|
|
|
049c96 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
049c96 |
Date: Wed, 24 Feb 2016 10:49:05 +0100
|
|
|
049c96 |
Subject: [PATCH] iplink: add ageing_time, stp_state and priority for bridge
|
|
|
049c96 |
|
|
|
049c96 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1270759
|
|
|
049c96 |
Upstream Status: iproute2.git commit fdba05155c700
|
|
|
049c96 |
|
|
|
049c96 |
commit fdba05155c7008d18b5760624c99978ba0d369d4
|
|
|
049c96 |
Author: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
|
049c96 |
Date: Wed Aug 12 09:11:30 2015 -0700
|
|
|
049c96 |
|
|
|
049c96 |
iplink: add ageing_time, stp_state and priority for bridge
|
|
|
049c96 |
|
|
|
049c96 |
When showing bridge attributes, show also ageing_time, stp_state and
|
|
|
049c96 |
priority if available.
|
|
|
049c96 |
|
|
|
049c96 |
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
|
049c96 |
---
|
|
|
049c96 |
ip/iplink_bridge.c | 12 ++++++++++++
|
|
|
049c96 |
1 file changed, 12 insertions(+)
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
|
|
|
049c96 |
index 1e69960..e704e29 100644
|
|
|
049c96 |
--- a/ip/iplink_bridge.c
|
|
|
049c96 |
+++ b/ip/iplink_bridge.c
|
|
|
049c96 |
@@ -114,6 +114,18 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
|
|
|
049c96 |
if (tb[IFLA_BR_MAX_AGE])
|
|
|
049c96 |
fprintf(f, "max_age %u ",
|
|
|
049c96 |
rta_getattr_u32(tb[IFLA_BR_MAX_AGE]));
|
|
|
049c96 |
+
|
|
|
049c96 |
+ if (tb[IFLA_BR_AGEING_TIME])
|
|
|
049c96 |
+ fprintf(f, "ageing_time %u ",
|
|
|
049c96 |
+ rta_getattr_u32(tb[IFLA_BR_AGEING_TIME]));
|
|
|
049c96 |
+
|
|
|
049c96 |
+ if (tb[IFLA_BR_STP_STATE])
|
|
|
049c96 |
+ fprintf(f, "stp_state %u ",
|
|
|
049c96 |
+ rta_getattr_u32(tb[IFLA_BR_STP_STATE]));
|
|
|
049c96 |
+
|
|
|
049c96 |
+ if (tb[IFLA_BR_PRIORITY])
|
|
|
049c96 |
+ fprintf(f, "priority %u ",
|
|
|
049c96 |
+ rta_getattr_u16(tb[IFLA_BR_PRIORITY]));
|
|
|
049c96 |
}
|
|
|
049c96 |
|
|
|
049c96 |
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
|
|
|
049c96 |
--
|
|
|
049c96 |
1.8.3.1
|
|
|
049c96 |
|