Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: francois reygagne <freygagne@opteway.com>
Subject: TCP listen pending connection does not work as expected
Date: Mon, 22 Jan 2001 19:58:36 +0100	[thread overview]
Message-ID: <3A6C82DC.E87E92CC@opteway.com> (raw)

I set the backlog parameter of listen to 2 to prevents from server
congestion.
I want the incoming client requests connect to be rejected i.e. refused
by tcp when the listen
queue is full.

The max number of tcp pending connections feature does not exist anymore
for the
kernel 2.2 and 2.4; Anyway it's possible via a root system command to
enable it
on Linux;  I use for that the root command as follow:
echo 1 >  /proc/sys/net/ipv4/tcp_abort_on-overflow on linux 2.2.14-12.

but tcp stack accepts all connection and resets them after !!!
My client receives connection reset by peer when receiving data !!

Normally the tcp stack should work as bellow ?
Once the backlog queuebecomes full, no further connection requests will
be accepted for that service until an entry becomes available in the
queue. Under normal conditions, if a connection request is made and the
queue is full, TCP relies on the client to retransmit the connection
request at some later stage. Generally speaking, TCP is quite expedient
in processing connection requests and so, unless the service is
particularly busy, a retransmitted request should be processed.



Could anyone help me. I want to make tcp rejected my incoming request
when the tcp listen queue is full
on Linux, Solaris 2.8, Tru64, HP-UX and AIX.


I have a workaround exposed here after but this solution seems to me
quick and dirty.

Define a threshold of max pending connections the server handles
* server accepts all connection and pushes the created client socket
into a fifo queue of pending connection
   until the fifo becomes full
* when max of pending connection is reached, the server stops pushing
client socket
1) reads client request then
2) sends a response  to refuse the request (server too busy)
3)closes the connection



--
Fran�ois REYGAGNE
opt[e]way S.A., 2881 route des Cr�tes, BP308
06906 Sophia Antipolis Cedex, FRANCE

t�l: +33 (0)4 92 95 27 01
fax: +33 (0)4 92 95 26 01





             reply	other threads:[~2001-01-22 18:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-22 18:58 francois reygagne [this message]
2001-01-23  2:06 ` TCP listen pending connection does not work as expected Fernando Gont
2001-01-23 10:43 ` Casper H.S. Dik - Network Security Engineer
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox