lkml.org 
[lkml]   [2003]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH]: Set SOCK_DONE when TCP socket receives FIN
The SOCK_DONE flag is always clear and never set in 2.5.75.  Yet there
is code which tests it, and if it's clear, will return -ENOTCONN.
Admittedly I am confused as to how this is not noticed :)

This small patch sets it where it looks like it was intended.
Please check.

Enjoy,
-- Jamie

diff -ur orig-2.5.75/net/ipv4/tcp_input.c build-2.5.75/net/ipv4/tcp_input.c
--- orig-2.5.75/net/ipv4/tcp_input.c 2003-07-12 17:57:38.000000000 +0100
+++ build-2.5.75/net/ipv4/tcp_input.c 2003-07-14 02:29:15.000000000 +0100
@@ -2373,7 +2373,7 @@
tcp_schedule_ack(tp);

sk->sk_shutdown |= RCV_SHUTDOWN;
- sock_reset_flag(sk, SOCK_DONE);
+ sock_set_flag(sk, SOCK_DONE);

switch (sk->sk_state) {
case TCP_SYN_RECV:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:46    [W:1.538 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site