aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/nat44_cli.c11
-rw-r--r--src/plugins/nat/nat64.h2
-rw-r--r--src/plugins/nat/nat64_cli.c3
-rw-r--r--src/plugins/nat/nat_api.c3
4 files changed, 10 insertions, 9 deletions
diff --git a/src/plugins/nat/nat44_cli.c b/src/plugins/nat/nat44_cli.c
index d33ee5f353b..eba5d575cd6 100644
--- a/src/plugins/nat/nat44_cli.c
+++ b/src/plugins/nat/nat44_cli.c
@@ -126,12 +126,15 @@ snat_ipfix_logging_enable_disable_command_fn (vlib_main_t * vm,
int rv = 0;
clib_error_t *error = 0;
- // TODO: fix if you don't add domain id, "nat ipfix logging", won't
- // enable logging
-
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ {
+ rv = snat_ipfix_logging_enable_disable (enable, domain_id,
+ (u16) src_port);
+ if (rv)
+ return clib_error_return (0, "ipfix logging enable failed");
+ return 0;
+ }
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
diff --git a/src/plugins/nat/nat64.h b/src/plugins/nat/nat64.h
index eca5e7dbe96..b9251402a0c 100644
--- a/src/plugins/nat/nat64.h
+++ b/src/plugins/nat/nat64.h
@@ -123,7 +123,7 @@ extern vlib_node_registration_t nat64_out2in_node;
/**
* @brief Add/delete address to NAT64 pool.
*
- * @param thread_index Thread index.
+ * @param thread_index Thread index used by ipfix nat logging (not address per thread).
* @param addr IPv4 address.
* @param vrf_id VRF id of tenant, ~0 means independent of VRF.
* @param is_add 1 if add, 0 if delete.
diff --git a/src/plugins/nat/nat64_cli.c b/src/plugins/nat/nat64_cli.c
index 3f785c2a621..4efdf133042 100644
--- a/src/plugins/nat/nat64_cli.c
+++ b/src/plugins/nat/nat64_cli.c
@@ -73,8 +73,7 @@ nat64_add_del_pool_addr_command_fn (vlib_main_t * vm,
for (i = 0; i < count; i++)
{
- rv = nat64_add_del_pool_addr (vm->thread_index,
- &this_addr, vrf_id, is_add);
+ rv = nat64_add_del_pool_addr (0, &this_addr, vrf_id, is_add);
switch (rv)
{
diff --git a/src/plugins/nat/nat_api.c b/src/plugins/nat/nat_api.c
index 55e6bf9e90f..49b5f36946b 100644
--- a/src/plugins/nat/nat_api.c
+++ b/src/plugins/nat/nat_api.c
@@ -2324,8 +2324,7 @@ static void
for (i = 0; i < count; i++)
{
- if ((rv = nat64_add_del_pool_addr (vlib_get_thread_index (),
- &this_addr, vrf_id, mp->is_add)))
+ if ((rv = nat64_add_del_pool_addr (0, &this_addr, vrf_id, mp->is_add)))
goto send_reply;
increment_v4_address (&this_addr);