diff options
author | Filip Varga <fivarga@cisco.com> | 2020-09-14 11:20:16 +0200 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2020-10-07 09:05:50 +0000 |
commit | 1f36023d29137825b8a09578d09b955046c2415b (patch) | |
tree | c00726718d9d8b4f5ecc74c45d9a2d790deb0250 /src/plugins/nat/nat44_cli.c | |
parent | d1762e614d1e05cbeda4d91e921fa663b2b46c03 (diff) |
nat: move nat64 to a subfeature
Type: refactor
Change-Id: I3b9e17164647d2019b1f40cffeed63393345219e
Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat44_cli.c')
-rw-r--r-- | src/plugins/nat/nat44_cli.c | 47 |
1 files changed, 5 insertions, 42 deletions
diff --git a/src/plugins/nat/nat44_cli.c b/src/plugins/nat/nat44_cli.c index f61ce2c2ab7..ef11f519fa1 100644 --- a/src/plugins/nat/nat44_cli.c +++ b/src/plugins/nat/nat44_cli.c @@ -19,7 +19,7 @@ #include <nat/nat.h> #include <nat/nat_ipfix_logging.h> -#include <nat/nat64.h> +#include <nat/lib/nat_inlines.h> #include <nat/nat_inlines.h> #include <nat/nat44/inlines.h> #include <nat/nat_affinity.h> @@ -1774,55 +1774,18 @@ set_timeout_command_fn (vlib_main_t * vm, while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) { - if (unformat (line_input, "udp %u", &sm->udp_timeout)) - { - if (nat64_set_udp_timeout (sm->udp_timeout)) - { - error = clib_error_return (0, "Invalid UDP timeout value"); - goto done; - } - } + if (unformat (line_input, "udp %u", &sm->udp_timeout)); else if (unformat (line_input, "tcp-established %u", - &sm->tcp_established_timeout)) - { - if (nat64_set_tcp_timeouts - (sm->tcp_transitory_timeout, sm->tcp_established_timeout)) - { - error = - clib_error_return (0, - "Invalid TCP established timeouts value"); - goto done; - } - } + &sm->tcp_established_timeout)); else if (unformat (line_input, "tcp-transitory %u", - &sm->tcp_transitory_timeout)) - { - if (nat64_set_tcp_timeouts - (sm->tcp_transitory_timeout, sm->tcp_established_timeout)) - { - error = - clib_error_return (0, - "Invalid TCP transitory timeouts value"); - goto done; - } - } - else if (unformat (line_input, "icmp %u", &sm->icmp_timeout)) - { - if (nat64_set_icmp_timeout (sm->icmp_timeout)) - { - error = clib_error_return (0, "Invalid ICMP timeout value"); - goto done; - } - } + &sm->tcp_transitory_timeout)); + else if (unformat (line_input, "icmp %u", &sm->icmp_timeout)); else if (unformat (line_input, "reset")) { sm->udp_timeout = SNAT_UDP_TIMEOUT; sm->tcp_established_timeout = SNAT_TCP_ESTABLISHED_TIMEOUT; sm->tcp_transitory_timeout = SNAT_TCP_TRANSITORY_TIMEOUT; sm->icmp_timeout = SNAT_ICMP_TIMEOUT; - nat64_set_udp_timeout (0); - nat64_set_icmp_timeout (0); - nat64_set_tcp_timeouts (0, 0); } else { |