summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat64_db.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-11-28 21:26:34 -0800
committerDamjan Marion <dmarion@me.com>2018-11-29 11:28:29 +0000
commitad1f3e148224bced41afd47b0ab1ed158c07f399 (patch)
tree55b6e252ff6937f558dba7cd02819b5827923bc8 /src/plugins/nat/nat64_db.c
parent2eb42e70616f341435d1f390a13df4cd49ef2c4b (diff)
NAT: syslog - sessions logging (VPP-1139)
Change-Id: I6e0b7cf37c1a9ac66f8ac011db29504e57844ee9 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat64_db.c')
-rw-r--r--src/plugins/nat/nat64_db.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/nat/nat64_db.c b/src/plugins/nat/nat64_db.c
index bb327a57152..ca8358ef8a2 100644
--- a/src/plugins/nat/nat64_db.c
+++ b/src/plugins/nat/nat64_db.c
@@ -19,6 +19,7 @@
#include <nat/nat64_db.h>
#include <nat/nat_ipfix_logging.h>
#include <nat/nat_inlines.h>
+#include <nat/nat_syslog.h>
#include <vnet/fib/fib_table.h>
int
@@ -456,7 +457,9 @@ nat64_db_st_entry_create (nat64_db_t * db, nat64_db_bib_entry_t * bibe,
&ste->in_r_addr, &ste->out_r_addr,
ste->r_port, ste->r_port, fib->ft_table_id,
1);
-
+ nat_syslog_nat64_sadd (bibe->fib_index, &bibe->in_addr, bibe->in_port,
+ &bibe->out_addr, bibe->out_port, &ste->out_r_addr,
+ ste->r_port, bibe->proto);
return ste;
}
@@ -528,6 +531,9 @@ nat64_db_st_entry_free (nat64_db_t * db, nat64_db_st_entry_t * ste)
&ste->in_r_addr, &ste->out_r_addr,
ste->r_port, ste->r_port, fib->ft_table_id,
0);
+ nat_syslog_nat64_sdel (bibe->fib_index, &bibe->in_addr, bibe->in_port,
+ &bibe->out_addr, bibe->out_port, &ste->out_r_addr,
+ ste->r_port, bibe->proto);
/* delete from pool */
pool_put (st, ste);