aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2019-07-06 05:14:54 -0400
committerDamjan Marion <dmarion@me.com>2019-07-10 13:49:08 +0000
commit33fa710ec9e7a69a67b29563a9ca57384b11258e (patch)
treedead1c43253b3b8552e6ac6b57836b76a0d99131 /src
parent377120083031eda4cf06cde5b5fb203e680c2a5b (diff)
misc: fix buffer issue in geneve_input
Type: fix Change-Id: I32000cd42b0ab2ce54a159c6727823fd0d113fe4 Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/geneve/decap.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/vnet/geneve/decap.c b/src/vnet/geneve/decap.c
index e85e25f43ee..e30a56c0327 100644
--- a/src/vnet/geneve/decap.c
+++ b/src/vnet/geneve/decap.c
@@ -168,11 +168,10 @@ geneve_input (vlib_main_t * vm,
/* pop (ip, udp, geneve) */
if (is_ip4)
{
- vlib_buffer_advance
- (b0,
- sizeof (*ip4_0) + sizeof (udp_header_t) +
- GENEVE_BASE_HEADER_LENGTH +
- vnet_get_geneve_options_len (geneve0));
+ vlib_buffer_advance (b0,
+ sizeof (*ip4_0) + sizeof (udp_header_t) +
+ GENEVE_BASE_HEADER_LENGTH +
+ vnet_get_geneve_options_len (geneve0));
vlib_buffer_advance (b1,
sizeof (*ip4_1) + sizeof (udp_header_t) +
GENEVE_BASE_HEADER_LENGTH +
@@ -180,14 +179,13 @@ geneve_input (vlib_main_t * vm,
}
else
{
- vlib_buffer_advance
- (b0,
- sizeof (*ip6_0) + sizeof (udp_header_t) +
- GENEVE_BASE_HEADER_LENGTH +
- vnet_get_geneve_options_len (geneve0));
vlib_buffer_advance (b0,
sizeof (*ip6_0) + sizeof (udp_header_t) +
GENEVE_BASE_HEADER_LENGTH +
+ vnet_get_geneve_options_len (geneve0));
+ vlib_buffer_advance (b1,
+ sizeof (*ip6_1) + sizeof (udp_header_t) +
+ GENEVE_BASE_HEADER_LENGTH +
vnet_get_geneve_options_len (geneve1));
}