aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index bc7f62e2792b..de30e70ff256 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4576,49 +4576,6 @@ static void tcp_urg(struct sock *sk, struct sk_buff *skb, struct tcphdr *th)
4576 } 4576 }
4577} 4577}
4578 4578
4579static int tcp_defer_accept_check(struct sock *sk)
4580{
4581 struct tcp_sock *tp = tcp_sk(sk);
4582
4583 if (tp->defer_tcp_accept.request) {
4584 int queued_data = tp->rcv_nxt - tp->copied_seq;
4585 int hasfin = !skb_queue_empty(&sk->sk_receive_queue) ?
4586 tcp_hdr((struct sk_buff *)
4587 sk->sk_receive_queue.prev)->fin : 0;
4588
4589 if (queued_data && hasfin)
4590 queued_data--;
4591
4592 if (queued_data &&
4593 tp->defer_tcp_accept.listen_sk->sk_state == TCP_LISTEN) {
4594 if (sock_flag(sk, SOCK_KEEPOPEN)) {
4595 inet_csk_reset_keepalive_timer(sk,
4596 keepalive_time_when(tp));
4597 } else {
4598 inet_csk_delete_keepalive_timer(sk);
4599 }
4600
4601 inet_csk_reqsk_queue_add(
4602 tp->defer_tcp_accept.listen_sk,
4603 tp->defer_tcp_accept.request,
4604 sk);
4605
4606 tp->defer_tcp_accept.listen_sk->sk_data_ready(
4607 tp->defer_tcp_accept.listen_sk, 0);
4608
4609 sock_put(tp->defer_tcp_accept.listen_sk);
4610 sock_put(sk);
4611 tp->defer_tcp_accept.listen_sk = NULL;
4612 tp->defer_tcp_accept.request = NULL;
4613 } else if (hasfin ||
4614 tp->defer_tcp_accept.listen_sk->sk_state != TCP_LISTEN) {
4615 tcp_reset(sk);
4616 return -1;
4617 }
4618 }
4619 return 0;
4620}
4621
4622static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) 4579static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen)
4623{ 4580{
4624 struct tcp_sock *tp = tcp_sk(sk); 4581 struct tcp_sock *tp = tcp_sk(sk);
@@ -4979,8 +4936,6 @@ step5:
4979 4936
4980 tcp_data_snd_check(sk); 4937 tcp_data_snd_check(sk);
4981 tcp_ack_snd_check(sk); 4938 tcp_ack_snd_check(sk);
4982
4983 tcp_defer_accept_check(sk);
4984 return 0; 4939 return 0;
4985 4940
4986csum_error: 4941csum_error: