diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-10-15 13:12:43 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-10-16 14:16:17 +0200 |
commit | 1d6dc62727afde43cef1daad8ee51b733db91433 (patch) | |
tree | 23abff34abe5d0516e5ffdb43e3a8f5ea39ed513 | |
parent | b00806cf858c630fd715dc07d4723e5185e8deb7 (diff) | |
download | strongswan-1d6dc62727afde43cef1daad8ee51b733db91433.tar.bz2 strongswan-1d6dc62727afde43cef1daad8ee51b733db91433.tar.xz |
Added a new alert that is raised if peer does not respond to initial IKE message
-rw-r--r-- | src/libcharon/bus/bus.h | 2 | ||||
-rw-r--r-- | src/libcharon/sa/ike_sa.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libcharon/bus/bus.h b/src/libcharon/bus/bus.h index aba8acdbd..4bde2434b 100644 --- a/src/libcharon/bus/bus.h +++ b/src/libcharon/bus/bus.h @@ -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, }; /** diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c index 1d49acb52..d9118fc49 100644 --- a/src/libcharon/sa/ike_sa.c +++ b/src/libcharon/sa/ike_sa.c @@ -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) { |