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

commit 6bf17b5a30994f4de0b0e068389cd33aa299e470
Author: Marco Casaroli <[email protected]>
AuthorDate: Thu Nov 26 08:34:30 2026 +0100

    net/inet: Return EAFNOSUPPORT for an unknown family in connect().
    
    inet_connect() called DEBUGPANIC() when the address family of the
    address was not AF_INET, AF_INET6 or AF_UNSPEC.  A connect() of an
    AF_INET socket with an AF_UNIX address, for example, stopped the
    system in a build with assertions.
    
    Return EAFNOSUPPORT only, as without assertions.  POSIX names this
    error for an address of the wrong family, and Linux returns it.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 net/inet/inet_sockif.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c
index 4ad2c15e5d0..fff983d5533 100644
--- a/net/inet/inet_sockif.c
+++ b/net/inet/inet_sockif.c
@@ -1290,7 +1290,6 @@ static int inet_connect(FAR struct socket *psock,
         break;
 
       default:
-        DEBUGPANIC();
         return -EAFNOSUPPORT;
     }
 

Reply via email to