mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: "David S. Miller" <davem@redhat.com>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	linux-kernel@vger.kernel.org
Subject: [PATCH]: Set SOCK_DONE when TCP socket receives FIN
Date: Mon, 14 Jul 2003 03:41:00 +0100	[thread overview]
Message-ID: <20030714024100.GA23023@mail.jlokier.co.uk> (raw)

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:

             reply	other threads:[~2003-07-14  2:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-14  2:41 Jamie Lokier [this message]
2003-07-14  2:56 ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030714024100.GA23023@mail.jlokier.co.uk \
    --to=jamie@shareable.org \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®