X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fnat.c;h=1f63237fb45df55261d0fc0be668b6c256932eaa;hb=4cfb0bf1b87d7a89898c20dfb9b145876c08fe02;hp=4803eeb64de217bef8cc2f1e1790538619b130c2;hpb=a73f2d6f53c224668bd6bbea1a980ee4313c794f;p=vpp.git diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c index 4803eeb64de..1f63237fb45 100755 --- a/src/plugins/nat/nat.c +++ b/src/plugins/nat/nat.c @@ -490,7 +490,11 @@ nat_user_get_or_create (snat_main_t * sm, ip4_address_t * addr, u32 fib_index, /* add user */ if (clib_bihash_add_del_8_8 (&tsm->user_hash, &kv, 1)) - nat_elog_warn ("user_hash keay add failed"); + { + nat_elog_warn ("user_hash key add failed"); + nat44_delete_user_with_no_session (sm, u, thread_index); + return NULL; + } vlib_set_simple_counter (&sm->total_users, thread_index, 0, pool_elts (tsm->users)); @@ -4027,8 +4031,8 @@ snat_config (vlib_main_t * vm, unformat_input_t * input) sm->worker_in2out_cb = snat_get_worker_in2out_cb; sm->worker_out2in_cb = snat_get_worker_out2in_cb; - sm->handoff_out2in_index = snat_in2out_node.index; - sm->handoff_in2out_index = snat_out2in_node.index; + sm->handoff_out2in_index = snat_out2in_node.index; + sm->handoff_in2out_index = snat_in2out_node.index; sm->handoff_in2out_output_index = snat_in2out_output_node.index; sm->in2out_node_index = snat_in2out_node.index;