From 1523c347d8f9e2a628d733e97f76d39b879861f0 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Mon, 22 Jun 2020 12:52:29 +0000 Subject: nat: set buf error if can't create user Type: fix Signed-off-by: Klement Sekera Change-Id: I747d78966a7296dcbae54d54b0c165d407c8863d --- src/plugins/nat/out2in.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/nat/out2in.c') diff --git a/src/plugins/nat/out2in.c b/src/plugins/nat/out2in.c index 57e658ba0c4..071e16d4416 100644 --- a/src/plugins/nat/out2in.c +++ b/src/plugins/nat/out2in.c @@ -85,8 +85,7 @@ _(UDP_PACKETS, "UDP packets") \ _(ICMP_PACKETS, "ICMP packets") \ _(OTHER_PACKETS, "other protocol packets") \ _(FRAGMENTS, "fragments") \ -_(CACHED_FRAGMENTS, "cached fragments") \ -_(PROCESSED_FRAGMENTS, "processed fragments") +_(CANNOT_CREATE_USER, "cannot create NAT user") typedef enum { @@ -206,7 +205,7 @@ create_session_for_static_mapping (snat_main_t * sm, u = nat_user_get_or_create (sm, &i2o_addr, i2o_fib_index, thread_index); if (!u) { - nat_elog_warn ("create NAT user failed"); + b0->error = node->errors[SNAT_OUT2IN_ERROR_CANNOT_CREATE_USER]; return 0; } -- cgit 1.2.3-korg