case TRANSPORT_PROTO_UDP:
s = format (s, "U");
break;
+ case TRANSPORT_PROTO_SCTP:
+ s = format (s, "S");
+ break;
}
return s;
}
*proto = TRANSPORT_PROTO_UDP;
else if (unformat (input, "UDP"))
*proto = TRANSPORT_PROTO_UDP;
- if (unformat (input, "sctp"))
+ else if (unformat (input, "sctp"))
*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;
{
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