aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-03-08 15:55:07 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-03-08 15:55:07 +0100
commitdb169f253854db572c0c2b7e3d74ebbe6afdb97f (patch)
treea3ddd955de791e6d8d35c6a1711487e92dde0ba8 /networking/libiproute
parent7798282db22cb60d95d452007cab73f0f5631ce5 (diff)
downloadbusybox-db169f253854db572c0c2b7e3d74ebbe6afdb97f.tar.gz
ip: fix "ip -oneline a"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute')
-rw-r--r--networking/libiproute/ipaddress.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index d7f888176..9ec665b69 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -570,7 +570,10 @@ int FAST_FUNC ipaddr_list_or_flush(char **argv, int flush)
}
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);