u32: fix IPv6 port match pretty printing

parse_ip6() stores source and destination ports in the 32-bit key at
offset 40.  print_ipv6() checks offset 20 instead, so it does not print
the decoded port fields.  The source and destination labels in that case
are also reversed relative to the layout produced by pack_key16().

Handle offset 40 and use the source label for the high half and the
destination label for the low half.  This matches the parser and the
equivalent IPv4 printer in both text and JSON output.

Fixes: d13cee6d598d ("Add IPV6 match pretty print")
Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
1 file changed