From: faicker.mo Date: Wed, 14 Nov 2018 08:51:34 +0000 (+0800) Subject: ip4: don't format upper layer if it's a fragment X-Git-Tag: v20.01-rc0~825 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=2bccb181c79f56090107b55ed2d0a551cda12643;p=vpp.git ip4: don't format upper layer if it's a fragment Parsing ipv4 upper layer is not meaningful if it's a fragment packet except the first. Change-Id: I442fb7ec01244fde8c4f7656a8ba633d0aa0f97e Signed-off-by: Faicker Mo --- diff --git a/src/vnet/ip/ip4_format.c b/src/vnet/ip/ip4_format.c index 5399e44d93a..6c31b422225 100644 --- a/src/vnet/ip/ip4_format.c +++ b/src/vnet/ip/ip4_format.c @@ -178,6 +178,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. */