aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Shin <jonshin@cisco.com>2018-02-26 11:43:31 -0800
committerSteve Shin <jonshin@cisco.com>2018-02-26 11:43:31 -0800
commit2ae03d2f8f8336454edb34187e222544c1452014 (patch)
treef6c1ec5f6afd3d4cc0955f1a7231b082ba911aca
parentf9a968e2f928111e53de43fdf33dbf5145210074 (diff)
Fix current data offset to use vlib_buffer_get_current in input/output ACL
vlib_buffer_get_current() should be used for current data offset in ACL. This is required for output ACL where packets are decoded through a vxlan tunnel rx node. Change-Id: I6f739f251c3eb0d59ee4ae0da97aa04ddf667468 Signed-off-by: Steve Shin <jonshin@cisco.com>
-rw-r--r--src/vnet/l2/l2_in_out_acl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/l2/l2_in_out_acl.c b/src/vnet/l2/l2_in_out_acl.c
index 6f86a9f66ae..1ca13613078 100644
--- a/src/vnet/l2/l2_in_out_acl.c
+++ b/src/vnet/l2/l2_in_out_acl.c
@@ -197,7 +197,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
if (t0->current_data_flag == CLASSIFY_FLAG_USE_CURR_DATA)
h0 = (void *) vlib_buffer_get_current (b0) + t0->current_data_offset;
else
- h0 = b0->data;
+ h0 = (void *) vlib_buffer_get_current (b0);
vnet_buffer (b0)->l2_classify.hash =
vnet_classify_hash_packet (t0, (u8 *) h0);
@@ -207,7 +207,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
if (t1->current_data_flag == CLASSIFY_FLAG_USE_CURR_DATA)
h1 = (void *) vlib_buffer_get_current (b1) + t1->current_data_offset;
else
- h1 = b1->data;
+ h1 = (void *) vlib_buffer_get_current (b1);
vnet_buffer (b1)->l2_classify.hash =
vnet_classify_hash_packet (t1, (u8 *) h1);
@@ -244,7 +244,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
if (t0->current_data_flag == CLASSIFY_FLAG_USE_CURR_DATA)
h0 = (void *) vlib_buffer_get_current (b0) + t0->current_data_offset;
else
- h0 = b0->data;
+ h0 = (void *) vlib_buffer_get_current (b0);
vnet_buffer (b0)->l2_classify.hash =
vnet_classify_hash_packet (t0, (u8 *) h0);
@@ -329,7 +329,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
(void *) vlib_buffer_get_current (b0) +
t0->current_data_offset;
else
- h0 = b0->data;
+ h0 = (void *) vlib_buffer_get_current (b0);
e0 = vnet_classify_find_entry (t0, (u8 *) h0, hash0, now);
if (e0)
@@ -384,7 +384,7 @@ l2_in_out_acl_node_fn (vlib_main_t * vm,
(void *) vlib_buffer_get_current (b0) +
t0->current_data_offset;
else
- h0 = b0->data;
+ h0 = (void *) vlib_buffer_get_current (b0);
hash0 = vnet_classify_hash_packet (t0, (u8 *) h0);
e0 = vnet_classify_find_entry