aboutsummaryrefslogtreecommitdiffstats
path: root/main/ipsec-tools
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-10-14 15:55:53 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-10-14 15:56:40 +0300
commitaa248c9684ebf2799649358e284acd19fe7192b7 (patch)
treef85b32a878b5694587945c06a42c195f50b246ab /main/ipsec-tools
parent93dd6f1ebc0e08ce90976c0ce67cffa37b591743 (diff)
downloadaports-aa248c9684ebf2799649358e284acd19fe7192b7.tar.bz2
aports-aa248c9684ebf2799649358e284acd19fe7192b7.tar.xz
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.
Diffstat (limited to 'main/ipsec-tools')
-rw-r--r--main/ipsec-tools/75-racoonctl-rcvbuf.patch33
-rw-r--r--main/ipsec-tools/APKBUILD4
2 files changed, 36 insertions, 1 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 @@
+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;
+ }
+
diff --git a/main/ipsec-tools/APKBUILD b/main/ipsec-tools/APKBUILD
index 75ac34839f..dc5fca1b55 100644
--- a/main/ipsec-tools/APKBUILD
+++ b/main/ipsec-tools/APKBUILD
@@ -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"