This is an automated email from the ASF dual-hosted git repository.

xiaoxiang 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 583ff3b962 net/usrsock: usrsock supports offload netlink
583ff3b962 is described below

commit 583ff3b9620354434b12bd562d68e54fa3aad800
Author: zhanghongyu <[email protected]>
AuthorDate: Thu Oct 24 19:53:35 2024 +0800

    net/usrsock: usrsock supports offload netlink
    
    supports the usrsock client to subscribe netlink events,
    so that it can detect events such as link connection changes.
    
    Signed-off-by: zhanghongyu <[email protected]>
---
 net/usrsock/usrsock_sockif.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/usrsock/usrsock_sockif.c b/net/usrsock/usrsock_sockif.c
index 220bad3903..13a2a311b1 100644
--- a/net/usrsock/usrsock_sockif.c
+++ b/net/usrsock/usrsock_sockif.c
@@ -102,9 +102,10 @@ static int usrsock_sockif_setup(FAR struct socket *psock)
 {
   int ret;
 
-  if (psock->s_domain != PF_INET && psock->s_domain != PF_INET6)
+  if (psock->s_domain != PF_INET && psock->s_domain != PF_INET6 &&
+      psock->s_domain != PF_NETLINK)
     {
-      return -ENOTSUP; /* Only ipv4 and ipv6 support the offload */
+      return -ENOTSUP; /* Only ipv4, ipv6 and netlink support the offload */
     };
 
   /* Let the user socket logic handle the setup...

Reply via email to