summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat66.c
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2019-02-13 01:42:59 -0800
committerDamjan Marion <dmarion@me.com>2019-02-18 16:46:50 +0000
commite69e423743630b52e13db58c3f0229df8a46c07f (patch)
tree5471b64b7fe38031f47791c987f9791fc8207fa7 /src/plugins/nat/nat66.c
parent7dcb80a202f1ce075434a17ace3334a7a311e84e (diff)
NAT: VPP-1552 code migration from old multiarch scheme
Change-Id: I88f3df8aaa521e7707ef3335acdbf1ab41e7ee28 Signed-off-by: Filip Varga <fivarga@cisco.com>
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",