mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manfred Bartz <mbartz@optushome.com.au>
To: linux-kernel@vger.kernel.org
Subject: Re: connect() does not return ETIMEDOUT
Date: 16 Aug 2001 10:59:02 +1000	[thread overview]
Message-ID: <20010816005902.16224.qmail@optushome.com.au> (raw)
In-Reply-To: <Pine.LNX.4.21.0108151123510.4809-100000@w-sridhar2.des.sequent.com>
In-Reply-To: Sridhar Samudrala's message of "Wed, 15 Aug 2001 14:41:15 -0700 (PDT)"

Sridhar Samudrala <samudrala@us.ibm.com> writes:

> linux has 2 queues associated with a listening socket...
> The second one is called accept queue which hold the complete
> connections ... The length of this queue ... is actually backlog+1.
> 
> When the accept queue is full, new incoming SYNs are accepted in a burst of 
> 2 at a time. These are put in the SYN table expecting that the accept queue
> will open up by the time we receive the ACK. If the accept queue doesn't get
> open up, the ACK is simply dropped and SYN-ACK is sent again after a certain
> timeout period. 

Thanks for the explanation, I appreciate it.

> In your example, 6 connections succeed immediately.
> But only 4 enter ESTABLISHED state.
> 2 are accepted by the server. 2 remain in the accept queue (backlog+1).

Ok, that part makes sense.

> 2 of them are added to the SYN table. 

So, the connections in the SYN table should be half open?
No server SYN should have been returned?
I just re-discovered ``TCP/IP Illustrated'' Vol.1 by W.R.Stevens and
it confirms this in section 18.11 under ``Incoming Connection Request
Queue''.  The book says:

    5. If there is not room on the queue for the new connection, TCP
    just ignores the received SYN.  Nothing is sent back (i.e. no RST
    segment).  ...

But in reality and going by the tcpdump, an unlimited number of
connections is accepted because the server side completes the 3-way
handshake regardless.  The connections are then lost later (with a
different error message).  This does not look right to me.

Comments?

-- 
Manfred

  reply	other threads:[~2001-08-16  0:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15 21:41 Sridhar Samudrala
2001-08-16  0:59 ` Manfred Bartz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-17 13:11 Alessandro Motter Ren
2001-08-17 22:39 ` Alexey Kuznetsov
     [not found] <Pine.LNX.4.21.0108151123510.4809-100000@w-sridhar2.des.sequent.com.suse.lists.linux.kernel>
     [not found] ` <20010816005902.16224.qmail@optushome.com.au.suse.lists.linux.kernel>
2001-08-16  1:39   ` Andi Kleen
     [not found] <20010813140049.28744.qmail@optushome.com.au.suse.lists.linux.kernel>
2001-08-13 16:15 ` Andi Kleen
2001-08-15 14:34   ` Manfred Bartz
2001-08-13 14:00 Manfred Bartz

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=20010816005902.16224.qmail@optushome.com.au \
    --to=mbartz@optushome.com.au \
    --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®