zephyr/subsys/net/ip
Tomasz Bursztyka 8a2e5b1648 net/context: Close TCP connection properly
Closing a connection, thus calling net_context_put() will not close a
TCP connection properly, and will leak tcp connection memory.

This is because: net_context_put calls net_context_unref which calls
net_tcp_unref which leads to unref tcp connection and thus sets
ctx->tcp to NULL. Back to net_context_put, that one finally calls
net_tcp_put: but that bails out directly since ctx->tcp is NULL.

Fixing it by inverting net_tcp_put() and net_context_unref() calls
within net_context_put().

Fixes #38598

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-11-04 13:54:28 +01:00
..
6lo_private.h
6lo.c
6lo.h
canbus_socket.c
canbus_socket.h
CMakeLists.txt
connection.c net: icmp: add option to suppress destination unreachable errors. 2021-08-11 11:46:44 +02:00
connection.h
dhcpv4.c
dhcpv4.h
icmpv4.c
icmpv4.h
icmpv6.c net: icmpv6: fix net_icmpv6_send_error() dropping packets 2021-09-23 13:21:09 -04:00
icmpv6.h
igmp.c net: if: Add IPv4 support to multicast monitor 2021-09-28 20:04:49 -04:00
ipv4_autoconf_internal.h
ipv4_autoconf.c
ipv4.c
ipv4.h
ipv6_fragment.c net: ipv6_fragment: send ICMPv6 Time Exceeded upon reassembly timeout 2021-09-23 13:21:09 -04:00
ipv6_mld.c net: if: Add IPv4 support to multicast monitor 2021-09-28 20:04:49 -04:00
ipv6_nbr.c net: ipv6: fix NBR lock initialization 2021-09-14 09:56:37 +02:00
ipv6.c net: ipv6: fix the logics of prev_hdr_offset 2021-09-23 13:21:09 -04:00
ipv6.h net: ip: replace hardcoded NET_IPV6_FRAGMENTS_MAX_PKT with a Kconfig 2021-09-23 13:21:09 -04:00
Kconfig kconfig: net: experimental settings now uses select EXPERIMENTAL 2021-10-25 10:46:48 +02:00
Kconfig.debug
Kconfig.ipv4 kconfig: net: experimental settings now uses select EXPERIMENTAL 2021-10-25 10:46:48 +02:00
Kconfig.ipv6 drivers: net: loopback: Register loopback IP address to the interface 2021-10-13 11:17:51 +02:00
Kconfig.mgmt
Kconfig.stack
Kconfig.stats
nbr.c
nbr.h
net_context.c net/context: Close TCP connection properly 2021-11-04 13:54:28 +01:00
net_core.c
net_if.c net: if: ipv6_prefix_find() correctly tests if the prefix is used 2021-10-25 13:19:37 +03:00
net_mgmt.c
net_pkt.c net: pkt: clone ieee802154 fields in clone_pkt_attributes() 2021-11-02 11:31:10 +02:00
net_private.h
net_shell.c shell: Add __printf_like to shell_fprintf 2021-10-14 16:32:19 -04:00
net_shell.h
net_stats.c
net_stats.h
net_tc_mapping.h
net_tc.c
net_timeout.c
packet_socket.c net: ip: packet_socket: fixing raw sckt IPPROTO_RAW usage 2021-09-14 08:37:36 -04:00
packet_socket.h
promiscuous.c
route.c
route.h
tcp2_priv.h net: tcp: Remove redundant TCP option definitions 2021-10-14 16:34:23 -04:00
tcp2.c net/tcp: Stop TCP state machine breaking when sending locally 2021-11-04 13:54:28 +01:00
tcp2.h
tcp_internal.h
tp_priv.h
tp.c
tp.h
trickle.c
udp_internal.h
udp.c
utils.c