Add missing init fn dependency to ipsec_init
ipsec_init fails if vnet_feature_init hasn't occurred. Can happen if a
particular set of plugins are loaded.
@@ -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;
