Skip to content

Commit

Permalink
in pcb sp caching code, check if SP is still alive.
Browse files Browse the repository at this point in the history
  • Loading branch information
itojun committed May 19, 2002
1 parent d520d6b commit b63165d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kame/sys/netinet6/ipsec.c
@@ -1,4 +1,4 @@
/* $KAME: ipsec.c,v 1.135 2002/01/31 14:14:52 jinmei Exp $ */
/* $KAME: ipsec.c,v 1.136 2002/05/19 00:36:39 itojun Exp $ */

/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Expand Down Expand Up @@ -289,6 +289,10 @@ ipsec_checkpcbcache(m, pcbsp, dir)
}
if (!pcbsp->cache[dir])
return NULL;
if (pcbsp->cache[dir]->state != IPSEC_SPSTATE_ALIVE) {
ipsec_invalpcbcache(pcbsp, dir);
return NULL;
}
if ((pcbsp->cacheflags & IPSEC_PCBSP_CONNECTED) == 0) {
if (!pcbsp->cache[dir])
return NULL;
Expand Down

0 comments on commit b63165d

Please sign in to comment.