aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/dslite_in2out.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-09-20 23:18:41 -0700
committerMatus Fabian <matfabia@cisco.com>2018-09-21 04:07:37 -0700
commitab395ec884d0ec9279893b1695379e97acd1f24d (patch)
treef04db4d5da24c6598fe3b2aae29d937fa267de9c /src/plugins/nat/dslite_in2out.c
parent22030434ac9a3a7296617b996268e79dbf8bbffa (diff)
NAT: Refactoring / Housekeeping (VPP-1415)
Change-Id: Ia3ce24cc94f9b2fb331ad62a4181ddcd41bc78ca Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/dslite_in2out.c')
-rw-r--r--src/plugins/nat/dslite_in2out.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/nat/dslite_in2out.c b/src/plugins/nat/dslite_in2out.c
index 8f5a0c0e248..4eec5958da9 100644
--- a/src/plugins/nat/dslite_in2out.c
+++ b/src/plugins/nat/dslite_in2out.c
@@ -45,7 +45,6 @@ slow_path (dslite_main_t * dm, dslite_session_key_t * in2out_key,
u32 oldest_index;
dslite_session_t *s;
snat_session_key_t out2in_key;
- u32 address_index;
out2in_key.protocol = in2out_key->proto;
out2in_key.fib_index = 0;
@@ -104,17 +103,16 @@ slow_path (dslite_main_t * dm, dslite_session_key_t * in2out_key,
&out2in_kv, 0);
snat_free_outside_address_and_port (dm->addr_pool, thread_index,
&s->out2in);
- s->outside_address_index = ~0;
if (snat_alloc_outside_address_and_port
(dm->addr_pool, 0, thread_index, &out2in_key,
- &s->outside_address_index, dm->port_per_thread, thread_index))
+ dm->port_per_thread, thread_index))
ASSERT (0);
}
else
{
if (snat_alloc_outside_address_and_port
- (dm->addr_pool, 0, thread_index, &out2in_key, &address_index,
+ (dm->addr_pool, 0, thread_index, &out2in_key,
dm->port_per_thread, thread_index))
{
*error = DSLITE_ERROR_OUT_OF_PORTS;
@@ -122,7 +120,6 @@ slow_path (dslite_main_t * dm, dslite_session_key_t * in2out_key,
}
pool_get (dm->per_thread_data[thread_index].sessions, s);
memset (s, 0, sizeof (*s));
- s->outside_address_index = address_index;
b4->nsessions++;
pool_get (dm->per_thread_data[thread_index].list_pool, elt);