net/usrsock: Remove NET_USRSOCK_NO_INET[6]

let the remote peer do all final decision

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-20 06:58:44 +08:00 committed by Masayuki Ishikawa
parent b4bab51e86
commit c2f566afcb
2 changed files with 0 additions and 45 deletions

View File

@ -38,14 +38,6 @@ config NET_USRSOCK_NPOLLWAITERS
int "Number of usrsock poll waiters"
default 1
config NET_USRSOCK_NO_INET
bool "Disable PF_INET for usrsock"
default n
config NET_USRSOCK_NO_INET6
bool "Disable PF_INET6 for usrsock"
default n
config NET_USRSOCK_UDP
bool "User-space daemon provides UDP sockets"
default n

View File

@ -98,43 +98,6 @@ static int usrsock_sockif_setup(FAR struct socket *psock, int protocol)
int type = psock->s_type;
int ret;
#ifdef CONFIG_NET_USRSOCK_NO_INET
if (domain == PF_INET)
{
return -ENETDOWN;
}
#endif
#ifdef CONFIG_NET_USRSOCK_NO_INET6
if (domain == PF_INET6)
{
return -ENETDOWN;
}
#endif
if (domain == PF_INET || domain == PF_INET6)
{
#ifndef CONFIG_NET_USRSOCK_UDP
if (type == SOCK_DGRAM)
{
return -ENETDOWN;
}
#endif
#ifndef CONFIG_NET_USRSOCK_TCP
if (type == SOCK_STREAM)
{
return -ENETDOWN;
}
#endif
}
else
{
#ifndef CONFIG_NET_USRSOCK_OTHER
return -ENETDOWN;
#endif
}
psock->s_type = PF_UNSPEC;
psock->s_conn = NULL;