From 2bccb181c79f56090107b55ed2d0a551cda12643 Mon Sep 17 00:00:00 2001 From: "faicker.mo" Date: Wed, 14 Nov 2018 16:51:34 +0800 Subject: 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 --- src/vnet/ip/ip4_format.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vnet/ip/ip4_format.c') 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. */ -- cgit 1.2.3-korg