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> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| getaddrinfo.c | ||
| getnameinfo.c | ||
| Kconfig | ||
| socket_dispatcher.c | ||
| socket_obj_core.c | ||
| socket_offload.c | ||
| socketpair.c | ||
| sockets_can.c | ||
| sockets_inet.c | ||
| sockets_internal.h | ||
| sockets_misc.c | ||
| sockets_net_mgmt.c | ||
| sockets_packet.c | ||
| sockets_service.c | ||
| sockets_tls.c | ||
| sockets.c | ||