naccyde / rpms / iproute

Forked from rpms/iproute 7 months ago
Clone

Blame SOURCES/0028-iproute2-ipa-show-port-id.patch

4aca6e
From 3d68599ce6e1a6dca3f1781ab3589d6a78fd5c8e Mon Sep 17 00:00:00 2001
4aca6e
From: Phil Sutter <psutter@redhat.com>
4aca6e
Date: Tue, 28 Feb 2017 16:09:08 +0100
4aca6e
Subject: [PATCH] iproute2: ipa: show port id
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
4aca6e
Upstream Status: iproute2.git commit c897067480a0e
4aca6e
4aca6e
commit c897067480a0e0fbf6231edf1ded8fc12ca6ad9d
4aca6e
Author: Jiri Pirko <jiri@resnulli.us>
4aca6e
Date:   Thu May 15 15:10:22 2014 +0200
4aca6e
4aca6e
    iproute2: ipa: show port id
4aca6e
4aca6e
    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
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 e39137f..0c741ff 100644
4aca6e
--- a/ip/ipaddress.c
4aca6e
+++ b/ip/ipaddress.c
4aca6e
@@ -635,6 +635,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
4aca6e
 		fprintf(fp, "master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1));
4aca6e
 	}
4aca6e
 
4aca6e
+	if (tb[IFLA_PHYS_PORT_ID]) {
4aca6e
+		SPRINT_BUF(b1);
4aca6e
+		fprintf(fp, "portid %s ",
4aca6e
+			hexstring_n2a(RTA_DATA(tb[IFLA_PHYS_PORT_ID]),
4aca6e
+				      RTA_PAYLOAD(tb[IFLA_PHYS_PORT_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