* limitations under the License.
*/
/**
- * @file ipsec_gre.c
+ * @file
* @brief L2-GRE over IPSec packet processing.
*
* Add GRE header to thr packet and send it to the esp-encrypt node.
ipsec_gre_main_t ipsec_gre_main;
-/**
- * @brief IPv4 and GRE header.
- *
-*/
-/* *INDENT-OFF* */
-typedef CLIB_PACKED (struct
-{
- ip4_header_t ip4;
- gre_header_t gre;
-}) ip4_and_gre_header_t;
-/* *INDENT-OFF* */
-
/**
* @brief IPv4 and GRE header union.
*
ip0->checksum = ip4_header_checksum (ip0);
ip1->checksum = ip4_header_checksum (ip1);
+ vnet_buffer (b0)->sw_if_index[VLIB_RX] =
+ vnet_buffer (b0)->sw_if_index[VLIB_TX];
+ vnet_buffer (b1)->sw_if_index[VLIB_RX] =
+ vnet_buffer (b1)->sw_if_index[VLIB_TX];
+
vnet_buffer (b0)->output_features.ipsec_sad_index = t->local_sa;
vnet_buffer (b1)->output_features.ipsec_sad_index = t->local_sa;
ip0->dst_address.as_u32 = t->tunnel_dst.as_u32;
ip0->checksum = ip4_header_checksum (ip0);
+ vnet_buffer (b0)->sw_if_index[VLIB_RX] =
+ vnet_buffer (b0)->sw_if_index[VLIB_TX];
vnet_buffer (b0)->output_features.ipsec_sad_index = t->local_sa;
vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;