summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-01-26 01:27:01 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-01-27 10:51:10 +0000
commitfc804d9cf1d23a616ea7bce19fc65198aa978e6e (patch)
tree62c83fd89f7ec6cd2f9ada69a4af98d30d79dc95 /src/vnet/session/transport.c
parentd1660e980031882627fc1aa42b650c219831dad4 (diff)
Fix session/tcp coverity warnings
Change-Id: I5c404eacb4a6c1e16485a6656168d9171ff49a8b Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/transport.c')
-rw-r--r--src/vnet/session/transport.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index c31964c88b6..acbb4f65e7a 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -310,6 +310,13 @@ transport_alloc_local_endpoint (u8 proto, transport_endpoint_t * rmt,
{
ip4_address_t *ip4;
ip4 = ip_interface_get_first_ip (sw_if_index, 1);
+ if (!ip4)
+ {
+ clib_warning ("no routable ip4 address on %U",
+ format_vnet_sw_if_index_name, vnet_get_main (),
+ sw_if_index);
+ return -1;
+ }
lcl_addr->ip4.as_u32 = ip4->as_u32;
}
else