summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/in2out.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-01-11 04:09:17 -0800
committerMatus Fabian <matfabia@cisco.com>2018-01-11 04:10:26 -0800
commit240b5ef57cc79cf32934ba8f218de29b6685406b (patch)
treef7fb27adbc53bfa26b6fef986f11976e3345debb /src/plugins/nat/in2out.c
parent0ae15ed43aaa600a75ca4c154bc62478820c00b4 (diff)
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 <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/in2out.c')
-rwxr-xr-xsrc/plugins/nat/in2out.c6
1 files changed, 3 insertions, 3 deletions
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;
}