tcp: be more strict before accepting ECN negociation
authorEric Dumazet <edumazet@google.com>
Fri, 4 May 2012 05:14:02 +0000 (05:14 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 14 Dec 2014 16:24:00 +0000 (16:24 +0000)
commit69cff65c8e35c2dc8763249e758ff55538809d27
treec7c34a5a0c80c1008bde52bd89ba22d49075eafa
parent3d7b5eb99e9ee3317966426e86816d327c910eed
tcp: be more strict before accepting ECN negociation

commit bd14b1b2e29bd6812597f896dde06eaf7c6d2f24 upstream.

It appears some networks play bad games with the two bits reserved for
ECN. This can trigger false congestion notifications and very slow
transferts.

Since RFC 3168 (6.1.1) forbids SYN packets to carry CT bits, we can
disable TCP ECN negociation if it happens we receive mangled CT bits in
the SYN packet.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Perry Lorier <perryl@google.com>
Cc: Matt Mathis <mattmathis@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Wilmer van der Gaast <wilmer@google.com>
Cc: Ankur Jain <jankur@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Dave Täht <dave.taht@bufferbloat.net>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Florian Westphal <fw@strlen.de>
include/net/tcp.h
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c