Commit 85e8fcf2 authored by David Mosberger's avatar David Mosberger Committed by Linus Torvalds

[PATCH] fix TCP roundtrip time update code

One of those very-hard-to-track-down, trivial-to-fix kind of problems:
without this patch, TCP roundtrip time measurements will corrupt the
routing cache's RTT estimates under heavy network load (the bug causes
RTAX_RTT to go negative, but since its type is u32, you end up with a
huge positive value...).  From there on, later TCP connections quickly
will go south.

The typo was introduced 8 months ago in v1.29 of the file by the patch
entitled "Cleanup DST metrics and abstrct MSS/PMTU further".
parent bded39df
......@@ -556,8 +556,8 @@ void tcp_update_metrics(struct sock *sk)
if (m >= dst_metric(dst, RTAX_RTTVAR))
dst->metrics[RTAX_RTTVAR-1] = m;
else
dst->metrics[RTAX_RTT-1] -=
(dst->metrics[RTAX_RTT-1] - m)>>2;
dst->metrics[RTAX_RTTVAR-1] -=
(dst->metrics[RTAX_RTTVAR-1] - m)>>2;
}
if (tp->snd_ssthresh >= 0xFFFF) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment