diff options
Diffstat (limited to 'src/vnet/ip')
-rw-r--r-- | src/vnet/ip/ip4_forward.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c index 060787f9561..caf02d118cb 100644 --- a/src/vnet/ip/ip4_forward.c +++ b/src/vnet/ip/ip4_forward.c @@ -2505,8 +2505,7 @@ ip4_rewrite_inline_with_gso (vlib_main_t * vm, if (PREDICT_TRUE (error0 == IP4_ERROR_NONE)) { u32 next_index = adj0[0].rewrite_header.next_index; - b[0]->current_data -= rw_len0; - b[0]->current_length += rw_len0; + vlib_buffer_advance (b[0], -(word) rw_len0); tx_sw_if_index0 = adj0[0].rewrite_header.sw_if_index; vnet_buffer (b[0])->sw_if_index[VLIB_TX] = tx_sw_if_index0; @@ -2523,8 +2522,7 @@ ip4_rewrite_inline_with_gso (vlib_main_t * vm, if (PREDICT_TRUE (error1 == IP4_ERROR_NONE)) { u32 next_index = adj1[0].rewrite_header.next_index; - b[1]->current_data -= rw_len1; - b[1]->current_length += rw_len1; + vlib_buffer_advance (b[1], -(word) rw_len1); tx_sw_if_index1 = adj1[0].rewrite_header.sw_if_index; vnet_buffer (b[1])->sw_if_index[VLIB_TX] = tx_sw_if_index1; @@ -2641,8 +2639,7 @@ ip4_rewrite_inline_with_gso (vlib_main_t * vm, if (PREDICT_TRUE (error0 == IP4_ERROR_NONE)) { u32 next_index = adj0[0].rewrite_header.next_index; - b[0]->current_data -= rw_len0; - b[0]->current_length += rw_len0; + vlib_buffer_advance (b[0], -(word) rw_len0); tx_sw_if_index0 = adj0[0].rewrite_header.sw_if_index; vnet_buffer (b[0])->sw_if_index[VLIB_TX] = tx_sw_if_index0; |