X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fin2out.c;h=b0593900a93acb3cd7d6b4051af7109b01948fb4;hb=8ebe62536223e5a8d827b2b870cbd57aa34fd7ef;hp=9f668d89f979eba5ebcdbfdc9df4cdbfc2e28b48;hpb=5917939256af392914d8a648de0c3287042ddbf6;p=vpp.git diff --git a/src/plugins/nat/in2out.c b/src/plugins/nat/in2out.c index 9f668d89f97..b0593900a93 100755 --- a/src/plugins/nat/in2out.c +++ b/src/plugins/nat/in2out.c @@ -366,12 +366,15 @@ static u32 slow_path (snat_main_t *sm, vlib_buffer_t *b0, s->in2out.fib_index); snat_free_outside_address_and_port - (sm, thread_index, &s->out2in, s->outside_address_index); + (sm->addresses, thread_index, &s->out2in, s->outside_address_index); } s->outside_address_index = ~0; - if (snat_alloc_outside_address_and_port (sm, rx_fib_index0, thread_index, - &key1, &address_index)) + if (snat_alloc_outside_address_and_port (sm->addresses, rx_fib_index0, + thread_index, &key1, + &address_index, sm->vrf_mode, + sm->port_per_thread, + sm->per_thread_data[thread_index].snat_thread_index)) { ASSERT(0); @@ -389,9 +392,11 @@ static u32 slow_path (snat_main_t *sm, vlib_buffer_t *b0, { static_mapping = 0; /* Try to create dynamic translation */ - if (snat_alloc_outside_address_and_port (sm, rx_fib_index0, + if (snat_alloc_outside_address_and_port (sm->addresses, rx_fib_index0, thread_index, &key1, - &address_index)) + &address_index, sm->vrf_mode, + sm->port_per_thread, + sm->per_thread_data[thread_index].snat_thread_index)) { b0->error = node->errors[SNAT_IN2OUT_ERROR_OUT_OF_PORTS]; return SNAT_IN2OUT_NEXT_DROP; @@ -1265,7 +1270,8 @@ create_ses: s->out2in.port, s->in2out.fib_index); - snat_free_outside_address_and_port (sm, thread_index, &s->out2in, + snat_free_outside_address_and_port (sm->addresses, thread_index, + &s->out2in, s->outside_address_index); /* Remove in2out, out2in keys */