summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec.c
diff options
context:
space:
mode:
author“mukeshyadav1984” <mukyadav@cisco.com>2017-11-23 02:39:33 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-28 12:26:30 +0000
commit430ac939d115b59e3f7f704645c6f88878223e1b (patch)
treeca5bbc6e7ab3c60316ed602f9a637ff423203f96 /src/vnet/ipsec/ipsec.c
parentb3eeb6a5dd17627f56f5a9f299950c96f952e7a1 (diff)
IPSec AH protocol enhancement in VPP native core
Change-Id: Iec5804d768485f4015bbf732d8d19ef2f24e6939 Signed-off-by: “mukeshyadav1984” <mukyadav@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec.c')
-rw-r--r--src/vnet/ipsec/ipsec.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c
index cd05c1bb9bf..ab3c83b02f5 100644
--- a/src/vnet/ipsec/ipsec.c
+++ b/src/vnet/ipsec/ipsec.c
@@ -23,6 +23,7 @@
#include <vnet/ipsec/ipsec.h>
#include <vnet/ipsec/ikev2.h>
#include <vnet/ipsec/esp.h>
+#include <vnet/ipsec/ah.h>
ipsec_main_t ipsec_main;
@@ -567,8 +568,18 @@ ipsec_init (vlib_main_t * vm)
ASSERT (node);
im->esp_decrypt_node_index = node->index;
+ node = vlib_get_node_by_name (vm, (u8 *) "ah-encrypt");
+ ASSERT (node);
+ im->ah_encrypt_node_index = node->index;
+
+ node = vlib_get_node_by_name (vm, (u8 *) "ah-decrypt");
+ ASSERT (node);
+ im->ah_decrypt_node_index = node->index;
+
im->esp_encrypt_next_index = IPSEC_OUTPUT_NEXT_ESP_ENCRYPT;
im->esp_decrypt_next_index = IPSEC_INPUT_NEXT_ESP_DECRYPT;
+ im->ah_encrypt_next_index = IPSEC_OUTPUT_NEXT_AH_ENCRYPT;
+ im->ah_decrypt_next_index = IPSEC_INPUT_NEXT_AH_DECRYPT;
im->cb.check_support_cb = ipsec_check_support;
@@ -578,7 +589,7 @@ ipsec_init (vlib_main_t * vm)
if ((error = vlib_call_init_function (vm, ipsec_tunnel_if_init)))
return error;
- esp_init ();
+ ipsec_proto_init ();
if ((error = ikev2_init (vm)))
return error;