From a2b4ac1c13559b1cdf5088edfad4a68022960b00 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Wed, 21 Jun 2017 12:20:39 +0200 Subject: [PATCH] acl-plugin: use ethernet_buffer_header_size() to determine the size of the ethernet header When extracting the 5-tuple, use the ethernet_buffer_header_size() so we can correctly handle the case of subinterfaces, etc. Change-Id: Ied73fde98d6b313e9eeab2aff4f22daa50a6cbbf Signed-off-by: Andrew Yourtchenko --- src/plugins/acl/fa_node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/acl/fa_node.c b/src/plugins/acl/fa_node.c index 3c23c8086e7..e89c47e288e 100644 --- a/src/plugins/acl/fa_node.c +++ b/src/plugins/acl/fa_node.c @@ -330,7 +330,7 @@ static void acl_fill_5tuple (acl_main_t * am, vlib_buffer_t * b0, int is_ip6, int is_input, int is_l2_path, fa_5tuple_t * p5tuple_pkt) { - int l3_offset = 14; + int l3_offset = ethernet_buffer_header_size(b0); int l4_offset; u16 ports[2]; u16 proto; -- 2.16.6