From: Phil Sutter <phil@nwl.cc>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: [iproute PATCH 2/2] link_gre6: Print the tunnel's tclass setting
Date: Fri, 1 Sep 2017 16:08:09 +0200 [thread overview]
Message-ID: <20170901140809.13230-3-phil@nwl.cc> (raw)
In-Reply-To: <20170901140809.13230-1-phil@nwl.cc>
Print the value analogous to flowlabel. While being at it, also break
the overlong lines to not exceed 80 characters boundary.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
ip/link_gre6.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
index 447ac5d78ab7b..78b5215c65037 100644
--- a/ip/link_gre6.c
+++ b/ip/link_gre6.c
@@ -462,7 +462,14 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (flags & IP6_TNL_F_USE_ORIG_FLOWLABEL)
fprintf(f, "flowlabel inherit ");
else
- fprintf(f, "flowlabel 0x%05x ", ntohl(flowinfo & IP6_FLOWINFO_FLOWLABEL));
+ fprintf(f, "flowlabel 0x%05x ",
+ ntohl(flowinfo & IP6_FLOWINFO_FLOWLABEL));
+
+ if (flags & IP6_TNL_F_USE_ORIG_TCLASS)
+ fprintf(f, "tclass inherit ");
+ else
+ fprintf(f, "tclass 0x%02x ",
+ ntohl(flowinfo & IP6_FLOWINFO_TCLASS) >> 20);
if (flags & IP6_TNL_F_RCV_DSCP_COPY)
fprintf(f, "dscp inherit ");
--
2.13.1
next prev parent reply other threads:[~2017-09-01 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-01 14:08 [iproute PATCH 0/2] Fix and enhance link_gre6 Phil Sutter
2017-09-01 14:08 ` [iproute PATCH 1/2] link_gre6: Fix for changing tclass/flowlabel Phil Sutter
2017-09-01 14:08 ` Phil Sutter [this message]
2017-09-01 19:10 ` [iproute PATCH 0/2] Fix and enhance link_gre6 Stephen Hemminger
2017-09-01 19:13 ` Stephen Hemminger
2017-09-01 20:42 ` Phil Sutter
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=20170901140809.13230-3-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.