summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/ipsec/esp_decrypt.c
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2018-10-22 16:37:25 -0500
committerDamjan Marion <dmarion@me.com>2018-10-23 13:07:58 +0000
commit1dfdb289a105dafb11d161abaf7e9c946cbf228e (patch)
tree3dfb7aa614b991256a6ba2bce019e9c553446a15 /src/plugins/dpdk/ipsec/esp_decrypt.c
parentb7b929931a07fbb27b43d5cd105f366c3e29807e (diff)
dpdk: add esp6 decrypt nodes, func declarations
The function dpdk_ipsec_process() attempts to initialize some globals that store node indexes after looking up the node dpdk-esp6-decrypt. No such node was declared, so a segv occurs after dereferencing the result of the lookup. Add a node function that invokes dpdk_esp_decrypt_inline() with is_ip6 set to 1. Add a declaration of node dpdk-esp6-decrypt that uses the node function. Change-Id: I31ce23a458c2d4181bf40cbc2118c4ef3b9baf97 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/plugins/dpdk/ipsec/esp_decrypt.c')
-rw-r--r--src/plugins/dpdk/ipsec/esp_decrypt.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/plugins/dpdk/ipsec/esp_decrypt.c b/src/plugins/dpdk/ipsec/esp_decrypt.c
index 51e2116acb0..9cf9c762ada 100644
--- a/src/plugins/dpdk/ipsec/esp_decrypt.c
+++ b/src/plugins/dpdk/ipsec/esp_decrypt.c
@@ -409,6 +409,36 @@ VLIB_REGISTER_NODE (dpdk_esp4_decrypt_node) = {
VLIB_NODE_FUNCTION_MULTIARCH (dpdk_esp4_decrypt_node, dpdk_esp4_decrypt_node_fn);
+static uword
+dpdk_esp6_decrypt_node_fn (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * from_frame)
+{
+ return dpdk_esp_decrypt_inline(vm, node, from_frame, 1 /*is_ip6*/);
+}
+
+/* *INDENT-OFF* */
+VLIB_REGISTER_NODE (dpdk_esp6_decrypt_node) = {
+ .function = dpdk_esp6_decrypt_node_fn,
+ .name = "dpdk-esp6-decrypt",
+ .vector_size = sizeof (u32),
+ .format_trace = format_esp_decrypt_trace,
+ .type = VLIB_NODE_TYPE_INTERNAL,
+
+ .n_errors = ARRAY_LEN(esp_decrypt_error_strings),
+ .error_strings = esp_decrypt_error_strings,
+
+ .n_next_nodes = ESP_DECRYPT_N_NEXT,
+ .next_nodes = {
+#define _(s,n) [ESP_DECRYPT_NEXT_##s] = n,
+ foreach_esp_decrypt_next
+#undef _
+ },
+};
+/* *INDENT-ON* */
+
+VLIB_NODE_FUNCTION_MULTIARCH (dpdk_esp6_decrypt_node, dpdk_esp6_decrypt_node_fn);
+
/*
* Decrypt Post Node
*/