Subject: Re: New sysctl "net.listen_backlog"?
To: Marc Slemko <marcs@znep.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-net
Date: 09/14/1998 15:00:16
>I am going on what Todd said; ie. that SOMAXCONN is set to 5 in
>sys/socket.h; I don't use or track NetBSD very closely. 


SOMAXCONN is 128 in 1.3.2, both in sys/socket.h and the manpage.  I
haven't looked further back, but I think it was 128 in 1.3 as well,
and it's still 128 in yesterday's source.

Could you please post your adjusted opinions, given that?


>That doesn't make much sense.  Why not just have SOMAXCONN set the default
>limit (and tell people there is no point in changing SOMAXCONN), then have
>the sysctl adjust it to whatever you want?  Where is the need for the
>hardcoded limit at all?

Purely to stop someone setting it to ULONG_MAX and opening themselves
to the obvious memory-exhaustion attack.  If you don't think that's a
problem, don't enforce the upper bound, or make SOMAXCONN configurable
at config time (and set it to ULONG_MAX).

Again, there're still boxes where 5 is a very workable limit.  (Proof
by example-- this email is composed on one.).  And we still support
systems which are so old and slow that a much higher SOMAXCONN would
be inappropriate (vax 11/750s?). Other than that, I still don't see
the problem with just using 128, though.  Todd?  Is there one?