Implement SO_BINDTODEVICE socket option which allows to bind an open socket to a particular network interface. Once bound, the socket will only send and receive packets through that interface. For the TX path, simply avoid overwriting the interface pointer by net_context_bind() in case it's already bound to an interface with an option. For the RX path, drop the packet in case the connection handler detects that the net_context associated with that connection is bound to a different interface that the packet origin interface. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| getaddrinfo.c | ||
| getnameinfo.c | ||
| Kconfig | ||
| socket_offload.c | ||
| socketpair.c | ||
| sockets_can.c | ||
| sockets_internal.h | ||
| sockets_misc.c | ||
| sockets_net_mgmt.c | ||
| sockets_packet.c | ||
| sockets_select.c | ||
| sockets_tls.c | ||
| sockets.c | ||