zephyr/subsys/net/lib/sockets
Robert Lubos 6c0aef4da0 net: sockets: packet: Ensure correct interface is used
Make sure that when sendto is being used without the socket being bound
before, a correct interface is used for transmission. As
zpacket_sendto_ctx() calls net_context_recv() to register receive
callback before sending, a default binding was used by the context
layer, which would bind the socket to the default interface. This could
lead to unexpected results, i.e. packet being sent on a default
interface, even though a different one was specified.

Make also sure that there is no ambiguity in the interface selection -
the application should be explicitly clear what interface it wants to
use when it comes to packet sockets. It's better to return an error if
no valid interface was specified.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-17 17:23:23 +02:00
..
CMakeLists.txt net: sockets: move select() implementation to zvfs 2024-10-14 13:01:51 +02:00
getaddrinfo.c style: subsys: adjust return usage in void functions 2024-09-20 11:06:55 +02:00
getnameinfo.c
Kconfig net: socketpair: fix allocated number of buffers 2025-04-16 08:05:12 +02:00
socket_dispatcher.c fdtable: replace z_ prefix with zvfs_ for fdtable.h functions 2024-06-26 12:33:02 +02:00
socket_obj_core.c posix: deprecate POSIX_MAX_FDS and add POSIX_DEVICE_IO 2024-06-04 16:27:12 -05:00
socket_offload.c style: subsys: adjust return usage in void functions 2024-09-20 11:06:55 +02:00
socketpair.c net: socketpair to use ring_buffer instead of k_pipe 2025-01-17 19:43:44 +01:00
sockets_can.c fdtable: replace z_ prefix with zvfs_ for fdtable.h functions 2024-06-26 12:33:02 +02:00
sockets_inet.c net: sockets: Add SOCK_RAW support for AF_INET/AF_INET6 sockets 2025-04-09 12:36:34 +02:00
sockets_internal.h net: sockets: Cleanup socket properly if POSIX API is enabled 2024-11-08 15:56:39 -06:00
sockets_misc.c build: namespace the generated headers with zephyr/ 2024-05-28 22:03:55 +02:00
sockets_net_mgmt.c fdtable: replace z_ prefix with zvfs_ for fdtable.h functions 2024-06-26 12:33:02 +02:00
sockets_packet.c net: sockets: packet: Ensure correct interface is used 2025-04-17 17:23:23 +02:00
sockets_service.c net: sockets_service: Always clear old events when registering 2025-03-21 14:18:08 +01:00
sockets_tls.c net: lib: tls_credentials: Rename TLS_CREDENTIAL_SERVER_CERTIFICATE 2025-03-21 14:18:52 +01:00
sockets.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00