[Swan-dev] ASSERTION FAILED in ikev1.c

D. Hugh Redelmeier hugh at mimosa.com
Fri Jun 13 15:44:08 EEST 2014


| From: Wolfgang Nothdurft <wolfgang at linogate.de>

| With git commit 4bb0f023ffa246f29dbcc21fb231e57675a31d97 pluto crashed on my
| test connections.

Thanks for the report.

The problem is that a comment lied.  I "trusted but verified": replaced
an assignment that the comment implied was redundant with an assertion
that it isn't needed.  Well, it apparently is needed.

We should figure out what's going on in your run and update the
comment.

In the meantime, I've committed a patch that reverses this particular
chunk (see attachment).
-------------- next part --------------
commit 128fd8922cd1cd12b3ef8d01c5a58584f447b319
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Fri Jun 13 08:31:06 2014 -0400

    Reverse a chunk of 4bb0f023ffa246f29dbcc21fb231e57675a31d97 that causes passert failure.
    Thanks to Wolfgang Nothdurft for reporting the failure.
    Moral: comments lie.

diff --git a/programs/pluto/ikev1.c b/programs/pluto/ikev1.c
index ba9817d..a1637df 100644
--- a/programs/pluto/ikev1.c
+++ b/programs/pluto/ikev1.c
@@ -2286,8 +2286,10 @@ void complete_v1_state_transition(struct msg_digest **mdp, stf_status result)
 		/*
 		 * this is second time through complete state transition,
 		 * so the MD has already been freed.
+		 * ??? This comment is not true.
+		 * This has been proven by passert(md == NULL) failing.
 		 */
-		passert(md == NULL);
+		*mdp = NULL;
 		break;
 
 	case STF_SUSPEND:


More information about the Swan-dev mailing list