ip: fix "ip -oneline a"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index d7f8881..9ec665b 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -570,7 +570,10 @@
}
for (l = linfo; l; l = l->next) {
- if (no_link || print_linkinfo(&l->h) == 0) {
+ if (no_link
+ || (oneline || print_linkinfo(&l->h) == 0)
+ /* ^^^^^^^^^ "ip -oneline a" does not print link info */
+ ) {
struct ifinfomsg *ifi = NLMSG_DATA(&l->h);
if (G_filter.family != AF_PACKET)
print_selected_addrinfo(ifi->ifi_index, ainfo);