]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fastopen: call tcp_fin() if FIN present in SYNACK
authorEric Dumazet <edumazet@google.com>
Sat, 6 Feb 2016 19:16:28 +0000 (11:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Feb 2016 21:49:58 +0000 (16:49 -0500)
commit363261f67f78bac84dd353fca0b3df451fea7800
tree88f3bed2189c90a3eae7c2dbde31ca614da95e6e
parentbabe4ea2905552e8705802cc20d38ce126841ad2
tcp: fastopen: call tcp_fin() if FIN present in SYNACK

When we acknowledge a FIN, it is not enough to ack the sequence number
and queue the skb into receive queue. We also have to call tcp_fin()
to properly update socket state and send proper poll() notifications.

It seems we also had the problem if we received a SYN packet with the
FIN flag set, but it does not seem an urgent issue, as no known
implementation can do that.

Fixes: 19a76e0c6e10 ("tcp: fastopen: accept data/FIN present in SYNACK message")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_fastopen.c
net/ipv4/tcp_input.c