Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

If there was no phase 2 negotiation under phase 1, phase 1 will be ne…

…gotiated

only one time.  But the next time is deleted.
  • Loading branch information...
commit 9037c3416281a0ded2fe966d98120a9aeda1aaf8 1 parent 0a882d6
sakane authored
Showing with 13 additions and 3 deletions.
  1. +4 −1 kame/kame/racoon/handler.h
  2. +9 −2 kame/kame/racoon/isakmp.c
View
5 kame/kame/racoon/handler.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* YIPS @(#)$Id: handler.h,v 1.3 2000/01/09 22:59:33 sakane Exp $ */
+/* YIPS @(#)$Id: handler.h,v 1.4 2000/01/09 23:11:04 sakane Exp $ */
/* Phase 1 handler */
/*
@@ -114,6 +114,9 @@ struct ph1handle {
u_int8_t flags; /* Flags */
u_int32_t msgid; /* message id */
+ int inuse; /* received EXPIRE message */
+ /* 0: init, 1: grace, 2: sa require */
+
struct sched *sce; /* schedule for expire */
struct sched *scr; /* schedule for resend */
struct sched *scg; /* schedule for release half connect */
View
11 kame/kame/racoon/isakmp.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* YIPS @(#)$Id: isakmp.c,v 1.15 2000/01/09 23:06:14 sakane Exp $ */
+/* YIPS @(#)$Id: isakmp.c,v 1.16 2000/01/09 23:11:06 sakane Exp $ */
#include <sys/types.h>
#include <sys/param.h>
@@ -1149,12 +1149,19 @@ isakmp_ph1restart(iph1)
/* XXX to do retry counter */
if (LIST_FIRST(&iph1->ph2tree) != NULL) {
+ iph1->inuse = 2; /* sa needed */
sched_new(1, isakmp_ph1restart, iph1);
return;
}
/* if it's initiator, begin re-negosiation */
- if (iph1->side == INITIATOR) {
+ if (iph1->side == INITIATOR && iph1->inuse != 1) {
+
+ if (iph1->inuse == 0)
+ iph1->inuse = 1; /* sa may not needed */
+ else
+ iph1->inuse = 0; /* reset */
+
YIPSDEBUG(DEBUG_STAMP,
plog(logp, LOCATION, NULL,
"restart phase1 negotiation %s\n",
Please sign in to comment.
Something went wrong with that request. Please try again.