zephyr/drivers/net
Noah Olson 4925e22a67 net: nsos_sockets: Fix incorrect return return on ECONNREFUSED
`nsos_connect_blocking()` is not returning the error as expected. It is
expected to return a negative `NSI_ERRNO_MID_...` value, but it is
returning a positive errno value. `nsos_connect_blocking()` should map
the errno value to a negative `NSI_ERRNO_MID_...`, which `nsos_connect()`
maps back to a -1 return with errno=`ECONNREFUSED`.

the current sequence of events:
- `ECONNREFUSED` occurs during connection
- `nsos_connect_blocking()` returns positive `ECONNREFUSED`
- `nsos_connect()` returns positive `ECONNREFUSED`
- `zsock_connect()` returns positive `ECONNREFUSED`

the expected sequence of events:
- `ECONNREFUSED` occurs during connection
- `nsos_connect_blocking()` returns negative `NSI_ERRNO_MID_ECONNREFUSED`
- `nsos_connect()` returns -1, errno=`ECONNREFUSED`
- `zsock_connect()` returns -1, errno=`ECONNREFUSED`

Signed-off-by: Noah Olson <noah@wavelynx.com>
2025-04-08 19:27:18 +02:00
..
canbus.c
CMakeLists.txt
Kconfig
loopback.c
nsos_adapt.c
nsos_fcntl.c
nsos_fcntl.h
nsos_netdb.c
nsos_netdb.h
nsos_socket.h
nsos_sockets.c net: nsos_sockets: Fix incorrect return return on ECONNREFUSED 2025-04-08 19:27:18 +02:00
nsos.h
ppp.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
slip.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
slip.h