From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [PATCH iproute2 6/7] gre6/tunnel: Output flowlabel after tclass Date: Mon, 8 Jan 2018 19:06:37 +0200 Message-ID: <1515431198-29362-7-git-send-email-serhe.popovych@gmail.com> References: <1515431198-29362-1-git-send-email-serhe.popovych@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-lf0-f66.google.com ([209.85.215.66]:43511 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935529AbeAHRGu (ORCPT ); Mon, 8 Jan 2018 12:06:50 -0500 Received: by mail-lf0-f66.google.com with SMTP id z124so2432602lfd.10 for ; Mon, 08 Jan 2018 09:06:50 -0800 (PST) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id y138sm2221484lfd.62.2018.01.08.09.06.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jan 2018 09:06:48 -0800 (PST) In-Reply-To: <1515431198-29362-1-git-send-email-serhe.popovych@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: To follow ip6tnl output print flowlabel after tclass in link_gre6.c. Signed-off-by: Serhey Popovych --- ip/link_gre6.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ip/link_gre6.c b/ip/link_gre6.c index 8014207..55bd1fb 100644 --- a/ip/link_gre6.c +++ b/ip/link_gre6.c @@ -444,18 +444,6 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) print_uint(PRINT_ANY, "encap_limit", "encaplimit %u ", val); } - if (flags & IP6_TNL_F_USE_ORIG_FLOWLABEL) { - print_bool(PRINT_ANY, - "ip6_tnl_f_use_orig_flowlabel", - "flowlabel inherit ", - true); - } else if (tb[IFLA_GRE_FLOWINFO]) { - __u32 val = ntohl(flowinfo & IP6_FLOWINFO_FLOWLABEL); - - snprintf(s2, sizeof(s2), "0x%05x", val); - print_string(PRINT_ANY, "flowlabel", "flowlabel %s ", s2); - } - if (flags & IP6_TNL_F_USE_ORIG_TCLASS) { print_bool(PRINT_ANY, "ip6_tnl_f_use_orig_tclass", @@ -468,6 +456,18 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) print_string(PRINT_ANY, "tclass", "tclass %s ", s2); } + if (flags & IP6_TNL_F_USE_ORIG_FLOWLABEL) { + print_bool(PRINT_ANY, + "ip6_tnl_f_use_orig_flowlabel", + "flowlabel inherit ", + true); + } else if (tb[IFLA_GRE_FLOWINFO]) { + __u32 val = ntohl(flowinfo & IP6_FLOWINFO_FLOWLABEL); + + snprintf(s2, sizeof(s2), "0x%05x", val); + print_string(PRINT_ANY, "flowlabel", "flowlabel %s ", s2); + } + if (flags & IP6_TNL_F_RCV_DSCP_COPY) print_bool(PRINT_ANY, "ip6_tnl_f_rcv_dscp_copy", -- 1.7.10.4