]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip6tnl/tunnel: Output hoplimit before encapsulation limit
authorSerhey Popovych <serhe.popovych@gmail.com>
Wed, 10 Jan 2018 15:53:15 +0000 (17:53 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 10 Jan 2018 16:06:12 +0000 (08:06 -0800)
To follow gre6 output print hoplimit before encapsulation
limit in link_ip6tnl.c.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/link_ip6tnl.c

index 379eb3315319ff88dccdbca8d5ad5c6822286b1c..bbc7878c36c6ba18e2c8a117d12930c60e1813fd 100644 (file)
@@ -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",