summaryrefslogtreecommitdiffstats
path: root/src/plugins/snat/snat.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/snat.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/snat.c')
-rw-r--r--src/plugins/snat/snat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/snat/snat.c b/src/plugins/snat/snat.c
index 351f8dc7e12..df0a5a07294 100644
--- a/src/plugins/snat/snat.c
+++ b/src/plugins/snat/snat.c
@@ -725,7 +725,7 @@ snat_ip4_add_del_interface_address_cb (ip4_main_t * im,
static clib_error_t * snat_init (vlib_main_t * vm)
{
snat_main_t * sm = &snat_main;
- clib_error_t * error = 0, * error_nat64 = 0;
+ clib_error_t * error = 0;
ip4_main_t * im = &ip4_main;
ip_lookup_main_t * lm = &im->lookup_main;
uword *p;
@@ -772,6 +772,8 @@ static clib_error_t * snat_init (vlib_main_t * vm)
}
error = snat_api_init(vm, sm);
+ if (error)
+ return error;
/* Set up the interface address add/del callback */
cb4.function = snat_ip4_add_del_interface_address_cb;
@@ -782,9 +784,7 @@ static clib_error_t * snat_init (vlib_main_t * vm)
/* Init IPFIX logging */
snat_ipfix_logging_init(vm);
- error_nat64 = nat64_init(vm);
- if (error_nat64)
- clib_warning("NAT64 init failed: %U", format_clib_error, error_nat64);
+ error = nat64_init(vm);
return error;
}