X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip4_format.c;h=786a01d396bd51c592d0b0a5cbf1f3e16c376284;hb=9534696b4;hp=5399e44d93a0b0a03ec65afc9eab2e6ddbaddd5f;hpb=b7b929931a07fbb27b43d5cd105f366c3e29807e;p=vpp.git diff --git a/src/vnet/ip/ip4_format.c b/src/vnet/ip/ip4_format.c index 5399e44d93a..786a01d396b 100644 --- a/src/vnet/ip/ip4_format.c +++ b/src/vnet/ip/ip4_format.c @@ -155,6 +155,10 @@ format_ip4_header (u8 * s, va_list * args) s = format (s, " (should be 0x%04x)", clib_net_to_host_u16 (c)); } + s = format (s, " dscp %U ecn %U", + format_ip_dscp, ip4_header_get_dscp (ip), + format_ip_ecn, ip4_header_get_ecn (ip)); + { u32 f = clib_net_to_host_u16 (ip->flags_and_fragment_offset); u32 o; @@ -165,7 +169,7 @@ format_ip4_header (u8 * s, va_list * args) /* Fragment offset. */ o = 8 * (f & 0x1fff); - f ^= o; + f ^= f & 0x1fff; if (o != 0) s = format (s, " offset %d", o); @@ -178,6 +182,9 @@ format_ip4_header (u8 * s, va_list * args) _(CONGESTION); #undef _ } + /* Fragment packet but not the first. */ + if (o != 0) + return s; } /* Recurse into next protocol layer. */