ip: Fix ip -o link
Commit db169f2538
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>
This commit is contained in:
parent
a2fd1aaf86
commit
bb3a9531b2
@ -574,8 +574,8 @@ int FAST_FUNC ipaddr_list_or_flush(char **argv, int flush)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (l = linfo; l; l = l->next) {
|
for (l = linfo; l; l = l->next) {
|
||||||
if (no_link
|
if ((oneline && G_filter.family != AF_PACKET)
|
||||||
|| (oneline || print_linkinfo(&l->h) == 0)
|
|| (print_linkinfo(&l->h) == 0)
|
||||||
/* ^^^^^^^^^ "ip -oneline a" does not print link info */
|
/* ^^^^^^^^^ "ip -oneline a" does not print link info */
|
||||||
) {
|
) {
|
||||||
struct ifinfomsg *ifi = NLMSG_DATA(&l->h);
|
struct ifinfomsg *ifi = NLMSG_DATA(&l->h);
|
||||||
|
Loading…
Reference in New Issue
Block a user