This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 21beb284bc net/usersock: Return -ENOSUPP directly if domain isn't equal to PF_INET/PF_INET6 21beb284bc is described below commit 21beb284bc90d269d71baa41464530afc908f236 Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Mon Oct 9 14:13:30 2023 +0800 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 <xiaoxi...@xiaomi.com> --- net/usrsock/usrsock_sockif.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/usrsock/usrsock_sockif.c b/net/usrsock/usrsock_sockif.c index 92b3177cfa..059b168610 100644 --- a/net/usrsock/usrsock_sockif.c +++ b/net/usrsock/usrsock_sockif.c @@ -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