summaryrefslogtreecommitdiffstats
path: root/src/plugins/snat/nat64.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-06-19 05:28:27 -0700
committerOle Trøan <otroan@employees.org>2017-06-19 19:21:15 +0000
commit08ce432ce9727c7e099ea6c4630e4e6ebbecc92a (patch)
tree98f77344c4a82d6471243072cd3c9b72d9186b9e /src/plugins/snat/nat64.c
parent45ca2c7a9c0835e1b5d5641ca230f720b49e8cf4 (diff)
NAT64: change not supported multi threading behaviour
Disable CLI/API commands instead of error message on startup. Change-Id: I313ed6e2ea009f573afb5e08b0e85ed1f9091dc3 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/snat/nat64.c')
-rw-r--r--src/plugins/snat/nat64.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/snat/nat64.c b/src/plugins/snat/nat64.c
index 1e8b75967d8..d6e052f106d 100644
--- a/src/plugins/snat/nat64.c
+++ b/src/plugins/snat/nat64.c
@@ -47,9 +47,11 @@ nat64_init (vlib_main_t * vm)
clib_error_t *error = 0;
vlib_thread_main_t *tm = vlib_get_thread_main ();
+ nm->is_disabled = 0;
+
if (tm->n_vlib_mains > 1)
{
- error = clib_error_return (0, "multi thread not supported");
+ nm->is_disabled = 1;
goto error;
}
@@ -609,7 +611,7 @@ nat64_expire_walk_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
{
nat64_main_t *nm = &nat64_main;
- while (1)
+ while (!nm->is_disabled)
{
vlib_process_wait_for_event_or_clock (vm, 10.0);
vlib_process_get_events (vm, NULL);