瀏覽代碼

[TCP]: Don't allow FRTO to take place while MTU is being probed

MTU probe can cause some remedies for FRTO because the normal
packet ordering may be violated allowing FRTO to make a wrong
decision (it might not be that serious threat for anything
though). Thus it's safer to not run FRTO while MTU probe is
underway.

It seems that the basic FRTO variant should also look for an
skb at probe_seq.start to check if that's retransmitted one
but I didn't implement it now (plain seqno in window check
isn't robust against wraparounds).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen 17 年之前
父節點
當前提交
6adb4f733e
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      net/ipv4/tcp_input.c

+ 5 - 0
net/ipv4/tcp_input.c

@@ -1691,11 +1691,16 @@ static inline void tcp_reset_reno_sack(struct tcp_sock *tp)
 int tcp_use_frto(struct sock *sk)
 int tcp_use_frto(struct sock *sk)
 {
 {
 	const struct tcp_sock *tp = tcp_sk(sk);
 	const struct tcp_sock *tp = tcp_sk(sk);
+	const struct inet_connection_sock *icsk = inet_csk(sk);
 	struct sk_buff *skb;
 	struct sk_buff *skb;
 
 
 	if (!sysctl_tcp_frto)
 	if (!sysctl_tcp_frto)
 		return 0;
 		return 0;
 
 
+	/* MTU probe and F-RTO won't really play nicely along currently */
+	if (icsk->icsk_mtup.probe_size)
+		return 0;
+
 	if (IsSackFrto())
 	if (IsSackFrto())
 		return 1;
 		return 1;