[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openswan-cvs
Subject:    [Openswan CVS] openswan-2/programs/pluto dpd.c,1.8,1.9
From:       Michael Richardson <mcr () xelerance ! com>
Date:       2004-11-30 17:39:21
Message-ID: 20041130173921.E0E91138039 () tla ! xelerance ! com
[Download RAW message or body]

Update of /xelerance/master/openswan-2/programs/pluto
In directory tla.xelerance.com:/tmp/cvs-serv1247

Modified Files:
	dpd.c 
Log Message:
	sometimes, a DPD event occurs for an expired state,
	in which case the state is ==NULL.


Index: dpd.c
===================================================================
RCS file: /xelerance/master/openswan-2/programs/pluto/dpd.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dpd.c	30 Nov 2004 16:34:33 -0000	1.8
+++ dpd.c	30 Nov 2004 17:39:19 -0000	1.9
@@ -106,12 +106,6 @@
      * base the resend time on that. */
     tm = now();
     
-    if (st == NULL)
-    {
-        loglog(RC_LOG_SERIOUS, "DPD Error: could not find newest phase 1 state");
-        return;
-    }
-
     /* If no DPD, then get out of here */
     if (!st->hidden_variables.st_dpd)
         return;
@@ -208,12 +202,20 @@
     /* find the related Phase 1 state */
     st = find_phase1_state(p2st->st_connection, ISAKMP_SA_ESTABLISHED_STATES);
 
+    if (st == NULL)
+    {
+        loglog(RC_LOG_SERIOUS, "DPD Error: could not find newest phase 1 state");
+        return;
+    }
+
     dpd_outI(st, p2st, TRUE, delay, timeout);
 }
 
 void
 dpd_event(struct state *st)
 {
+    if(st==NULL) return;
+
     if(IS_PHASE1(st->st_state)) {
 	p1_dpd_outI1(st);
     } else {

_______________________________________________
Cvs mailing list
Cvs@openswan.org
http://lists.openswan.org/mailman/listinfo/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic