From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [PATCH iproute2 7/7] ip6tnl/tunnel: Output hoplimit before encapsulation limit Date: Mon, 8 Jan 2018 19:06:38 +0200 Message-ID: <1515431198-29362-8-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-f65.google.com ([209.85.215.65]:42269 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935530AbeAHRGv (ORCPT ); Mon, 8 Jan 2018 12:06:51 -0500 Received: by mail-lf0-f65.google.com with SMTP id e27so12832533lfb.9 for ; Mon, 08 Jan 2018 09:06:51 -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.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jan 2018 09:06:49 -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 gre6 output print hoplimit before encapsulation limit in link_ip6tnl.c. Signed-off-by: Serhey Popovych --- ip/link_ip6tnl.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c index 379eb33..bbc7878 100644 --- a/ip/link_ip6tnl.c +++ b/ip/link_ip6tnl.c @@ -387,6 +387,13 @@ static void ip6tunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb print_uint(PRINT_ANY, "link_index", "dev %u ", link); } + if (tb[IFLA_IPTUN_TTL]) { + print_uint(PRINT_ANY, + "ttl", + "hoplimit %u ", + rta_getattr_u8(tb[IFLA_IPTUN_TTL])); + } + if (flags & IP6_TNL_F_IGN_ENCAP_LIMIT) { print_bool(PRINT_ANY, "ip6_tnl_f_ign_encap_limit", @@ -398,12 +405,6 @@ static void ip6tunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb print_uint(PRINT_ANY, "encap_limit", "encaplimit %u ", val); } - if (tb[IFLA_IPTUN_TTL]) - print_uint(PRINT_ANY, - "ttl", - "hoplimit %u ", - rta_getattr_u8(tb[IFLA_IPTUN_TTL])); - if (flags & IP6_TNL_F_USE_ORIG_TCLASS) { print_bool(PRINT_ANY, "ip6_tnl_f_use_orig_tclass", -- 1.7.10.4