Change ipsec feature node names 24/16424/2
authorPierre Pfister <ppfister@cisco.com>
Mon, 10 Dec 2018 16:01:01 +0000 (17:01 +0100)
committerDamjan Marion <dmarion@me.com>
Wed, 12 Dec 2018 00:34:13 +0000 (00:34 +0000)
ipsec4-output and ipsec6-output were conflicting with ipsec
interface names ("ipsec<id>") and vnet/interface.c autogenerated
output node ("<ifname>-output").

Changing feature names seems to be the less invasive option.
This patch also changes "input" feature names for consistency.

Change-Id: I4ba10d07e9ba09df20aa2500104252b06b55f8f7
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
src/vnet/ip/ip4_forward.c
src/vnet/ip/ip6_forward.c
src/vnet/ipsec/ipsec.c
src/vnet/ipsec/ipsec_if_in.c
src/vnet/ipsec/ipsec_input.c
src/vnet/ipsec/ipsec_output.c

index 1ca4f93..c9db71b 100644 (file)
@@ -754,13 +754,13 @@ VNET_FEATURE_INIT (ip4_policer_classify, static) =
 {
   .arc_name = "ip4-unicast",
   .node_name = "ip4-policer-classify",
-  .runs_before = VNET_FEATURES ("ipsec4-input"),
+  .runs_before = VNET_FEATURES ("ipsec4-input-feature"),
 };
 
 VNET_FEATURE_INIT (ip4_ipsec, static) =
 {
   .arc_name = "ip4-unicast",
-  .node_name = "ipsec4-input",
+  .node_name = "ipsec4-input-feature",
   .runs_before = VNET_FEATURES ("vpath-input-ip4"),
 };
 
@@ -842,13 +842,13 @@ VNET_FEATURE_INIT (ip4_outacl, static) =
 {
   .arc_name = "ip4-output",
   .node_name = "ip4-outacl",
-  .runs_before = VNET_FEATURES ("ipsec4-output"),
+  .runs_before = VNET_FEATURES ("ipsec4-output-feature"),
 };
 
 VNET_FEATURE_INIT (ip4_ipsec_output, static) =
 {
   .arc_name = "ip4-output",
-  .node_name = "ipsec4-output",
+  .node_name = "ipsec4-output-feature",
   .runs_before = VNET_FEATURES ("interface-output"),
 };
 
index 3c0dcbf..999be87 100644 (file)
@@ -393,13 +393,13 @@ VNET_FEATURE_INIT (ip6_policer_classify, static) =
 {
   .arc_name = "ip6-unicast",
   .node_name = "ip6-policer-classify",
-  .runs_before = VNET_FEATURES ("ipsec6-input"),
+  .runs_before = VNET_FEATURES ("ipsec6-input-feature"),
 };
 
 VNET_FEATURE_INIT (ip6_ipsec, static) =
 {
   .arc_name = "ip6-unicast",
-  .node_name = "ipsec6-input",
+  .node_name = "ipsec6-input-feature",
   .runs_before = VNET_FEATURES ("l2tp-decap"),
 };
 
@@ -477,12 +477,12 @@ VNET_FEATURE_ARC_INIT (ip6_output, static) =
 VNET_FEATURE_INIT (ip6_outacl, static) = {
   .arc_name = "ip6-output",
   .node_name = "ip6-outacl",
-  .runs_before = VNET_FEATURES ("ipsec6-output"),
+  .runs_before = VNET_FEATURES ("ipsec6-output-feature"),
 };
 
 VNET_FEATURE_INIT (ip6_ipsec_output, static) = {
   .arc_name = "ip6-output",
-  .node_name = "ipsec6-output",
+  .node_name = "ipsec6-output-feature",
   .runs_before = VNET_FEATURES ("interface-output"),
 };
 
index bb62560..a88164b 100644 (file)
@@ -73,18 +73,18 @@ ipsec_set_interface_spd (vlib_main_t * vm, u32 sw_if_index, u32 spd_id,
                sw_if_index, spd_id, spd_index);
 
   /* enable IPsec on TX */
-  vnet_feature_enable_disable ("ip4-output", "ipsec4-output", sw_if_index,
-                              is_add, 0, 0);
-  vnet_feature_enable_disable ("ip6-output", "ipsec6-output", sw_if_index,
-                              is_add, 0, 0);
+  vnet_feature_enable_disable ("ip4-output", "ipsec4-output-feature",
+                              sw_if_index, is_add, 0, 0);
+  vnet_feature_enable_disable ("ip6-output", "ipsec6-output-feature",
+                              sw_if_index, is_add, 0, 0);
 
   config.spd_index = spd_index;
 
   /* enable IPsec on RX */
-  vnet_feature_enable_disable ("ip4-unicast", "ipsec4-input", sw_if_index,
-                              is_add, &config, sizeof (config));
-  vnet_feature_enable_disable ("ip6-unicast", "ipsec6-input", sw_if_index,
-                              is_add, &config, sizeof (config));
+  vnet_feature_enable_disable ("ip4-unicast", "ipsec4-input-feature",
+                              sw_if_index, is_add, &config, sizeof (config));
+  vnet_feature_enable_disable ("ip6-unicast", "ipsec6-input-feature",
+                              sw_if_index, is_add, &config, sizeof (config));
 
   return 0;
 }
@@ -611,13 +611,13 @@ ipsec_register_ah_backend (vlib_main_t * vm, ipsec_main_t * im,
   pool_get (im->ah_backends, b);
   b->name = format (NULL, "%s", name);
 
-  ipsec_add_node (vm, ah4_encrypt_node_name, "ipsec4-output",
+  ipsec_add_node (vm, ah4_encrypt_node_name, "ipsec4-output-feature",
                  &b->ah4_encrypt_node_index, &b->ah4_encrypt_next_index);
-  ipsec_add_node (vm, ah4_decrypt_node_name, "ipsec4-input",
+  ipsec_add_node (vm, ah4_decrypt_node_name, "ipsec4-input-feature",
                  &b->ah4_decrypt_node_index, &b->ah4_decrypt_next_index);
-  ipsec_add_node (vm, ah6_encrypt_node_name, "ipsec6-output",
+  ipsec_add_node (vm, ah6_encrypt_node_name, "ipsec6-output-feature",
                  &b->ah6_encrypt_node_index, &b->ah6_encrypt_next_index);
-  ipsec_add_node (vm, ah6_decrypt_node_name, "ipsec6-input",
+  ipsec_add_node (vm, ah6_decrypt_node_name, "ipsec6-input-feature",
                  &b->ah6_decrypt_node_index, &b->ah6_decrypt_next_index);
 
   b->check_support_cb = ah_check_support_cb;
@@ -639,13 +639,13 @@ ipsec_register_esp_backend (vlib_main_t * vm, ipsec_main_t * im,
   pool_get (im->esp_backends, b);
   b->name = format (NULL, "%s", name);
 
-  ipsec_add_node (vm, esp4_encrypt_node_name, "ipsec4-output",
+  ipsec_add_node (vm, esp4_encrypt_node_name, "ipsec4-output-feature",
                  &b->esp4_encrypt_node_index, &b->esp4_encrypt_next_index);
-  ipsec_add_node (vm, esp4_decrypt_node_name, "ipsec4-input",
+  ipsec_add_node (vm, esp4_decrypt_node_name, "ipsec4-input-feature",
                  &b->esp4_decrypt_node_index, &b->esp4_decrypt_next_index);
-  ipsec_add_node (vm, esp6_encrypt_node_name, "ipsec6-output",
+  ipsec_add_node (vm, esp6_encrypt_node_name, "ipsec6-output-feature",
                  &b->esp6_encrypt_node_index, &b->esp6_encrypt_next_index);
-  ipsec_add_node (vm, esp6_decrypt_node_name, "ipsec6-input",
+  ipsec_add_node (vm, esp6_decrypt_node_name, "ipsec6-input-feature",
                  &b->esp6_decrypt_node_index, &b->esp6_decrypt_next_index);
 
   b->check_support_cb = esp_check_support_cb;
index a9aab82..1dbd127 100644 (file)
@@ -230,7 +230,7 @@ VLIB_REGISTER_NODE (ipsec_if_input_node) = {
   .n_errors = ARRAY_LEN(ipsec_if_input_error_strings),
   .error_strings = ipsec_if_input_error_strings,
 
-  .sibling_of = "ipsec4-input",
+  .sibling_of = "ipsec4-input-feature",
 };
 /* *INDENT-ON* */
 
index ef4113a..1f3d6d0 100644 (file)
@@ -335,7 +335,7 @@ VLIB_NODE_FN (ipsec4_input_node) (vlib_main_t * vm,
 
 /* *INDENT-OFF* */
 VLIB_REGISTER_NODE (ipsec4_input_node,static) = {
-  .name = "ipsec4-input",
+  .name = "ipsec4-input-feature",
   .vector_size = sizeof (u32),
   .format_trace = format_ipsec_input_trace,
   .type = VLIB_NODE_TYPE_INTERNAL,
@@ -482,7 +482,7 @@ VLIB_NODE_FN (ipsec6_input_node) (vlib_main_t * vm,
 
 /* *INDENT-OFF* */
 VLIB_REGISTER_NODE (ipsec6_input_node,static) = {
-  .name = "ipsec6-input",
+  .name = "ipsec6-input-feature",
   .vector_size = sizeof (u32),
   .format_trace = format_ipsec_input_trace,
   .type = VLIB_NODE_TYPE_INTERNAL,
@@ -490,7 +490,7 @@ VLIB_REGISTER_NODE (ipsec6_input_node,static) = {
   .n_errors = ARRAY_LEN(ipsec_input_error_strings),
   .error_strings = ipsec_input_error_strings,
 
-  .sibling_of = "ipsec4-input",
+  .sibling_of = "ipsec4-input-feature",
 };
 /* *INDENT-ON* */
 
index 6b99965..2ab98e7 100644 (file)
@@ -428,7 +428,7 @@ VLIB_NODE_FN (ipsec4_output_node) (vlib_main_t * vm,
 
 /* *INDENT-OFF* */
 VLIB_REGISTER_NODE (ipsec4_output_node) = {
-  .name = "ipsec4-output",
+  .name = "ipsec4-output-feature",
   .vector_size = sizeof (u32),
   .format_trace = format_ipsec_output_trace,
   .type = VLIB_NODE_TYPE_INTERNAL,
@@ -454,7 +454,7 @@ VLIB_NODE_FN (ipsec6_output_node) (vlib_main_t * vm,
 
 /* *INDENT-OFF* */
 VLIB_REGISTER_NODE (ipsec6_output_node) = {
-  .name = "ipsec6-output",
+  .name = "ipsec6-output-feature",
   .vector_size = sizeof (u32),
   .format_trace = format_ipsec_output_trace,
   .type = VLIB_NODE_TYPE_INTERNAL,
@@ -487,13 +487,13 @@ ipsec_output_node_fn (vlib_main_t * vm,
 VLIB_REGISTER_NODE (ipsec4_output_node) = {
   .vector_size = sizeof (u32),
   .function = ipsec_output_node_fn,
-  .name = "ipsec4-output",
+  .name = "ipsec4-output-feature",
 };
 
 VLIB_REGISTER_NODE (ipsec6_output_node) = {
   .vector_size = sizeof (u32),
   .function = ipsec_output_node_fn,
-  .name = "ipsec6-output",
+  .name = "ipsec6-output-feature",
 };
 /* *INDENT-ON* */
 #endif