tcp: Retain ECT bits for tos reflection
authorWei Wang <weiwan@google.com>
Tue, 8 Dec 2020 17:55:08 +0000 (09:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 00:08:23 +0000 (16:08 -0800)
commit8ef44b6fe49d2b8d03ba9aa69063612b474f963b
tree74f6edf6c6e959406b20c0abbc457929040e6431
parenta770bf515613c6e12ae904c3593e26016de99448
tcp: Retain ECT bits for tos reflection

For DCTCP, we have to retain the ECT bits set by the congestion control
algorithm on the socket when reflecting syn TOS in syn-ack, in order to
make ECN work properly.

Fixes: ac8f1710c12b ("tcp: reflect tos value received in SYN to the socket")
Reported-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Wei Wang <weiwan@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c