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.
This commit is contained in:
parent
51ea83a9f5
commit
861dfdc294
@ -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 @@ ipsec_checkpcbcache(m, pcbsp, dir)
|
||||
struct inpcbpolicy *pcbsp;
|
||||
int dir;
|
||||
{
|
||||
#ifndef IPSEC_PCBCACHE
|
||||
return NULL;
|
||||
#else
|
||||
struct secpolicyindex spidx;
|
||||
|
||||
switch (dir) {
|
||||
@ -222,6 +225,7 @@ ipsec_checkpcbcache(m, pcbsp, dir)
|
||||
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 @@ ipsec_fillpcbcache(pcbsp, m, sp, dir)
|
||||
int dir;
|
||||
{
|
||||
|
||||
#ifndef IPSEC_PCBCACHE
|
||||
return EINVAL;
|
||||
#else
|
||||
switch (dir) {
|
||||
case IPSEC_DIR_INBOUND:
|
||||
case IPSEC_DIR_OUTBOUND:
|
||||
@ -260,6 +267,7 @@ ipsec_fillpcbcache(pcbsp, m, sp, dir)
|
||||
pcbsp->cachegen[dir] = sp_cachegen;
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user