net/usersock: Return -ENOSUPP directly if domain isn't equal to PF_INET/PF_INET6
regression by https://github.com/apache/nuttx/pull/9647 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
e0e6e5c2c8
commit
21beb284bc
@ -100,6 +100,11 @@ static int usrsock_sockif_setup(FAR struct socket *psock)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (psock->s_domain != PF_INET && psock->s_domain != PF_INET6)
|
||||
{
|
||||
return -ENOTSUP; /* Only ipv4 and ipv6 support the offload */
|
||||
};
|
||||
|
||||
/* Let the user socket logic handle the setup...
|
||||
*
|
||||
* A return value of zero means that the operation was
|
||||
|
Loading…
Reference in New Issue
Block a user