Message ID | 1426606258-13466-3-git-send-email-dsahern@gmail.com |
---|---|
State | Changes Requested, archived |
Delegated to: | stephen hemminger |
Headers | show |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 3450c3fbdc65..c5ee8c91b1c6 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h @@ -147,6 +147,7 @@ enum { IFLA_CARRIER_CHANGES, IFLA_PHYS_SWITCH_ID, IFLA_LINK_NETNSID, + IFLA_PHYS_PORT_NAME, __IFLA_MAX }; diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 99a6ab5977e3..9e65015b7a48 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -645,6 +645,9 @@ int print_linkinfo(const struct sockaddr_nl *who, b1, sizeof(b1))); } + if (tb[IFLA_PHYS_PORT_NAME]) + fprintf(fp, "port name %s ", rta_getattr_str(tb[IFLA_PHYS_PORT_NAME])); + if (tb[IFLA_OPERSTATE]) print_operstate(fp, rta_getattr_u8(tb[IFLA_OPERSTATE]));