Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libipsec temporary workaround against KAME PR 154.
details: https://anonhg.NetBSD.org/src/rev/822f3d72d5ab
branches: trunk
changeset: 476414:822f3d72d5ab
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Sep 16 04:20:03 1999 +0000
description:
temporary workaround against KAME PR 154.
http://www2.kame.net/dev/query-pr.cgi?pr=154
This allows many keys to be dumped via "setkey -D", or many keys
to be configured by single "setkey -c < foo" command.
diffstat:
lib/libipsec/pfkey.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r b11a178d82bf -r 822f3d72d5ab lib/libipsec/pfkey.c
--- a/lib/libipsec/pfkey.c Thu Sep 16 00:54:14 1999 +0000
+++ b/lib/libipsec/pfkey.c Thu Sep 16 04:20:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pfkey.c,v 1.4 1999/07/04 01:36:13 itojun Exp $ */
+/* $NetBSD: pfkey.c,v 1.5 1999/09/16 04:20:03 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -34,7 +34,7 @@
#else
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: pfkey.c,v 1.4 1999/07/04 01:36:13 itojun Exp $");
+__RCSID("$NetBSD: pfkey.c,v 1.5 1999/09/16 04:20:03 itojun Exp $");
#endif
#endif
@@ -1040,12 +1040,20 @@
int pfkey_open(void)
{
int so;
+ const int bufsiz = 128 * 1024; /*is 128K enough?*/
if ((so = socket(PF_KEY, SOCK_RAW, PF_KEY_V2)) < 0) {
ipsec_set_strerror(strerror(errno));
return -1;
}
+ /*
+ * This is a temporary workaround for KAME PR 154.
+ * Don't really care even if it fails.
+ */
+ (void)setsockopt(so, SOL_SOCKET, SO_SNDBUF, &bufsiz, sizeof(bufsiz));
+ (void)setsockopt(so, SOL_SOCKET, SO_RCVBUF, &bufsiz, sizeof(bufsiz));
+
ipsec_errcode = EIPSEC_NO_ERROR;
return so;
}
Home |
Main Index |
Thread Index |
Old Index