diff options
author | Zhiyong Yang <zhiyong.yang@intel.com> | 2019-07-06 05:14:54 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-07-10 13:49:08 +0000 |
commit | 33fa710ec9e7a69a67b29563a9ca57384b11258e (patch) | |
tree | dead1c43253b3b8552e6ac6b57836b76a0d99131 /src/vnet | |
parent | 377120083031eda4cf06cde5b5fb203e680c2a5b (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/vnet')
-rw-r--r-- | src/vnet/geneve/decap.c | 18 |
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)); } |