X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Ftransport.c;h=797bdad1eaa6335a7184a43a9af6e4ab5536a1e1;hb=371ca50a74a9c4f1b74c4c1b65c6fdec610fcfc3;hp=c31964c88b64062d456f1278afff4c72123a082d;hpb=4399c2eb848b79762ff52a95fa5d9fab222c73bd;p=vpp.git diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c index c31964c88b6..797bdad1eaa 100644 --- a/src/vnet/session/transport.c +++ b/src/vnet/session/transport.c @@ -96,6 +96,10 @@ unformat_transport_proto (unformat_input_t * input, va_list * args) *proto = TRANSPORT_PROTO_SCTP; else if (unformat (input, "SCTP")) *proto = TRANSPORT_PROTO_SCTP; + else if (unformat (input, "tls")) + *proto = TRANSPORT_PROTO_TLS; + else if (unformat (input, "TLS")) + *proto = TRANSPORT_PROTO_TLS; else return 0; return 1; @@ -310,6 +314,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