aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-21 16:07:46 -0700
committerDave Barach <openvpp@barachs.net>2020-04-03 22:10:22 +0000
commit00e01d3e875bb18397ff81e0f58f9b468477f473 (patch)
tree277b9ce692a465644de5d3481b42e6cce6394f46 /src/vnet/tcp/tcp.c
parent39aa7a5202a6a875bd6f5d341cb07f19ab0bf51e (diff)
session: improve error reporting
Type: improvement Change-Id: I9dd850a1ce85b0adb5136233f176117e0ee38817 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index d85225b9172..b1ae37409fd 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -738,10 +738,7 @@ tcp_alloc_custom_local_endpoint (tcp_main_t * tm, ip46_address_t * lcl_addr,
}
port = transport_alloc_local_port (TRANSPORT_PROTO_TCP, lcl_addr);
if (port < 1)
- {
- clib_warning ("Failed to allocate src port");
- return -1;
- }
+ return SESSION_E_NOPORT;
*lcl_port = port;
return 0;
}
@@ -767,7 +764,7 @@ tcp_session_open (transport_endpoint_cfg_t * rmt)
rmt, &lcl_addr, &lcl_port);
if (rv)
- return -1;
+ return rv;
/*
* Create connection and send SYN