From: Martin Willi Date: Tue, 6 Nov 2012 10:05:04 +0000 (+0100) Subject: Raise an alert if CHILD_SA proposals mismatch X-Git-Tag: 5.0.2dr4~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5dd9c3087f3d1af5e05b372783e102daf04854d5;p=thirdparty%2Fstrongswan.git Raise an alert if CHILD_SA proposals mismatch --- diff --git a/src/libcharon/bus/bus.h b/src/libcharon/bus/bus.h index 433658ab76..4cb4ba343c 100644 --- a/src/libcharon/bus/bus.h +++ b/src/libcharon/bus/bus.h @@ -109,6 +109,8 @@ enum alert_t { ALERT_RETRANSMIT_RECEIVE, /** IKE proposals do not match, argument is linked_list_t of proposal_t */ ALERT_PROPOSAL_MISMATCH_IKE, + /** CHILD proposals do not match, argument is linked_list_t of proposal_t */ + ALERT_PROPOSAL_MISMATCH_CHILD, }; /** diff --git a/src/libcharon/sa/ikev2/tasks/child_create.c b/src/libcharon/sa/ikev2/tasks/child_create.c index 46a165546f..f9f719accb 100644 --- a/src/libcharon/sa/ikev2/tasks/child_create.c +++ b/src/libcharon/sa/ikev2/tasks/child_create.c @@ -377,6 +377,8 @@ static status_t select_and_install(private_child_create_t *this, if (this->proposal == NULL) { DBG1(DBG_IKE, "no acceptable proposal found"); + charon->bus->alert(charon->bus, ALERT_PROPOSAL_MISMATCH_CHILD, + this->proposals); return FAILED; } this->other_spi = this->proposal->get_spi(this->proposal);