aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/llc/node.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/vnet/llc/node.c b/src/vnet/llc/node.c
index 60b5c13420c..542a7fd20f8 100644
--- a/src/vnet/llc/node.c
+++ b/src/vnet/llc/node.c
@@ -128,17 +128,14 @@ llc_input (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
b1 = vlib_get_buffer (vm, bi1);
- h0 = (void *) (b0->data + b0->current_data);
- h1 = (void *) (b1->data + b1->current_data);
+ h0 = vlib_buffer_get_current (b0);
+ h1 = vlib_buffer_get_current (b1);
len0 = llc_header_length (h0);
len1 = llc_header_length (h1);
- b0->current_data += len0;
- b1->current_data += len1;
-
- b0->current_length -= len0;
- b1->current_length -= len1;
+ vlib_buffer_advance (b0, len0);
+ vlib_buffer_advance (b1, len1);
next0 = lm->input_next_by_protocol[h0->dst_sap];
next1 = lm->input_next_by_protocol[h1->dst_sap];
@@ -207,13 +204,11 @@ llc_input (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
- h0 = (void *) (b0->data + b0->current_data);
+ h0 = vlib_buffer_get_current (b0);
len0 = llc_header_length (h0);
- b0->current_data += len0;
-
- b0->current_length -= len0;
+ vlib_buffer_advance (b0, len0);
next0 = lm->input_next_by_protocol[h0->dst_sap];