diff options
author | Stefan Sørensen <stefan.sorensen@spectralink.com> | 2019-03-30 18:24:46 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-03-30 18:24:46 +0100 |
commit | bb3a9531b28f5c946452b92c8ac5a0951c5eab03 (patch) | |
tree | cc0d7aff32e66d994a2daa814a436993adc94c12 | |
parent | a2fd1aaf86e2adc16101bdf95770a2783830727a (diff) | |
download | busybox-w32-bb3a9531b28f5c946452b92c8ac5a0951c5eab03.tar.gz busybox-w32-bb3a9531b28f5c946452b92c8ac5a0951c5eab03.tar.bz2 busybox-w32-bb3a9531b28f5c946452b92c8ac5a0951c5eab03.zip |
ip: Fix ip -o link
Commit db169f253854db572c0c2b7e3d74ebbe6afdb97f breaks the "ip -o link"
command, no output is displayed.. Fix by only excluding the link info if
in oneline mode and if the address family is not AF_PACKET.
function old new delta
ipaddr_list_or_flush 1232 1202 -30
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/libiproute/ipaddress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index d088caf4c..0a1b5d798 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -574,8 +574,8 @@ int FAST_FUNC ipaddr_list_or_flush(char **argv, int flush) | |||
574 | } | 574 | } |
575 | 575 | ||
576 | for (l = linfo; l; l = l->next) { | 576 | for (l = linfo; l; l = l->next) { |
577 | if (no_link | 577 | if ((oneline && G_filter.family != AF_PACKET) |
578 | || (oneline || print_linkinfo(&l->h) == 0) | 578 | || (print_linkinfo(&l->h) == 0) |
579 | /* ^^^^^^^^^ "ip -oneline a" does not print link info */ | 579 | /* ^^^^^^^^^ "ip -oneline a" does not print link info */ |
580 | ) { | 580 | ) { |
581 | struct ifinfomsg *ifi = NLMSG_DATA(&l->h); | 581 | struct ifinfomsg *ifi = NLMSG_DATA(&l->h); |