mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-14 13:12:09 +01:00
will fix certain racoonctl errors if there are multiple simultaneous connections and the system socket buffer size is set low.
34 lines
944 B
Diff
34 lines
944 B
Diff
Index: src/racoon/kmpstat.c
|
|
===================================================================
|
|
RCS file: /cvsroot/src/crypto/dist/ipsec-tools/src/racoon/kmpstat.c,v
|
|
retrieving revision 1.6
|
|
diff -u -r1.6 kmpstat.c
|
|
--- a/src/racoon/kmpstat.c 2 Oct 2007 09:47:45 -0000 1.6
|
|
+++ b/src/racoon/kmpstat.c 14 Oct 2010 12:48:22 -0000
|
|
@@ -99,6 +99,7 @@
|
|
com_init()
|
|
{
|
|
struct sockaddr_un name;
|
|
+ int rcvSize;
|
|
|
|
memset(&name, 0, sizeof(name));
|
|
name.sun_family = AF_UNIX;
|
|
@@ -114,6 +115,17 @@
|
|
return -1;
|
|
}
|
|
|
|
+ /* set receive buffer size - should be relative large:
|
|
+ * racoon daemon will try to send all info in one go, if
|
|
+ * it does not fit we'll miss stuff */
|
|
+ rcvSize = 1024 * 1024;
|
|
+ if (setsockopt(so, SOL_SOCKET, SO_RCVBUF,
|
|
+ (void*) &rcvSize, sizeof(rcvSize)) < 0) {
|
|
+ rcvSize = 512 * 1024;
|
|
+ (void) setsockopt(so, SOL_SOCKET, SO_RCVBUF,
|
|
+ (void*) &rcvSize, sizeof(rcvSize));
|
|
+ }
|
|
+
|
|
return 0;
|
|
}
|
|
|