diff options
author | Damjan Marion <damarion@cisco.com> | 2016-06-10 20:42:44 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-06-10 20:42:44 +0200 |
commit | 902474657dbc33b85aae1d0fe2c5b8f345d4d601 (patch) | |
tree | a0022729c33a3b704704ba774ce148725446fa3a | |
parent | 725c59cfc7572943e24c80dcdf79dc0446ec5e0a (diff) |
Copy missing buffer metadata for ESP transport mode packets
Change-Id: I3f5113533b365366cc3f6ef87858e19879f703cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r-- | vnet/vnet/ipsec/esp_encrypt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vnet/vnet/ipsec/esp_encrypt.c b/vnet/vnet/ipsec/esp_encrypt.c index d1dbcf96f84..c81a87812ea 100644 --- a/vnet/vnet/ipsec/esp_encrypt.c +++ b/vnet/vnet/ipsec/esp_encrypt.c @@ -203,6 +203,7 @@ esp_encrypt_node_fn (vlib_main_t * vm, last_empty_buffer = vec_len (empty_buffers) - 1; o_bi0 = empty_buffers[last_empty_buffer]; o_b0 = vlib_get_buffer (vm, o_bi0); + o_b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID; o_b0->current_data = sizeof(ethernet_header_t); ih0 = vlib_buffer_get_current (i_b0); vlib_prefetch_buffer_with_index (vm, empty_buffers[last_empty_buffer-1], STORE); @@ -271,8 +272,11 @@ esp_encrypt_node_fn (vlib_main_t * vm, else { next0 = ESP_ENCRYPT_NEXT_INTERFACE_OUTPUT; + o_b0->flags |= BUFFER_OUTPUT_FEAT_DONE; vnet_buffer (o_b0)->sw_if_index[VLIB_TX] = vnet_buffer (i_b0)->sw_if_index[VLIB_TX]; + vnet_buffer(o_b0)->output_features.bitmap = + vnet_buffer(i_b0)->output_features.bitmap; } ASSERT(sa0->crypto_alg < IPSEC_CRYPTO_N_ALG); @@ -301,7 +305,6 @@ esp_encrypt_node_fn (vlib_main_t * vm, vnet_buffer (o_b0)->sw_if_index[VLIB_RX] = vnet_buffer (i_b0)->sw_if_index[VLIB_RX]; - o_b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID; u8 iv[16]; RAND_bytes(iv, sizeof(iv)); |