/[gentoo-x86]/net-misc/stunnel/files/stunnel-4.54-listen-queue.patch
Gentoo

Contents of /net-misc/stunnel/files/stunnel-4.54-listen-queue.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Dec 25 04:25:06 2012 UTC (19 months ago) by ramereth
Branch: MAIN
Version bump, fix init script, fixes #448298 & #436268

(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 27F4B742)

1 --- src/options.c
2 +++ src/options.c
3 @@ -1507,6 +1507,24 @@
4 break;
5 }
6
7 + /* listenqueue */
8 + switch(cmd) {
9 + case CMD_BEGIN:
10 + section->listenqueue=SOMAXCONN;
11 + break;
12 + case CMD_EXEC:
13 + if(strcasecmp(opt, "listenqueue"))
14 + break;
15 + section->listenqueue=atoi(arg);
16 + return (section->listenqueue?NULL:"Bad verify level");
17 + case CMD_DEFAULT:
18 + s_log(LOG_NOTICE, "%-15s = %d", "listenqueue", SOMAXCONN);
19 + break;
20 + case CMD_HELP:
21 + s_log(LOG_NOTICE, "%-15s = defines the maximum length the queue of pending connections may grow to", "listenqueue");
22 + break;
23 + }
24 +
25 if(cmd==CMD_EXEC)
26 return option_not_found;
27 return NULL; /* OK */
28 --- src/prototypes.h
29 +++ src/prototypes.h
30 @@ -178,6 +178,7 @@
31 int timeout_close; /* maximum close_notify time */
32 int timeout_connect; /* maximum connect() time */
33 int timeout_idle; /* maximum idle connection time */
34 + int listenqueue; /* Listen baklog */
35 enum {FAILOVER_RR, FAILOVER_PRIO} failover; /* failover strategy */
36
37 /* service-specific data for protocol.c */
38 --- src/stunnel.c
39 +++ src/stunnel.c
40 @@ -363,7 +363,7 @@
41 str_free(local_address);
42 return 1;
43 }
44 - if(listen(opt->fd, SOMAXCONN)) {
45 + if(listen(opt->fd, opt->listenqueue)) {
46 sockerror("listen");
47 closesocket(opt->fd);
48 str_free(local_address);

  ViewVC Help
Powered by ViewVC 1.1.20