else {
if (get_u8(&uval, *argv, 16))
invarg("invalid TClass", *argv);
+ flowinfo &= ~IP6_FLOWINFO_TCLASS;
flowinfo |= htonl((__u32)uval << 20) & IP6_FLOWINFO_TCLASS;
flags &= ~IP6_TNL_F_USE_ORIG_TCLASS;
}
invarg("invalid Flowlabel", *argv);
if (uval > 0xFFFFF)
invarg("invalid Flowlabel", *argv);
+ flowinfo &= ~IP6_FLOWINFO_FLOWLABEL;
flowinfo |= htonl(uval) & IP6_FLOWINFO_FLOWLABEL;
flags &= ~IP6_TNL_F_USE_ORIG_FLOWLABEL;
}
}
}
+ if (flags & IP6_TNL_F_USE_ORIG_TCLASS) {
+ print_bool(PRINT_ANY,
+ "ip6_tnl_f_use_orig_tclass",
+ "tclass inherit ",
+ true);
+ } else {
+ if (is_json_context()) {
+ SPRINT_BUF(b1);
+
+ snprintf(b1, sizeof(b1), "0x%05x",
+ ntohl(flowinfo & IP6_FLOWINFO_TCLASS) >> 20);
+ print_string(PRINT_JSON, "tclass", NULL, b1);
+ } else {
+ fprintf(f, "tclass 0x%02x ",
+ ntohl(flowinfo & IP6_FLOWINFO_TCLASS) >> 20);
+ }
+ }
+
if (flags & IP6_TNL_F_RCV_DSCP_COPY)
print_bool(PRINT_ANY,
"ip6_tnl_f_rcv_dscp_copy",