]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ip: fix tos reflection in ack and reset packets
authorWei Wang <weiwan@google.com>
Tue, 8 Sep 2020 21:09:34 +0000 (14:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2020 16:05:22 +0000 (18:05 +0200)
commitf49e5618fd5429ba537d5449b263cf704bdef4be
tree88d5ceb07a6d48114e6756ea614e6b1a1c8917df
parent584ff7bb14a65b0796afe824dc5a29b7b95af765
ip: fix tos reflection in ack and reset packets

[ Upstream commit ba9e04a7ddf4f22a10e05bf9403db6b97743c7bf ]

Currently, in tcp_v4_reqsk_send_ack() and tcp_v4_send_reset(), we
echo the TOS value of the received packets in the response.
However, we do not want to echo the lower 2 ECN bits in accordance
with RFC 3168 6.1.5 robustness principles.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_output.c