[Openswan dev] more debugging / impairing strangenessA

Paul Wouters paul at xelerance.com
Mon Dec 27 17:22:49 EST 2010


I found another oddity. First of all the pluto options --impair-sa-creation
and --impair-die-oninfo were not there, so IMPAIR_SA_CREATION and
IMPAIR_DIE_ONINFO were never set. I fixed those. Then IMPAIR_SA_CREATION still
did not seem to work until I made this change:

diff --git a/programs/pluto/kernel.c b/programs/pluto/kernel.c
index badacfd..7fd6ff2 100644
--- a/programs/pluto/kernel.c
+++ b/programs/pluto/kernel.c
@@ -1985,7 +1985,8 @@ setup_half_ipsec_sa(struct state *st, bool inbound)

  #ifdef DEBUG
      /* if the impaired is set, pretend this fails */
-    if(st->st_connection->extra_debugging & IMPAIR_SA_CREATION) {
+    if(cur_debugging & IMPAIR_SA_CREATION) {
         DBG_log("Impair SA creation is set, pretending to fail");
         goto fail;
      }

It seems to be that IMPAIR_SA_CREATION was created to be used on a per-conn basis?
While in fact it is only set globally. Though this might be because of the previous
reporting logging issue.

Can anyone confirm this is the right fix?

Paul


More information about the Dev mailing list