diff mbox

[iproute2,net-next,1/2] iplink: bridge: add ageing_time, stp_state and priority when showing attributes

Message ID 1439297784-1962-2-git-send-email-razor@blackwall.org
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Nikolay Aleksandrov Aug. 11, 2015, 12:56 p.m. UTC
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

When showing bridge attributes, show also ageing_time, stp_state and
priority if available.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
 ip/iplink_bridge.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Stephen Hemminger Aug. 12, 2015, 4:14 p.m. UTC | #1
On Tue, 11 Aug 2015 15:56:23 +0300
Nikolay Aleksandrov <razor@blackwall.org> wrote:

> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> 
> When showing bridge attributes, show also ageing_time, stp_state and
> priority if available.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

This doesn't need anything that is not already in 4.2-rc
therefore applied to master.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index 297160c490fd..2a0bf6e147d0 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
@@ -109,6 +109,18 @@  static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 	if (tb[IFLA_BR_MAX_AGE])
 		fprintf(f, "max_age %u ",
 			rta_getattr_u32(tb[IFLA_BR_MAX_AGE]));
+
+	if (tb[IFLA_BR_AGEING_TIME])
+		fprintf(f, "ageing_time %u ",
+			rta_getattr_u32(tb[IFLA_BR_AGEING_TIME]));
+
+	if (tb[IFLA_BR_STP_STATE])
+		fprintf(f, "stp_state %u ",
+			rta_getattr_u32(tb[IFLA_BR_STP_STATE]));
+
+	if (tb[IFLA_BR_PRIORITY])
+		fprintf(f, "priority %u ",
+			rta_getattr_u16(tb[IFLA_BR_PRIORITY]));
 }
 
 struct link_util bridge_link_util = {