summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/ipsec
diff options
context:
space:
mode:
authorSzymon Sliwa <szs@semihalf.com>2018-03-20 13:45:21 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-26 20:14:03 +0000
commit0a15e8c3b6a7e19131f7abc6fd4d1422616cda5c (patch)
tree752d6f13aaf5684ee3b912818842467268a0ea2a /src/plugins/dpdk/ipsec
parentabcf3ea674aea6a87da9675935b663aa95819e0e (diff)
plugins: dpdk: ipsec: fix l3 offset
Changes the source of the l3 offset to a more proper one, same as I5d9f41599ba8d8eb14ce2d9d523f82ea6e0fd10d. Change-Id: I5ff05d7d89507ecb378a2bd62f5b149189ca9e99 Signed-off-by: Szymon Sliwa <szs@semihalf.com>
Diffstat (limited to 'src/plugins/dpdk/ipsec')
-rw-r--r--src/plugins/dpdk/ipsec/esp_decrypt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/dpdk/ipsec/esp_decrypt.c b/src/plugins/dpdk/ipsec/esp_decrypt.c
index 581e5b99cf9..85bfb64f1f5 100644
--- a/src/plugins/dpdk/ipsec/esp_decrypt.c
+++ b/src/plugins/dpdk/ipsec/esp_decrypt.c
@@ -476,8 +476,7 @@ dpdk_esp_decrypt_post_node_fn (vlib_main_t * vm,
esp_replay_advance(sa0, seq);
}
- /* FIXME ip header */
- ih4 = (ip4_header_t *) (b0->data + sizeof(ethernet_header_t));
+ ih4 = (ip4_header_t *) (b0->data + vnet_buffer(b0)->l3_hdr_offset);
vlib_buffer_advance (b0, sizeof (esp_header_t) + iv_size);
b0->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;