/[gentoo-x86]/net-misc/stunnel/files/stunnel-4.44-listen-queue.diff
Gentoo

Contents of /net-misc/stunnel/files/stunnel-4.44-listen-queue.diff

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Oct 11 21:00:16 2011 UTC (2 years, 10 months ago) by robbat2
Branch: MAIN
File MIME type: text/plain
Respin x-forwarded-for and listen-queue patches.

(Portage version: 2.2.0_alpha60/cvs/Linux x86_64)

1 diff -Nuar --exclude '*.orig' stunnel-4.44.orig/src/options.c stunnel-4.44/src/options.c
2 --- stunnel-4.44.orig/src/options.c 2011-09-10 16:44:16.000000000 +0000
3 +++ stunnel-4.44/src/options.c 2011-10-11 20:52:51.207293970 +0000
4 @@ -1508,6 +1508,24 @@
5 break;
6 }
7
8 + /* listenqueue */
9 + switch(cmd) {
10 + case CMD_INIT:
11 + section->listenqueue=SOMAXCONN;
12 + break;
13 + case CMD_EXEC:
14 + if(strcasecmp(opt, "listenqueue"))
15 + break;
16 + section->listenqueue=atoi(arg);
17 + return (section->listenqueue?NULL:"Bad verify level");
18 + case CMD_DEFAULT:
19 + s_log(LOG_NOTICE, "%-15s = %d", "listenqueue", SOMAXCONN);
20 + break;
21 + case CMD_HELP:
22 + s_log(LOG_NOTICE, "%-15s = defines the maximum length the queue of pending connections may grow to", "listenqueue");
23 + break;
24 + }
25 +
26 if(cmd==CMD_EXEC)
27 return option_not_found;
28 return NULL; /* OK */
29 diff -Nuar --exclude '*.orig' stunnel-4.44.orig/src/prototypes.h stunnel-4.44/src/prototypes.h
30 --- stunnel-4.44.orig/src/prototypes.h 2011-09-13 13:36:52.000000000 +0000
31 +++ stunnel-4.44/src/prototypes.h 2011-10-11 20:54:02.054127819 +0000
32 @@ -164,6 +164,7 @@
33 int timeout_close; /* maximum close_notify time */
34 int timeout_connect; /* maximum connect() time */
35 int timeout_idle; /* maximum idle connection time */
36 + int listenqueue; /* Listen baklog */
37 enum {FAILOVER_RR, FAILOVER_PRIO} failover; /* failover strategy */
38
39 /* service-specific data for protocol.c */
40 diff -Nuar --exclude '*.orig' stunnel-4.44.orig/src/stunnel.c stunnel-4.44/src/stunnel.c
41 --- stunnel-4.44.orig/src/stunnel.c 2011-09-08 20:20:46.000000000 +0000
42 +++ stunnel-4.44/src/stunnel.c 2011-10-11 20:53:34.037394788 +0000
43 @@ -249,7 +249,7 @@
44 }
45 s_log(LOG_DEBUG, "Service %s bound to %s",
46 opt->servname, local_address);
47 - if(listen(opt->fd, SOMAXCONN)) {
48 + if(listen(opt->fd, opt->listenqueue)) {
49 sockerror("listen");
50 closesocket(opt->fd);
51 return 1;

  ViewVC Help
Powered by ViewVC 1.1.20