summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat66.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/nat66.c')
-rw-r--r--src/plugins/nat/nat66.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/nat/nat66.c b/src/plugins/nat/nat66.c
index a0f6ec7929a..a6606a458a7 100644
--- a/src/plugins/nat/nat66.c
+++ b/src/plugins/nat/nat66.c
@@ -40,12 +40,19 @@ VNET_FEATURE_INIT (nat66_out2in, static) = {
void
-nat66_init (void)
+nat66_init (vlib_main_t * vm)
{
nat66_main_t *nm = &nat66_main;
+ vlib_node_t *node;
u32 static_mapping_buckets = 1024;
uword static_mapping_memory_size = 64 << 20;
+ node = vlib_get_node_by_name (vm, (u8 *) "nat66-in2out");
+ nm->in2out_node_index = node->index;
+
+ node = vlib_get_node_by_name (vm, (u8 *) "nat66-out2in");
+ nm->out2in_node_index = node->index;
+
clib_bihash_init_24_8 (&nm->sm_l, "nat66-static-map-by-local",
static_mapping_buckets, static_mapping_memory_size);
clib_bihash_init_24_8 (&nm->sm_e, "nat66-static-map-by-external",