naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0045-iproute2-ipa-show-switch-id.patch

4aca6e
From 84a13f487d76e62d1ff3be6ed94d7305f72205e8 Mon Sep 17 00:00:00 2001
4aca6e
From: Phil Sutter <psutter@redhat.com>
4aca6e
Date: Tue, 28 Feb 2017 16:10:58 +0100
4aca6e
Subject: [PATCH] iproute2: ipa: show switch id
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
4aca6e
Upstream Status: iproute2.git commit 122f2fc5739c1
4aca6e
4aca6e
commit 122f2fc5739c1ba9967775581201eefece855602
4aca6e
Author: Jiri Pirko <jiri@resnulli.us>
4aca6e
Date:   Wed Jul 8 17:08:18 2015 +0200
4aca6e
4aca6e
    iproute2: ipa: show switch id
4aca6e
4aca6e
    We forgot to include this patch somehow. So do it now.
4aca6e
4aca6e
    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
4aca6e
    Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
4aca6e
---
4aca6e
 ip/ipaddress.c | 8 ++++++++
4aca6e
 1 file changed, 8 insertions(+)
4aca6e
4aca6e
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
4aca6e
index b24b103..45b47f9 100644
4aca6e
--- a/ip/ipaddress.c
4aca6e
+++ b/ip/ipaddress.c
4aca6e
@@ -643,6 +643,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
4aca6e
 				      b1, sizeof(b1)));
4aca6e
 	}
4aca6e
 
4aca6e
+	if (tb[IFLA_PHYS_SWITCH_ID]) {
4aca6e
+		SPRINT_BUF(b1);
4aca6e
+		fprintf(fp, "switchid %s ",
4aca6e
+			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_SWITCH_ID]),
4aca6e
+				      RTA_PAYLOAD(tb[IFLA_PHYS_SWITCH_ID]),
4aca6e
+				      b1, sizeof(b1)));
4aca6e
+	}
4aca6e
+
4aca6e
 	if (tb[IFLA_OPERSTATE])
4aca6e
 		print_operstate(fp, rta_getattr_u8(tb[IFLA_OPERSTATE]));
4aca6e
 
4aca6e
-- 
4aca6e
1.8.3.1
4aca6e