diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-13 10:34:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-13 10:34:47 -0400 |
commit | 51558576ead54c1047e4d41440626e4f9aa015ea (patch) | |
tree | ec1d609d4800dbda8c918d3142f6727dd4c2f462 /net/ipv4/tcp_input.c | |
parent | d36e311070ee3a378a54142a168ff5cfedba33d5 (diff) | |
parent | ec0a196626bd12e0ba108d7daa6d95a4fb25c2c5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
tcp: Revert 'process defer accept as established' changes.
ipv6: Fix duplicate initialization of rawv6_prot.destroy
bnx2x: Updating the Maintainer
net: Eliminate flush_scheduled_work() calls while RTNL is held.
drivers/net/r6040.c: correct bad use of round_jiffies()
fec_mpc52xx: MPC52xx_MESSAGES_DEFAULT: 2nd NETIF_MSG_IFDOWN => IFUP
ipg: fix receivemode IPG_RM_RECEIVEMULTICAST{,HASH} in ipg_nic_set_multicast_list()
netfilter: nf_conntrack: fix ctnetlink related crash in nf_nat_setup_info()
netfilter: Make nflog quiet when no one listen in userspace.
ipv6: Fail with appropriate error code when setting not-applicable sockopt.
ipv6: Check IPV6_MULTICAST_LOOP option value.
ipv6: Check the hop limit setting in ancillary data.
ipv6 route: Fix route lifetime in netlink message.
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
dccp: Bug in initial acknowledgment number assignment
dccp ccid-3: X truncated due to type conversion
dccp ccid-3: TFRC reverse-lookup Bug-Fix
dccp ccid-2: Bug-Fix - Ack Vectors need to be ignored on request sockets
dccp: Fix sparse warnings
dccp ccid-3: Bug-Fix - Zero RTT is possible
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index eba873e9b560..cad73b7dfef0 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4541,49 +4541,6 @@ static void tcp_urg(struct sock *sk, struct sk_buff *skb, struct tcphdr *th) | |||
4541 | } | 4541 | } |
4542 | } | 4542 | } |
4543 | 4543 | ||
4544 | static int tcp_defer_accept_check(struct sock *sk) | ||
4545 | { | ||
4546 | struct tcp_sock *tp = tcp_sk(sk); | ||
4547 | |||
4548 | if (tp->defer_tcp_accept.request) { | ||
4549 | int queued_data = tp->rcv_nxt - tp->copied_seq; | ||
4550 | int hasfin = !skb_queue_empty(&sk->sk_receive_queue) ? | ||
4551 | tcp_hdr((struct sk_buff *) | ||
4552 | sk->sk_receive_queue.prev)->fin : 0; | ||
4553 | |||
4554 | if (queued_data && hasfin) | ||
4555 | queued_data--; | ||
4556 | |||
4557 | if (queued_data && | ||
4558 | tp->defer_tcp_accept.listen_sk->sk_state == TCP_LISTEN) { | ||
4559 | if (sock_flag(sk, SOCK_KEEPOPEN)) { | ||
4560 | inet_csk_reset_keepalive_timer(sk, | ||
4561 | keepalive_time_when(tp)); | ||
4562 | } else { | ||
4563 | inet_csk_delete_keepalive_timer(sk); | ||
4564 | } | ||
4565 | |||
4566 | inet_csk_reqsk_queue_add( | ||
4567 | tp->defer_tcp_accept.listen_sk, | ||
4568 | tp->defer_tcp_accept.request, | ||
4569 | sk); | ||
4570 | |||
4571 | tp->defer_tcp_accept.listen_sk->sk_data_ready( | ||
4572 | tp->defer_tcp_accept.listen_sk, 0); | ||
4573 | |||
4574 | sock_put(tp->defer_tcp_accept.listen_sk); | ||
4575 | sock_put(sk); | ||
4576 | tp->defer_tcp_accept.listen_sk = NULL; | ||
4577 | tp->defer_tcp_accept.request = NULL; | ||
4578 | } else if (hasfin || | ||
4579 | tp->defer_tcp_accept.listen_sk->sk_state != TCP_LISTEN) { | ||
4580 | tcp_reset(sk); | ||
4581 | return -1; | ||
4582 | } | ||
4583 | } | ||
4584 | return 0; | ||
4585 | } | ||
4586 | |||
4587 | static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) | 4544 | static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) |
4588 | { | 4545 | { |
4589 | struct tcp_sock *tp = tcp_sk(sk); | 4546 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -4944,8 +4901,6 @@ step5: | |||
4944 | 4901 | ||
4945 | tcp_data_snd_check(sk); | 4902 | tcp_data_snd_check(sk); |
4946 | tcp_ack_snd_check(sk); | 4903 | tcp_ack_snd_check(sk); |
4947 | |||
4948 | tcp_defer_accept_check(sk); | ||
4949 | return 0; | 4904 | return 0; |
4950 | 4905 | ||
4951 | csum_error: | 4906 | csum_error: |