Throw an alert when the peer address cannot be resolved during initiation.
authorTobias Brunner <tobias@strongswan.org>
Wed, 10 Aug 2011 13:45:41 +0000 (15:45 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 12 Aug 2011 07:59:27 +0000 (09:59 +0200)
src/libcharon/bus/bus.h
src/libcharon/sa/ike_sa.c

index 1b4d856..b524fe7 100644 (file)
@@ -86,6 +86,8 @@ enum alert_t {
        ALERT_SHUTDOWN_SIGNAL,
        /** responder authentication failed, no arguments */
        ALERT_RESPONDER_AUTH_FAILED,
+       /** failed to resolve peer address, no arguments */
+       ALERT_PEER_ADDR_FAILED,
 };
 
 /**
index eb23677..6536acf 100644 (file)
@@ -1118,6 +1118,7 @@ METHOD(ike_sa_t, initiate, status_t,
                {
                        child_cfg->destroy(child_cfg);
                        DBG1(DBG_IKE, "unable to initiate to %%any");
+                       charon->bus->alert(charon->bus, ALERT_PEER_ADDR_FAILED);
                        return DESTROY_ME;
                }