tcp: improve fastopen icmp handling
authorYuchung Cheng <ycheng@google.com>
Mon, 12 May 2014 03:22:12 +0000 (20:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 May 2014 21:53:03 +0000 (17:53 -0400)
commit0a672f74131dd682087dfd5f45bf61f95804772e
tree4e3781451c7828a66c8d49771bcb4c5f26818709
parent843f4a55e336e6d0c7bb92e7f9621535bc8d5fcd
tcp: improve fastopen icmp handling

If a fast open socket is already accepted by the user, it should
be treated like a connected socket to record the ICMP error in
sk_softerr, so the user can fetch it. Do that in both tcp_v4_err
and tcp_v6_err.

Also refactor the sequence window check to improve readability
(e.g., there were two local variables named 'req').

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Daniel Lee <longinus00@gmail.com>
Signed-off-by: Jerry Chu <hkchu@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c