In link_gre6.c it seems copy paste error: tclass is 8 bits,
not 20 as flowlabel.
In link_iptnl.c rename "flowinfo_tclass" to "tclass" as it
correct name since flowinfo is implementation internal name
used to label combined within u32 attribute tclass and
flowlabel.
Fixes: 1facc1c61c07 ("ip: link_ip6tnl.c: add json output support")
Fixes: 2e706e12d9b0 ("Merge branch 'master' into net-next")
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
if (is_json_context()) {
SPRINT_BUF(b1);
- snprintf(b1, sizeof(b1), "0x%05x",
+ snprintf(b1, sizeof(b1), "0x%02x",
ntohl(flowinfo & IP6_FLOWINFO_TCLASS) >> 20);
print_string(PRINT_JSON, "tclass", NULL, b1);
} else {
SPRINT_BUF(b1);
snprintf(b1, sizeof(b1), "0x%02x", (__u8)(val >> 20));
- print_string(PRINT_JSON, "flowinfo_tclass", NULL, b1);
+ print_string(PRINT_JSON, "tclass", NULL, b1);
} else {
printf("tclass 0x%02x ", (__u8)(val >> 20));
}