]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 24 Oct 2011 07:06:21 +0000 (03:06 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Oct 2011 07:06:21 +0000 (03:06 -0400)
commita869de36a8c28dccc2d5af4194cb76a7f246601a
treec566bee026b5e9703f789d27657aefa7c70c587c
parentb116d6782cf7dcf38fc9ab0f9243491aac7ecf5d
ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT

There is a long standing bug in linux tcp stack, about ACK messages sent
on behalf of TIME_WAIT sockets.

In the IP header of the ACK message, we choose to reflect TOS field of
incoming message, and this might break some setups.

Example of things that were broken :
  - Routing using TOS as a selector
  - Firewalls
  - Trafic classification / shaping

We now remember in timewait structure the inet tos field and use it in
ACK generation, and route lookup.

Notes :
 - We still reflect incoming TOS in RST messages.
 - We could extend MuraliRaja Muniraju patch to report TOS value in
netlink messages for TIME_WAIT sockets.
 - A patch is needed for IPv6

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_timewait_sock.h
include/net/ip.h
net/ipv4/inet_timewait_sock.c
net/ipv4/ip_output.c
net/ipv4/tcp_ipv4.c