From: Andrew Yourtchenko Date: Wed, 21 Jun 2017 10:20:39 +0000 (+0200) Subject: acl-plugin: use ethernet_buffer_header_size() to determine the size of the ethernet... X-Git-Tag: v17.07-rc1~11 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=a2b4ac1c13559b1cdf5088edfad4a68022960b00;p=vpp.git 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 --- 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;