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

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

index 8014207db6a1467b6d66f2ac15b45507c856c392..55bd1fbb8ddb075e3329ce454dfdb4a160c3eba0 100644 (file)
@@ -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",