acl-plugin: use ethernet_buffer_header_size() to determine the size of the ethernet... 45/7245/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 21 Jun 2017 10:20:39 +0000 (12:20 +0200)
committerOle Trøan <otroan@employees.org>
Wed, 21 Jun 2017 20:31:33 +0000 (20:31 +0000)
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 <ayourtch@gmail.com>
src/plugins/acl/fa_node.c

index 3c23c80..e89c47e 100644 (file)
@@ -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;