[PATCH] ip: Fix ip -o link

Denys Vlasenko vda.linux at googlemail.com
Sat Mar 30 17:30:35 UTC 2019


Applied, thanks!

On Wed, Mar 27, 2019 at 5:15 PM Sørensen, Stefan
<Stefan.Sorensen at spectralink.com> wrote:
>
> 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.
>
> Signed-off-by: Stefan Sørensen <stefan.sorensen at spectralink.com>
> ---
>  networking/libiproute/ipaddress.c | 4 ++--
>  1 file 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)
>         }
>
>         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);
> --
> 2.20.1
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list