2014-01-29 16:56:32 +00:00
|
|
|
--- src/options.c
|
2011-06-16 12:04:07 +00:00
|
|
|
+++ src/options.c
|
2014-01-29 16:56:32 +00:00
|
|
|
@@ -1218,6 +1218,24 @@
|
2011-06-16 12:04:07 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2014-01-29 16:56:32 +00:00
|
|
|
+ /* listenqueue option */
|
2011-06-16 12:04:07 +00:00
|
|
|
+ switch(cmd) {
|
2014-01-29 16:56:32 +00:00
|
|
|
+ case CMD_BEGIN:
|
2011-06-16 12:04:07 +00:00
|
|
|
+ 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:
|
2014-01-29 16:56:32 +00:00
|
|
|
+ s_log(LOG_NOTICE, "%-15s = defines the maximum length the queue of pending connections may grow to (max SOMAXCONN)", "listenqueue");
|
2011-06-16 12:04:07 +00:00
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
2014-01-29 16:56:32 +00:00
|
|
|
#ifdef HAVE_OSSL_OCSP_H
|
|
|
|
|
|
|
|
/* OCSP */
|
|
|
|
--- src/prototypes.h
|
2011-06-16 12:04:07 +00:00
|
|
|
+++ src/prototypes.h
|
2014-03-06 16:20:19 +00:00
|
|
|
@@ -207,6 +207,7 @@
|
2011-07-25 06:57:06 +00:00
|
|
|
int timeout_close; /* maximum close_notify time */
|
|
|
|
int timeout_connect; /* maximum connect() time */
|
|
|
|
int timeout_idle; /* maximum idle connection time */
|
2014-03-06 16:20:19 +00:00
|
|
|
+ int listenqueue; /* Listen backlog */
|
2011-07-25 06:57:06 +00:00
|
|
|
enum {FAILOVER_RR, FAILOVER_PRIO} failover; /* failover strategy */
|
2014-03-06 16:20:19 +00:00
|
|
|
char *username;
|
2011-06-16 12:04:07 +00:00
|
|
|
|
2014-01-29 16:56:32 +00:00
|
|
|
--- src/stunnel.c
|
2011-06-16 12:04:07 +00:00
|
|
|
+++ src/stunnel.c
|
2014-03-06 16:20:19 +00:00
|
|
|
@@ -414,7 +414,7 @@
|
2012-07-21 06:32:50 +00:00
|
|
|
str_free(local_address);
|
|
|
|
return 1;
|
|
|
|
}
|
2011-06-16 12:04:07 +00:00
|
|
|
- if(listen(opt->fd, SOMAXCONN)) {
|
|
|
|
+ if(listen(opt->fd, opt->listenqueue)) {
|
|
|
|
sockerror("listen");
|
2011-07-25 06:57:06 +00:00
|
|
|
closesocket(opt->fd);
|
2014-01-29 16:56:32 +00:00
|
|
|
opt->fd=-1;
|