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;
(&dm->per_thread_data[thread_index].b4_hash, &b4_kv, &b4_value))
{
pool_get (dm->per_thread_data[thread_index].b4s, b4);
- memset (b4, 0, sizeof (*b4));
+ clib_memset (b4, 0, sizeof (*b4));
b4->addr.as_u64[0] = in2out_key->softwire_id.as_u64[0];
b4->addr.as_u64[1] = in2out_key->softwire_id.as_u64[1];
clib_bihash_add_del_8_8 (&dm->per_thread_data[thread_index].out2in,
&out2in_kv, 0);
snat_free_outside_address_and_port (dm->addr_pool, thread_index,
- &s->out2in,
- s->outside_address_index);
- s->outside_address_index = ~0;
+ &s->out2in);
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;
return DSLITE_IN2OUT_NEXT_DROP;
}
pool_get (dm->per_thread_data[thread_index].sessions, s);
- memset (s, 0, sizeof (*s));
- s->outside_address_index = address_index;
+ clib_memset (s, 0, sizeof (*s));
b4->nsessions++;
pool_get (dm->per_thread_data[thread_index].list_pool, elt);
sum0 =
ip_csum_update (sum0, old_port0, new_port0, ip4_header_t,
length);
+ mss_clamping (&snat_main, tcp0, &sum0);
tcp0->checksum = ip_csum_fold (sum0);
}
else