summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ipsec/ipsec.c')
-rw-r--r--src/vnet/ipsec/ipsec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c
index 3586ca2627f..4e69e734702 100644
--- a/src/vnet/ipsec/ipsec.c
+++ b/src/vnet/ipsec/ipsec.c
@@ -107,6 +107,7 @@ ipsec_add_feature (const char *arc_name,
u8 arc;
arc = vnet_get_feature_arc_index (arc_name);
+ ASSERT (arc != ~0);
*out_feature_index = vnet_get_feature_index (arc, node_name);
}
@@ -247,6 +248,10 @@ ipsec_init (vlib_main_t * vm)
ipsec_main_t *im = &ipsec_main;
ipsec_main_crypto_alg_t *a;
+ /* Backend registration requires the feature arcs to be set up */
+ if ((error = vlib_call_init_function (vm, vnet_feature_init)))
+ return (error);
+
im->vnet_main = vnet_get_main ();
im->vlib_main = vm;