]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
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 aba8acdbd3fc7887a554a6b9b8d9d0e289777848..4bde2434bd77edef9e9a5d6bf0ec7b158b12e828 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 1d49acb523cecb40c20f9e735c4aaf5b50724f56..d9118fc490aa282e9a8d67f7094841c8d3c5893b 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)
                                {