diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-07 15:45:24 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-07 15:45:24 +0000 |
commit | 9f9f3e6e8548a596697778337110a423c384b6f3 (patch) | |
tree | 5dd4b290ef532cf5ecb058e1a92cd3435afeac8c /net/ipv4/tcp_input.c | |
parent | d5c9a365ee7d2fded249aa5abfc5e89587583029 (diff) |
Merge with Linux 2.3.49.
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 88483d516..d431c682c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -5,7 +5,7 @@ * * Implementation of the Transmission Control Protocol(TCP). * - * Version: $Id: tcp_input.c,v 1.188 2000/02/08 21:27:14 davem Exp $ + * Version: $Id: tcp_input.c,v 1.189 2000/02/27 19:52:55 davem Exp $ * * Authors: Ross Biro, <bir7@leland.Stanford.Edu> * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> @@ -534,6 +534,9 @@ static void tcp_reset(struct sock *sk) sk->err = ECONNRESET; } + if (!sk->dead) + sk->error_report(sk); + tcp_done(sk); } @@ -1660,7 +1663,12 @@ static void tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) if (!sk->dead) { sk->state_change(sk); - sock_wake_async(sk->socket, 1, POLL_HUP); + + /* Do not send POLL_HUP for half duplex close. */ + if (sk->shutdown == SHUTDOWN_MASK || sk->state == TCP_CLOSE) + sock_wake_async(sk->socket, 1, POLL_HUP); + else + sock_wake_async(sk->socket, 1, POLL_IN); } } |