diff options
author | Matus Fabian <matfabia@cisco.com> | 2018-01-04 04:03:14 -0800 |
---|---|---|
committer | Matus Fabian <matfabia@cisco.com> | 2018-01-08 01:51:24 -0800 |
commit | a431ad1c486ad0fd9ca35e14c527fe7611965fc2 (patch) | |
tree | 38326f15ef87cba103db422bf7744a33fd8413b1 /src/plugins/nat/nat_reass.c | |
parent | 1049139a6d323e07bfb87710c9d2f1d467e980a9 (diff) |
NAT64: IPFix (VPP-1106)
Change-Id: Ib90dc5613c9fdac0344b3bd7f163e2f7163c64d8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat_reass.c')
-rw-r--r-- | src/plugins/nat/nat_reass.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/plugins/nat/nat_reass.c b/src/plugins/nat/nat_reass.c index a97d8f017e9..0a3660d9200 100644 --- a/src/plugins/nat/nat_reass.c +++ b/src/plugins/nat/nat_reass.c @@ -19,6 +19,7 @@ #include <vnet/vnet.h> #include <nat/nat_reass.h> +#include <nat/nat_ipfix_logging.h> nat_reass_main_t nat_reass_main; @@ -325,7 +326,11 @@ nat_ip4_reass_add_fragment (nat_reass_ip4_t * reass, u32 bi) u32 elt_index; if (reass->frag_n >= srm->ip4_max_frag) - return -1; + { + nat_ipfix_logging_max_fragments_ip4 (srm->ip4_max_frag, + &reass->key.src); + return -1; + } clib_spinlock_lock_if_init (&srm->ip4_reass_lock); @@ -517,7 +522,11 @@ nat_ip6_reass_add_fragment (nat_reass_ip6_t * reass, u32 bi) u32 elt_index; if (reass->frag_n >= srm->ip6_max_frag) - return -1; + { + nat_ipfix_logging_max_fragments_ip6 (srm->ip6_max_frag, + &reass->key.src); + return -1; + } clib_spinlock_lock_if_init (&srm->ip6_reass_lock); @@ -718,7 +727,7 @@ show_nat_reass_command_fn (vlib_main_t * vm, unformat_input_t * input, { vlib_cli_output (vm, "NAT IPv4 virtual fragmentation reassembly is %s", nat_reass_is_drop_frag (0) ? "DISABLED" : "ENABLED"); - vlib_cli_output (vm, " max-reasssemblies %u", nat_reass_get_max_reass (0)); + vlib_cli_output (vm, " max-reassemblies %u", nat_reass_get_max_reass (0)); vlib_cli_output (vm, " max-fragments %u", nat_reass_get_max_frag (0)); vlib_cli_output (vm, " timeout %usec", nat_reass_get_timeout (0)); vlib_cli_output (vm, " reassemblies:"); @@ -726,7 +735,7 @@ show_nat_reass_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "NAT IPv6 virtual fragmentation reassembly is %s", nat_reass_is_drop_frag (1) ? "DISABLED" : "ENABLED"); - vlib_cli_output (vm, " max-reasssemblies %u", nat_reass_get_max_reass (1)); + vlib_cli_output (vm, " max-reassemblies %u", nat_reass_get_max_reass (1)); vlib_cli_output (vm, " max-fragments %u", nat_reass_get_max_frag (1)); vlib_cli_output (vm, " timeout %usec", nat_reass_get_timeout (1)); vlib_cli_output (vm, " reassemblies:"); |