lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1418137657.384.17.camel@niobium.home.fifi.org>
Date:	Tue, 09 Dec 2014 07:07:37 -0800
From:	Philippe Troin <phil@...i.org>
To:	Ulrich Windl <Ulrich.Windl@...uni-regensburg.de>
Cc:	netdev@...r.kernel.org
Subject: Re: Antw: Re: Q: need effective backlog for listen()

On Tue, 2014-12-09 at 08:01 +0100, Ulrich Windl wrote:
> >>> Philippe Troin <phil@...i.org> schrieb am 08.12.2014 um 17:35 in Nachricht
> <1418056540.384.5.camel@...bium.home.fifi.org>:
>
> > The argument to listen() specifies how many connections the system is
> > allow to keep waiting to be accept()ed.
> > As soon as you accept() the connection, the count is decremented.
> > So that won't help for your use case.
> > 
> >> However none of the above see ms true. Even if my server delays
> >> accept()ing new connections, no client ever sees a "connection
> >> refused" or "connection timed out". Is there any chance to signal the
> >> client that no more connections are accepted at the moment?
> > 
> > Close the listening socket.  No new connections will be accepted.
> > When you reopen the socket for accepting new connections, you may have
> > to use SO_REUSEADDR before bind()ing to the port.
> 
> This is what I had done, but those connections who are waiting to be
> accepted: If I close the listening socket, will the clients see a
> connection abort, or will they see a connection refused?
> Connection aborts could confuse clients.

The clients that completed the 3-way handshake and are waiting for their
(server-side) socket to be accept()ed will see connection reset I
believe.

You may be able to work something out by having no listen backlog
(listen(0)) and closing and reopening the socket when needed.

Phil.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ