diff options
Diffstat (limited to 'main/ipsec-tools/75-racoonctl-rcvbuf.patch')
-rw-r--r-- | main/ipsec-tools/75-racoonctl-rcvbuf.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/main/ipsec-tools/75-racoonctl-rcvbuf.patch b/main/ipsec-tools/75-racoonctl-rcvbuf.patch new file mode 100644 index 0000000000..3a68bfc2ae --- /dev/null +++ b/main/ipsec-tools/75-racoonctl-rcvbuf.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Index: src/racoon/kmpstat.c | ||
2 | =================================================================== | ||
3 | RCS file: /cvsroot/src/crypto/dist/ipsec-tools/src/racoon/kmpstat.c,v | ||
4 | retrieving revision 1.6 | ||
5 | diff -u -r1.6 kmpstat.c | ||
6 | --- a/src/racoon/kmpstat.c 2 Oct 2007 09:47:45 -0000 1.6 | ||
7 | +++ b/src/racoon/kmpstat.c 14 Oct 2010 12:48:22 -0000 | ||
8 | @@ -99,6 +99,7 @@ | ||
9 | com_init() | ||
10 | { | ||
11 | struct sockaddr_un name; | ||
12 | + int rcvSize; | ||
13 | |||
14 | memset(&name, 0, sizeof(name)); | ||
15 | name.sun_family = AF_UNIX; | ||
16 | @@ -114,6 +115,17 @@ | ||
17 | return -1; | ||
18 | } | ||
19 | |||
20 | + /* set receive buffer size - should be relative large: | ||
21 | + * racoon daemon will try to send all info in one go, if | ||
22 | + * it does not fit we'll miss stuff */ | ||
23 | + rcvSize = 1024 * 1024; | ||
24 | + if (setsockopt(so, SOL_SOCKET, SO_RCVBUF, | ||
25 | + (void*) &rcvSize, sizeof(rcvSize)) < 0) { | ||
26 | + rcvSize = 512 * 1024; | ||
27 | + (void) setsockopt(so, SOL_SOCKET, SO_RCVBUF, | ||
28 | + (void*) &rcvSize, sizeof(rcvSize)); | ||
29 | + } | ||
30 | + | ||
31 | return 0; | ||
32 | } | ||
33 | |||