1
0
Fork 0
alistair23-linux/net/ipv4
Enke Chen f7020c437e tcp: fix TCP_USER_TIMEOUT with zero window
commit 9d9b1ee0b2 upstream.

The TCP session does not terminate with TCP_USER_TIMEOUT when data
remain untransmitted due to zero window.

The number of unanswered zero-window probes (tcp_probes_out) is
reset to zero with incoming acks irrespective of the window size,
as described in tcp_probe_timer():

    RFC 1122 4.2.2.17 requires the sender to stay open indefinitely
    as long as the receiver continues to respond probes. We support
    this by default and reset icsk_probes_out with incoming ACKs.

This counter, however, is the wrong one to be used in calculating the
duration that the window remains closed and data remain untransmitted.
Thanks to Jonathan Maxwell <jmaxwell37@gmail.com> for diagnosing the
actual issue.

In this patch a new timestamp is introduced for the socket in order to
track the elapsed time for the zero-window probes that have not been
answered with any non-zero window ack.

Fixes: 9721e709fa ("tcp: simplify window probe aborting on USER_TIMEOUT")
Reported-by: William McCall <william.mccall@gmail.com>
Co-developed-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
Reviewed-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20210115223058.GA39267@localhost.localdomain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-27 11:47:55 +01:00
..
bpfilter
netfilter netfilter: rpfilter: mask ecn bits before fib lookup 2021-01-27 11:47:52 +01:00
Kconfig
Makefile
af_inet.c
ah4.c
arp.c Exempt multicast addresses from five-second neighbor lifetime 2020-11-24 13:28:56 +01:00
cipso_ipv4.c
datagram.c
devinet.c
esp4.c esp: avoid unneeded kmap_atomic call 2021-01-23 15:57:58 +01:00
esp4_offload.c
fib_frontend.c ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst() 2021-01-12 20:16:14 +01:00
fib_lookup.h
fib_notifier.c
fib_rules.c
fib_semantics.c net: Fix the arp error in some cases 2020-06-30 15:36:44 -04:00
fib_trie.c ipv4: Silence suspicious RCU usage warning 2020-09-12 14:18:54 +02:00
fou.c
gre_demux.c erspan: fix version 1 check in gre_parse_header() 2021-01-12 20:16:15 +01:00
gre_offload.c net: gre: recompute gre csum for sctp over gre tunnels 2020-08-11 15:33:40 +02:00
icmp.c icmp: randomize the global rate limiter 2020-10-29 09:57:27 +01:00
igmp.c
inet_connection_sock.c tcp: fix TCP_USER_TIMEOUT with zero window 2021-01-27 11:47:55 +01:00
inet_diag.c inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill() 2020-11-24 13:28:56 +01:00
inet_fragment.c
inet_hashtables.c net: initialize fastreuse on inet_inherit_port 2020-08-19 08:16:23 +02:00
inet_timewait_sock.c
inetpeer.c
ip_forward.c
ip_fragment.c
ip_gre.c ip_gre: set dev->hard_header_len and dev->needed_headroom properly 2020-10-29 09:58:04 +01:00
ip_input.c
ip_options.c
ip_output.c net: ip: always refragment ip defragmented packets 2021-01-17 14:05:32 +01:00
ip_sockglue.c
ip_tunnel.c net: fix pmtu check in nopmtudisc mode 2021-01-17 14:05:32 +01:00
ip_tunnel_core.c
ip_vti.c
ipcomp.c
ipconfig.c
ipip.c
ipmr.c
ipmr_base.c
metrics.c
netfilter.c netfilter: use actual socket sk rather than skb sk when routing harder 2020-11-18 19:20:17 +01:00
netlink.c
nexthop.c nexthop: Unlink nexthop group entry in error path 2021-01-17 14:05:32 +01:00
ping.c ipv4: fill fl4_icmp_{type,code} in ping_v4_sendmsg 2020-07-22 09:32:47 +02:00
proc.c
protocol.c
raw.c
raw_diag.c
route.c ipv4: Fix tos mask in inet_rtm_getroute() 2020-12-08 10:40:25 +01:00
syncookies.c net: Update window_clamp if SOCK_RCVBUF is set 2020-11-18 19:20:32 +01:00
sysctl_net_ipv4.c tcp: correct read of TFO keys on big endian systems 2020-08-19 08:16:23 +02:00
tcp.c tcp: fix TCP_USER_TIMEOUT with zero window 2021-01-27 11:47:55 +01:00
tcp_bbr.c tcp: only postpone PROBE_RTT if RTT is < current min_rtt estimate 2020-11-24 13:28:59 +01:00
tcp_bic.c
tcp_bpf.c bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect 2020-11-24 13:29:08 +01:00
tcp_cdg.c
tcp_cong.c tcp: Set INET_ECN_xmit configuration in tcp_reinit_congestion_control 2020-12-08 10:40:24 +01:00
tcp_cubic.c tcp_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT 2020-06-30 15:36:47 -04:00
tcp_dctcp.c
tcp_dctcp.h
tcp_diag.c
tcp_fastopen.c tcp: correct read of TFO keys on big endian systems 2020-08-19 08:16:23 +02:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: fix TCP_USER_TIMEOUT with zero window 2021-01-27 11:47:55 +01:00
tcp_ipv4.c tcp: do not mess with cloned skbs in tcp_add_backlog() 2021-01-27 11:47:55 +01:00
tcp_lp.c
tcp_metrics.c
tcp_minisocks.c
tcp_nv.c
tcp_offload.c
tcp_output.c tcp: fix TCP_USER_TIMEOUT with zero window 2021-01-27 11:47:55 +01:00
tcp_rate.c
tcp_recovery.c
tcp_scalable.c
tcp_timer.c tcp: fix TCP_USER_TIMEOUT with zero window 2021-01-27 11:47:55 +01:00
tcp_ulp.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c udp: mask TOS bits in udp_v4_early_demux() 2021-01-27 11:47:53 +01:00
udp_diag.c
udp_impl.h
udp_offload.c net: udp: fix UDP header access on Fast/frag0 UDP GRO 2020-11-18 19:20:32 +01:00
udp_tunnel.c
udplite.c
xfrm4_input.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c