mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
[TCP]: TCP_DEFER_ACCEPT updates - process as established
Change TCP_DEFER_ACCEPT implementation so that it transitions a connection to ESTABLISHED after handshake is complete instead of leaving it in SYN-RECV until some data arrvies. Place connection in accept queue when first data packet arrives from slow path. Benefits: - established connection is now reset if it never makes it to the accept queue - diagnostic state of established matches with the packet traces showing completed handshake - TCP_DEFER_ACCEPT timeouts are expressed in seconds and can now be enforced with reasonable accuracy instead of rounding up to next exponential back-off of syn-ack retry. Signed-off-by: Patrick McManus <mcmanus@ducksong.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e4c7884028
commit
ec3c0982a2
9 changed files with 99 additions and 33 deletions
|
@ -1920,6 +1920,14 @@ int tcp_v4_destroy_sock(struct sock *sk)
|
|||
sk->sk_sndmsg_page = NULL;
|
||||
}
|
||||
|
||||
if (tp->defer_tcp_accept.request) {
|
||||
reqsk_free(tp->defer_tcp_accept.request);
|
||||
sock_put(tp->defer_tcp_accept.listen_sk);
|
||||
sock_put(sk);
|
||||
tp->defer_tcp_accept.listen_sk = NULL;
|
||||
tp->defer_tcp_accept.request = NULL;
|
||||
}
|
||||
|
||||
atomic_dec(&tcp_sockets_allocated);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue