Andreas Vetter
1ca0e0c995
- update package to 4.36 - obsoletes SOMAXCONN and libwrap disable patches (bnc#674554) - forward port listenqueue patch (bnc#674554) - explicitly enable libwrap in configure call * New features - Dynamic memory management for strings manipulation: no more static STRLEN limit, lower stack footprint. - Strict public key comparison added for "verify = 3" certificate checking mode (thx to Philipp Hartwig). - Backlog parameter of listen(2) changed from 5 to SOMAXCONN: improved behavior on heavy load. Old behavior can be restored with "listenqueue = 5" in stunnel.conf * Bugfixes - Missing pthread_attr_destroy() added to fix memory leak (thx to Paul Allex and Peter Pentchev). - Fixed the incorrect way of setting FD_CLOEXEC flag. - Fixed --enable-libwrap option of ./configure script. - Retry implemented on EAI_AGAIN error returned by resolver calls. OBS-URL: https://build.opensuse.org/request/show/73837 OBS-URL: https://build.opensuse.org/package/show/security:Stunnel/stunnel?expand=0&rev=40
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
--- src/options.c
|
|
+++ src/options.c
|
|
@@ -1484,6 +1484,25 @@
|
|
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 onnections may grow to (max SOMAXCONN)", "listenqueue");
|
|
+ break;
|
|
+ }
|
|
+
|
|
+
|
|
if(cmd==CMD_EXEC)
|
|
return option_not_found;
|
|
return NULL; /* OK */
|
|
--- src/prototypes.h
|
|
+++ src/prototypes.h
|
|
@@ -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 backlog */
|
|
enum {FAILOVER_RR, FAILOVER_PRIO} failover; /* failover strategy */
|
|
|
|
/* protocol name for protocol.c */
|
|
--- src/stunnel.c
|
|
+++ src/stunnel.c
|
|
@@ -241,7 +241,7 @@
|
|
}
|
|
s_log(LOG_DEBUG, "Service %s bound to %s",
|
|
opt->servname, opt->local_address);
|
|
- if(listen(opt->fd, SOMAXCONN)) {
|
|
+ if(listen(opt->fd, opt->listenqueue)) {
|
|
sockerror("listen");
|
|
return 0;
|
|
}
|