Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Make kernel SOMAXCONN patchable. Will add sysctl o...



details:   https://anonhg.NetBSD.org/src/rev/05a8117a9e4f
branches:  trunk
changeset: 481843:05a8117a9e4f
user:      jonathan <jonathan%NetBSD.org@localhost>
date:      Mon Feb 07 18:43:26 2000 +0000

description:
Make kernel SOMAXCONN patchable.  Will add sysctl once we
decide on namespace.

diffstat:

 sys/kern/uipc_socket.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r b772fadd118d -r 05a8117a9e4f sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Mon Feb 07 18:04:04 2000 +0000
+++ b/sys/kern/uipc_socket.c    Mon Feb 07 18:43:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.48 1999/06/08 02:39:57 thorpej Exp $ */
+/*     $NetBSD: uipc_socket.c,v 1.49 2000/02/07 18:43:26 jonathan Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1990, 1993
@@ -54,6 +54,9 @@
 
 struct pool socket_pool;
 
+extern int somaxconn;                  /* patchable (XXX sysctl) */
+int somaxconn = SOMAXCONN;
+
 void
 soinit()
 {
@@ -154,7 +157,7 @@
                so->so_options |= SO_ACCEPTCONN;
        if (backlog < 0)
                backlog = 0;
-       so->so_qlimit = min(backlog, SOMAXCONN);
+       so->so_qlimit = min(backlog, somaxconn);
        splx(s);
        return (0);
 }



Home | Main Index | Thread Index | Old Index