summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat66.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2019-10-10 09:46:06 +0000
committerOle Trøan <otroan@employees.org>2020-01-03 10:10:15 +0000
commitf126e746fc01c75bc99329d10ce9127b26b23814 (patch)
treefaf9f09a363add6e140f30e25187b330843b3d21 /src/plugins/nat/nat66.c
parent3535501b19aec95dfd32870c784f841f57b5c045 (diff)
nat: use SVR
Remove NAT's implementation of shallow virtual reassembly with corresponding CLIs, APIs & tests. Replace with standalone shallow virtual reassembly provided by ipX-sv-reass* nodes. Type: refactor Change-Id: I7e6c7487a5a500d591f6871474a359e0993e59b6 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat66.c')
-rw-r--r--src/plugins/nat/nat66.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/nat/nat66.c b/src/plugins/nat/nat66.c
index e5e783b31f7..3ac773c7da4 100644
--- a/src/plugins/nat/nat66.c
+++ b/src/plugins/nat/nat66.c
@@ -19,6 +19,7 @@
#include <nat/nat66.h>
#include <vnet/fib/fib_table.h>
+#include <vnet/ip/reass/ip6_sv_reass.h>
nat66_main_t nat66_main;
@@ -29,11 +30,13 @@ VNET_FEATURE_INIT (nat66_in2out, static) = {
.arc_name = "ip6-unicast",
.node_name = "nat66-in2out",
.runs_before = VNET_FEATURES ("ip6-lookup"),
+ .runs_after = VNET_FEATURES ("ip6-sv-reassembly-feature"),
};
VNET_FEATURE_INIT (nat66_out2in, static) = {
.arc_name = "ip6-unicast",
.node_name = "nat66-out2in",
.runs_before = VNET_FEATURES ("ip6-lookup"),
+ .runs_after = VNET_FEATURES ("ip6-sv-reassembly-feature"),
};
/* *INDENT-ON* */
@@ -99,6 +102,9 @@ nat66_interface_add_del (u32 sw_if_index, u8 is_inside, u8 is_add)
}
feature_name = is_inside ? "nat66-in2out" : "nat66-out2in";
+ int rv = ip6_sv_reass_enable_disable_with_refcnt (sw_if_index, is_add);
+ if (rv)
+ return rv;
return vnet_feature_enable_disable ("ip6-unicast", feature_name,
sw_if_index, is_add, 0, 0);
}