Commit aa248c96 authored by Timo Teräs's avatar Timo Teräs

main/ipsec-tools: racoonctl socket buffer size patch

will fix certain racoonctl errors if there are multiple simultaneous
connections and the system socket buffer size is set low.
parent 93dd6f1e
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;
}
......@@ -2,7 +2,7 @@
pkgname=ipsec-tools
pkgver=0.8_alpha20090903
_myver=0.8-alpha20090903
pkgrel=10
pkgrel=11
pkgdesc="User-space IPsec tools for various IPsec implementations"
url="http://ipsec-tools.sourceforge.net/"
license="BSD"
......@@ -17,6 +17,7 @@ source="http://downloads.sourceforge.net/$pkgname/$pkgname-$_myver.tar.gz
initial-contact-fix.diff
fd-priorities.patch
70-rcvbuf-size.patch
75-racoonctl-rcvbuf.patch
90-openssl-oneshot.patch
"
......@@ -66,4 +67,5 @@ baa13d7f0f48955c792f7fcd42a8587a 60-debug-quick.patch
69e06c5cc3a0c1cc8b10ddc89d1e644b initial-contact-fix.diff
c1e8b8dc80ef4b5d79fece52a4865e68 fd-priorities.patch
f40c78e4ca4b92d2bf74e4fcf3a8d91f 70-rcvbuf-size.patch
2d5d24c4a3684a38584f88720f71c7d6 75-racoonctl-rcvbuf.patch
11e2c21e443edab17725f74ffeaddb76 90-openssl-oneshot.patch"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment