summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2017-06-21 12:20:39 +0200
committerOle Trøan <otroan@employees.org>2017-06-21 20:31:33 +0000
commita2b4ac1c13559b1cdf5088edfad4a68022960b00 (patch)
treeb3f2b9731cb4aeb334c724748197807825144b7e
parent4393f27ddff96da77cc142477496f01e24b790c5 (diff)
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 <ayourtch@gmail.com>
-rw-r--r--src/plugins/acl/fa_node.c2
1 files changed, 1 insertions, 1 deletions
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;