diff options
author | faicker.mo <faicker.mo@ucloud.cn> | 2018-11-14 16:51:34 +0800 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-04-14 23:48:58 +0000 |
commit | 2bccb181c79f56090107b55ed2d0a551cda12643 (patch) | |
tree | 268b3cb59ffabe6ac3c5601e20d8524b7a742e42 /src/vnet/ip/ip4_format.c | |
parent | 89e66434a2c93a07d7e913bb66b2be5e6e6df14c (diff) |
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 <faicker.mo@ucloud.cn>
Diffstat (limited to 'src/vnet/ip/ip4_format.c')
-rw-r--r-- | src/vnet/ip/ip4_format.c | 3 |
1 files changed, 3 insertions, 0 deletions
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. */ |