From 240b5ef57cc79cf32934ba8f218de29b6685406b Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Thu, 11 Jan 2018 04:09:17 -0800 Subject: NAT44: asymmetrical load balancing static mapping rule (VPP-1132) Add option to NAT44 load balancing static mapping API/CLI to make rule asymmetrical (rule match only in out2in direction). Change-Id: I325ecef5591e4bf44ce4469a24d44fe56c3bb2e9 Signed-off-by: Matus Fabian --- src/plugins/nat/in2out.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/nat/in2out.c') diff --git a/src/plugins/nat/in2out.c b/src/plugins/nat/in2out.c index 5f2f43f7f81..0b87ba47812 100755 --- a/src/plugins/nat/in2out.c +++ b/src/plugins/nat/in2out.c @@ -1467,7 +1467,7 @@ snat_in2out_node_fn_inline (vlib_main_t * vm, { s0 = snat_in2out_lb(sm, b0, ip0, rx_fib_index0, thread_index, now, vm, node); - if (!s0) + if (!s0 && !sm->forwarding_enabled) next0 = SNAT_IN2OUT_NEXT_DROP; goto trace00; } @@ -1646,7 +1646,7 @@ snat_in2out_node_fn_inline (vlib_main_t * vm, { s1 = snat_in2out_lb(sm, b1, ip1, rx_fib_index1, thread_index, now, vm, node); - if (!s1) + if (!s1 && !sm->forwarding_enabled) next1 = SNAT_IN2OUT_NEXT_DROP; goto trace01; } @@ -1858,7 +1858,7 @@ snat_in2out_node_fn_inline (vlib_main_t * vm, { s0 = snat_in2out_lb(sm, b0, ip0, rx_fib_index0, thread_index, now, vm, node); - if (!s0) + if (!s0 && !sm->forwarding_enabled) next0 = SNAT_IN2OUT_NEXT_DROP; goto trace0; } -- cgit 1.2.3-korg