aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat64.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/nat64.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/nat64.c')
-rw-r--r--src/plugins/nat/nat64.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/plugins/nat/nat64.c b/src/plugins/nat/nat64.c
index 126cb3cdf79..9c7300462d9 100644
--- a/src/plugins/nat/nat64.c
+++ b/src/plugins/nat/nat64.c
@@ -232,16 +232,31 @@ nat64_init (vlib_main_t * vm)
vlib_thread_main_t *tm = vlib_get_thread_main ();
ip4_add_del_interface_address_callback_t cb4;
ip4_main_t *im = &ip4_main;
- vlib_node_t *error_drop_node =
- vlib_get_node_by_name (vm, (u8 *) "error-drop");
+ nm->sm = &snat_main;
+ vlib_node_t *node;
vec_validate (nm->db, tm->n_vlib_mains - 1);
- nm->sm = &snat_main;
-
nm->fq_in2out_index = ~0;
nm->fq_out2in_index = ~0;
- nm->error_node_index = error_drop_node->index;
+
+ node = vlib_get_node_by_name (vm, (u8 *) "error-drop");
+ nm->error_node_index = node->index;
+
+ node = vlib_get_node_by_name (vm, (u8 *) "nat64-in2out");
+ nm->in2out_node_index = node->index;
+
+ node = vlib_get_node_by_name (vm, (u8 *) "nat64-in2out-slowpath");
+ nm->in2out_slowpath_node_index = node->index;
+
+ node = vlib_get_node_by_name (vm, (u8 *) "nat64-in2out-reass");
+ nm->in2out_reass_node_index = node->index;
+
+ node = vlib_get_node_by_name (vm, (u8 *) "nat64-out2in");
+ nm->out2in_node_index = node->index;
+
+ node = vlib_get_node_by_name (vm, (u8 *) "nat64-out2in-reass");
+ nm->out2in_reass_node_index = node->index;
/* set session timeouts to default values */
nm->udp_timeout = SNAT_UDP_TIMEOUT;