summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/plugins/nat/out2in.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/nat/out2in.c b/src/plugins/nat/out2in.c
index 5ae0808ace9..4308ed25834 100755
--- a/src/plugins/nat/out2in.c
+++ b/src/plugins/nat/out2in.c
@@ -1715,13 +1715,13 @@ icmp_get_ed_key(ip4_header_t *ip0, nat_ed_ses_key_t *p_key0)
static int
next_src_nat (snat_main_t * sm, ip4_header_t * ip, u8 proto, u16 src_port,
- u16 dst_port, u32 thread_index)
+ u16 dst_port, u32 thread_index, u32 rx_fib_index)
{
clib_bihash_kv_16_8_t kv, value;
snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index];
make_ed_kv (&kv, &ip->src_address, &ip->dst_address, proto,
- sm->inside_fib_index, src_port, dst_port);
+ rx_fib_index, src_port, dst_port);
if (!clib_bihash_search_16_8 (&tsm->in2out_ed, &kv, &value))
return 1;
@@ -1872,7 +1872,8 @@ icmp_match_out2in_ed (snat_main_t * sm, vlib_node_runtime_t * node,
else
{
dont_translate = 1;
- if (next_src_nat(sm, ip, key.proto, key.l_port, key.r_port, thread_index))
+ if (next_src_nat(sm, ip, key.proto, key.l_port, key.r_port,
+ thread_index, rx_fib_index))
{
next = NAT44_ED_OUT2IN_NEXT_IN2OUT;
goto out;
@@ -2196,7 +2197,7 @@ nat44_ed_out2in_node_fn_inline (vlib_main_t * vm,
{
if (next_src_nat(sm, ip0, ip0->protocol,
udp0->src_port, udp0->dst_port,
- thread_index))
+ thread_index, rx_fib_index0))
{
next0 = NAT44_ED_OUT2IN_NEXT_IN2OUT;
goto trace00;
@@ -2400,7 +2401,7 @@ nat44_ed_out2in_node_fn_inline (vlib_main_t * vm,
{
if (next_src_nat(sm, ip1, ip1->protocol,
udp1->src_port, udp1->dst_port,
- thread_index))
+ thread_index, rx_fib_index1))
{
next1 = NAT44_ED_OUT2IN_NEXT_IN2OUT;
goto trace01;
@@ -2636,7 +2637,7 @@ nat44_ed_out2in_node_fn_inline (vlib_main_t * vm,
{
if (next_src_nat(sm, ip0, ip0->protocol,
udp0->src_port, udp0->dst_port,
- thread_index))
+ thread_index, rx_fib_index0))
{
next0 = NAT44_ED_OUT2IN_NEXT_IN2OUT;
goto trace0;