From: Simon Horman <simon.horman@netronome•com>
To: David Ahern <dsahern@gmail•com>
Cc: stephen@networkplumber•org, netdev@vger•kernel.org,
roopa@cumulusnetworks•com
Subject: Re: [PATCH] ip: mpls: fix printing of mpls labels
Date: Wed, 10 May 2017 12:02:52 +0200 [thread overview]
Message-ID: <20170510100250.GA32206@vergenet.net> (raw)
In-Reply-To: <20170509060413.11596-1-dsahern@gmail.com>
On Mon, May 08, 2017 at 11:04:13PM -0700, David Ahern wrote:
> If the kernel returns more labels than iproute2 expects, none of
> the labels are printed and (null) is shown instead:
> $ ip -f mpls ro ls
> 101 as to (null) via inet 172.16.2.2 dev virt12
> 201 as to 202/203 via inet6 2001:db8:2::2 dev virt12
>
> Remove the use of MPLS_MAX_LABELS and rely on buffer length that is
> passed to mpls_ntop. With this change ip can print the label stack
> returned by the kernel up to 255 characters (limit is due to size of
> buf passed in) which amounts to 31 labels with a separator.
>
> With this change the above is:
> $ ip/ip -f mpls ro ls
> 101 as to 102/103/104/105/106/107/108/109/110 via inet 172.16.2.2 dev virt12
>
> Signed-off-by: David Ahern <dsahern@gmail•com>
Reviewed-by: Simon Horman <simon.horman@netronome•com>
next prev parent reply other threads:[~2017-05-10 10:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 6:04 [PATCH] ip: mpls: fix printing of mpls labels David Ahern
2017-05-10 10:02 ` Simon Horman [this message]
2017-05-11 18:09 ` Stephen Hemminger
2017-05-11 20:52 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170510100250.GA32206@vergenet.net \
--to=simon.horman@netronome$(echo .)com \
--cc=dsahern@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=roopa@cumulusnetworks$(echo .)com \
--cc=stephen@networkplumber$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox