From ab395ec884d0ec9279893b1695379e97acd1f24d Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Thu, 20 Sep 2018 23:18:41 -0700 Subject: NAT: Refactoring / Housekeeping (VPP-1415) Change-Id: Ia3ce24cc94f9b2fb331ad62a4181ddcd41bc78ca Signed-off-by: Matus Fabian --- src/plugins/nat/dslite_in2out.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/plugins/nat/dslite_in2out.c') 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); -- cgit 1.2.3-korg