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