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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Jun 16 16:04:11 2013 UTC (13 months, 1 week ago) by blueness
Branch: MAIN
Version bump, security bug #460278

(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 diff -Naur stunnel-4.56.orig/src/options.c stunnel-4.56/src/options.c
2 --- stunnel-4.56.orig/src/options.c 2013-03-13 09:41:12.000000000 -0400
3 +++ stunnel-4.56/src/options.c 2013-06-16 11:17:49.000000000 -0400
4 @@ -1913,6 +1913,24 @@
5 break;
6 }
7
8 + /* listenqueue */
9 + switch(cmd) {
10 + case CMD_BEGIN:
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
29 diff -Naur stunnel-4.56.orig/src/prototypes.h stunnel-4.56/src/prototypes.h
30 --- stunnel-4.56.orig/src/prototypes.h 2013-03-19 13:30:55.000000000 -0400
31 +++ stunnel-4.56/src/prototypes.h 2013-06-16 11:17:49.000000000 -0400
32 @@ -183,6 +183,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 -Naur stunnel-4.56.orig/src/stunnel.c stunnel-4.56/src/stunnel.c
41 --- stunnel-4.56.orig/src/stunnel.c 2013-03-19 13:30:34.000000000 -0400
42 +++ stunnel-4.56/src/stunnel.c 2013-06-16 11:17:49.000000000 -0400
43 @@ -388,7 +388,7 @@
44 str_free(local_address);
45 return 1;
46 }
47 - if(listen(opt->fd, SOMAXCONN)) {
48 + if(listen(opt->fd, opt->listenqueue)) {
49 sockerror("listen");
50 closesocket(opt->fd);
51 str_free(local_address);

  ViewVC Help
Powered by ViewVC 1.1.20