sending proper signal to the bus when detecting a dead peer
authorMartin Willi <martin@strongswan.org>
Thu, 1 Feb 2007 15:23:31 +0000 (15:23 -0000)
committerMartin Willi <martin@strongswan.org>
Thu, 1 Feb 2007 15:23:31 +0000 (15:23 -0000)
src/charon/sa/ike_sa.c

index 225a925..62f18b5 100644 (file)
@@ -498,6 +498,23 @@ static void dpd_detected(private_ike_sa_t *this)
                }
                child_sa->destroy(child_sa);
        }
+       
+       /* send a proper signal to brief interested bus listeners */
+       switch (this->state)
+       {
+               case IKE_CONNECTING:
+                       SIG(IKE_UP_FAILED, "establishing IKE_SA failed, peer not responding");
+                       break;
+               case IKE_REKEYING:
+                       SIG(IKE_REKEY_FAILED, "rekeying IKE_SA failed, peer not responding");
+                       break;
+               case IKE_DELETING:
+                       SIG(IKE_DOWN_FAILED, "proper IKE_SA delete failed, peer not responding");
+                       break;
+               default:
+                       break;
+       }
+       
        DESTROY_IF(connection);
 }