Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 disable ipsec policy caching on pcb, as it seem...
details: https://anonhg.NetBSD.org/src/rev/ec53a6c44c5f
branches: trunk
changeset: 526774:ec53a6c44c5f
user: itojun <itojun%NetBSD.org@localhost>
date: Fri May 10 05:49:21 2002 +0000
description:
disable ipsec policy caching on pcb, as it seems that there's some reference-
counting mistake that causes panic - see PR 15953 and 13813.
i am unable to find the real cause of problem, so it is a shortterm workaround,
hopefully.
diffstat:
sys/netinet6/ipsec.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (54 lines):
diff -r 823098b4e88f -r ec53a6c44c5f sys/netinet6/ipsec.c
--- a/sys/netinet6/ipsec.c Fri May 10 05:45:50 2002 +0000
+++ b/sys/netinet6/ipsec.c Fri May 10 05:49:21 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.45 2002/05/10 05:38:29 itojun Exp $ */
+/* $NetBSD: ipsec.c,v 1.46 2002/05/10 05:49:21 itojun Exp $ */
/* $KAME: ipsec.c,v 1.125 2001/09/12 23:01:16 sakane Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.45 2002/05/10 05:38:29 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.46 2002/05/10 05:49:21 itojun Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -172,6 +172,9 @@
struct inpcbpolicy *pcbsp;
int dir;
{
+#ifndef IPSEC_PCBCACHE
+ return NULL;
+#else
struct secpolicyindex spidx;
switch (dir) {
@@ -222,6 +225,7 @@
printf("DP ipsec_checkpcbcache cause refcnt++:%d SP:%p\n",
pcbsp->cache[dir]->refcnt, pcbsp->cache[dir]));
return pcbsp->cache[dir];
+#endif
}
static int
@@ -232,6 +236,9 @@
int dir;
{
+#ifndef IPSEC_PCBCACHE
+ return EINVAL;
+#else
switch (dir) {
case IPSEC_DIR_INBOUND:
case IPSEC_DIR_OUTBOUND:
@@ -260,6 +267,7 @@
pcbsp->cachegen[dir] = sp_cachegen;
return 0;
+#endif
}
static int
Home |
Main Index |
Thread Index |
Old Index