diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c index a710e984c77c7..88696a7af893c 100644 --- a/net/inet/inet_sockif.c +++ b/net/inet/inet_sockif.c @@ -1907,14 +1907,16 @@ FAR const struct sock_intf_s * else #endif #ifdef NET_UDP_HAVE_STACK - if (type == SOCK_DGRAM && (protocol == 0 || protocol == IPPROTO_UDP)) + if ((type == SOCK_DGRAM || type == SOCK_CTRL) && + (protocol == 0 || protocol == IPPROTO_UDP)) { return &g_inet_sockif; } else #endif #ifdef NET_TCP_HAVE_STACK - if (type == SOCK_STREAM && (protocol == 0 || protocol == IPPROTO_TCP)) + if ((type == SOCK_STREAM || type == SOCK_CTRL) && + (protocol == 0 || protocol == IPPROTO_TCP)) { return &g_inet_sockif; }