ipv6: add tos reflection in TCP reset and ack
authorWei Wang <weiwan@google.com>
Tue, 8 Sep 2020 21:29:02 +0000 (14:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Sep 2020 03:20:55 +0000 (20:20 -0700)
commite92dd77e6fe0a33d356cab4f362dbfbb3b873c96
tree28bc95eee99af85851032a38ea07bb19a7781c51
parent56bbc22d833bf2fa88e7ccd714b4120dff77ae26
ipv6: add tos reflection in TCP reset and ack

Currently, ipv6 stack does not do any TOS reflection. To make the
behavior consistent with v4 stack, this commit adds TOS reflection in
tcp_v6_reqsk_send_ack() and tcp_v6_send_reset(). We clear the lower
2-bit ECN value of the received TOS in compliance with RFC 3168 6.1.5
robustness principles.

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>
net/ipv6/tcp_ipv6.c