summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorStefan Sørensen2019-03-30 18:24:46 +0100
committerDenys Vlasenko2019-03-30 18:24:46 +0100
commitbb3a9531b28f5c946452b92c8ac5a0951c5eab03 (patch)
treecc0d7aff32e66d994a2daa814a436993adc94c12 /networking
parenta2fd1aaf86e2adc16101bdf95770a2783830727a (diff)
downloadbusybox-bb3a9531b28f5c946452b92c8ac5a0951c5eab03.zip
busybox-bb3a9531b28f5c946452b92c8ac5a0951c5eab03.tar.gz
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>
Diffstat (limited to 'networking')
-rw-r--r--networking/libiproute/ipaddress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index d088caf..0a1b5d7 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)
}
for (l = linfo; l; l = l->next) {
- if (no_link
- || (oneline || print_linkinfo(&l->h) == 0)
+ if ((oneline && G_filter.family != AF_PACKET)
+ || (print_linkinfo(&l->h) == 0)
/* ^^^^^^^^^ "ip -oneline a" does not print link info */
) {
struct ifinfomsg *ifi = NLMSG_DATA(&l->h);