zephyr/subsys/net/ip
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
..
6lo_private.h
6lo.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
6lo.h
canbus_socket.c
canbus_socket.h
CMakeLists.txt
connection.c net: sockets: packet: Allow proto 0 for RAW sockets 2025-04-17 17:23:23 +02:00
connection.h net: connection: Register connection type 2025-04-09 12:36:34 +02:00
icmp.c net: icmp: Send replies with timeout K_NO_WAIT 2025-03-07 19:58:45 +01:00
icmpv4.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
icmpv4.h
icmpv6.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
icmpv6.h
igmp.c
igmp.h
ipv4_acd.c
ipv4_autoconf.c
ipv4_fragment.c
ipv4.c net: pkt_filter: Add statistics support to packet filter 2025-04-16 08:07:34 +02:00
ipv4.h net: ipv4: Add DiffServ DSCP code point definitions 2025-03-25 11:00:33 +01:00
ipv6_fragment.c
ipv6_mld.c
ipv6_nbr.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
ipv6_pe.c
ipv6.c net: pkt_filter: Add statistics support to packet filter 2025-04-16 08:07:34 +02:00
ipv6.h net: ipv6: use inclusive terminology in net_ipv6_pe_filter_cb_t 2025-02-19 18:48:15 +01:00
iterables_net_pkt_alloc_stats.ld
Kconfig net: shell: Add packet filter support 2025-04-16 08:07:34 +02:00
Kconfig.debug
Kconfig.ipv4 net: Add support for IPv4_MULTICAST_LOOP in net_context 2025-03-24 09:54:05 +01:00
Kconfig.ipv6 net: sockets: IPv6_MULTICAST_LOOP Support 2025-03-21 14:19:08 +01:00
Kconfig.mgmt
Kconfig.stack
Kconfig.stats net: pkt_filter: Add statistics support to packet filter 2025-04-16 08:07:34 +02:00
Kconfig.tcp
nbr.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
nbr.h net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
net_context.c net: sockets: packet: Ensure correct interface is used 2025-04-17 17:23:23 +02:00
net_core.c net: pkt_filter: Add statistics support to packet filter 2025-04-16 08:07:34 +02:00
net_if.c net: pkt_filter: Add statistics support to packet filter 2025-04-16 08:07:34 +02:00
net_mgmt.c
net_pkt.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
net_private.h net: sockets: Add SOCK_RAW support for AF_INET/AF_INET6 sockets 2025-04-09 12:36:34 +02:00
net_stats.c
net_stats.h net: pkt_filter: Add statistics support to packet filter 2025-04-16 08:07:34 +02:00
net_tc_mapping.h
net_tc.c net: add try variant with timeout for various send functions 2025-03-07 19:58:45 +01:00
net_timeout.c
packet_socket.c
packet_socket.h
pmtu.c
pmtu.h
promiscuous.c
route.c net: Change the net_linkaddr struct to not use pointers 2025-03-17 16:25:22 +01:00
route.h
tcp_internal.h
tcp_private.h net: tcp: fix ECONNREFUSED not reported by zsock_connect 2025-03-07 19:48:10 +01:00
tcp.c net: connection: Register connection type 2025-04-09 12:36:34 +02:00
tcp.h
tp_priv.h
tp.c
tp.h
udp_internal.h
udp.c net: connection: Register connection type 2025-04-09 12:36:34 +02:00
utils.c net: utils: Add helper to parse ip address string with a mask len 2025-03-20 17:16:10 +01:00