Added a new alert that is raised if peer does not respond to initial IKE message
authorTobias Brunner <tobias@strongswan.org>
Mon, 15 Oct 2012 11:12:43 +0000 (13:12 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 16 Oct 2012 12:16:17 +0000 (14:16 +0200)
src/libcharon/bus/bus.h
src/libcharon/sa/ike_sa.c

index aba8acd..4bde243 100644 (file)
@@ -90,6 +90,8 @@ enum alert_t {
        ALERT_PEER_AUTH_FAILED,
        /** failed to resolve peer address, no arguments */
        ALERT_PEER_ADDR_FAILED,
+       /** peer did not respond to initial message, current try (int, 0-based) */
+       ALERT_PEER_INIT_UNREACHABLE,
 };
 
 /**
index 1d49acb..d9118fc 100644 (file)
@@ -1690,6 +1690,8 @@ METHOD(ike_sa_t, retransmit, status_t,
                        {
                                /* retry IKE_SA_INIT/Main Mode if we have multiple keyingtries */
                                u_int32_t tries = this->peer_cfg->get_keyingtries(this->peer_cfg);
+                               charon->bus->alert(charon->bus, ALERT_PEER_INIT_UNREACHABLE,
+                                                                  this->keyingtry);
                                this->keyingtry++;
                                if (tries == 0 || tries > this->keyingtry)
                                {