Patch by Thomas Franco, rediffed for 4.34. diff -ru stunnel-4.34/src/options.c stunnel-4.34-listen-queue/src/options.c --- stunnel-4.34/src/options.c 2010-09-14 17:09:36.000000000 +0200 +++ stunnel-4.34-listen-queue/src/options.c 2010-12-06 22:14:15.610223090 +0100 @@ -1473,6 +1473,24 @@ break; } + /* listenqueue */ + switch(cmd) { + case CMD_INIT: + section->listenqueue=SOMAXCONN; + break; + case CMD_EXEC: + if(strcasecmp(opt, "listenqueue")) + break; + section->listenqueue=atoi(arg); + return (section->listenqueue?NULL:"Bad verify level"); + case CMD_DEFAULT: + s_log(LOG_NOTICE, "%-15s = %d", "listenqueue", SOMAXCONN); + break; + case CMD_HELP: + s_log(LOG_NOTICE, "%-15s = defines the maximum length the queue of pending connections may grow to", "listenqueue"); + break; + } + if(cmd==CMD_EXEC) return option_not_found; return NULL; /* OK */ diff -ru stunnel-4.34/src/prototypes.h stunnel-4.34-listen-queue/src/prototypes.h --- stunnel-4.34/src/prototypes.h 2010-09-14 17:09:50.000000000 +0200 +++ stunnel-4.34-listen-queue/src/prototypes.h 2010-12-06 22:06:39.217327586 +0100 @@ -158,6 +158,7 @@ int timeout_close; /* maximum close_notify time */ int timeout_connect; /* maximum connect() time */ int timeout_idle; /* maximum idle connection time */ + int listenqueue; /* Listen baklog */ enum {FAILOVER_RR, FAILOVER_PRIO} failover; /* failover strategy */ /* protocol name for protocol.c */ Seulement dans stunnel-4.34-listen-queue/src: prototypes.h~ diff -ru stunnel-4.34/src/stunnel.c stunnel-4.34-listen-queue/src/stunnel.c --- stunnel-4.34/src/stunnel.c 2010-08-20 11:01:35.000000000 +0200 +++ stunnel-4.34-listen-queue/src/stunnel.c 2010-12-06 22:05:54.732885327 +0100 @@ -204,7 +204,7 @@ } s_log(LOG_DEBUG, "Service %s bound to %s", opt->servname, opt->local_address); - if(listen(opt->fd, 5)) { + if(listen(opt->fd, opt->listenqueue)) { sockerror("listen"); return 0; } Seulement dans stunnel-4.34-listen-queue/src: stunnel.c~