patch-2.1.10 linux/net/ipv4/tcp_input.c
Next file: linux/net/ipv4/udp.c
Previous file: linux/net/ipv4/tcp.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Wed Nov 13 07:59:31 1996
- Orig file:
v2.1.9/linux/net/ipv4/tcp_input.c
- Orig date:
Sun Nov 10 20:12:29 1996
diff -u --recursive --new-file v2.1.9/linux/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
@@ -194,11 +194,18 @@
/*
* We want the right error as BSD sees it (and indeed as we do).
*/
- sk->err = ECONNRESET;
- if (sk->state == TCP_SYN_SENT)
- sk->err = ECONNREFUSED;
- if (sk->state == TCP_CLOSE_WAIT)
- sk->err = EPIPE;
+ switch (sk->state) {
+ case TCP_TIME_WAIT:
+ break;
+ case TCP_SYN_SENT:
+ sk->err = ECONNREFUSED;
+ break;
+ case TCP_CLOSE_WAIT:
+ sk->err = EPIPE;
+ break;
+ default:
+ sk->err = ECONNRESET;
+ }
#ifdef CONFIG_TCP_RFC1337
/*
* Time wait assassination protection [RFC1337]
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov