diff options
author | Martin Willi <martin@revosec.ch> | 2012-11-06 11:32:18 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-12-19 10:40:33 +0100 |
commit | bcf3147e0a3eb21d7f9be6c8095053188ca26d83 (patch) | |
tree | 59e84037ae0b62913db7edf37ae028e7b8a87dc4 /src/libcharon | |
parent | 24f30ec92fff0611072741a3644209ef8d66e54a (diff) | |
download | strongswan-bcf3147e0a3eb21d7f9be6c8095053188ca26d83.tar.bz2 strongswan-bcf3147e0a3eb21d7f9be6c8095053188ca26d83.tar.xz |
Raise an alert if kernel SA installation fails
Diffstat (limited to 'src/libcharon')
-rw-r--r-- | src/libcharon/bus/bus.h | 2 | ||||
-rw-r--r-- | src/libcharon/sa/ikev2/tasks/child_create.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libcharon/bus/bus.h b/src/libcharon/bus/bus.h index aabc0fed0..1a064c358 100644 --- a/src/libcharon/bus/bus.h +++ b/src/libcharon/bus/bus.h @@ -114,6 +114,8 @@ enum alert_t { /** traffic selectors do not match, arguments are two linked_list_t * containing traffic_selector_t for initiator and for responder */ ALERT_TS_MISMATCH, + /** Installation of IPsec SAs failed, argument is child_sa_t */ + ALERT_INSTALL_CHILD_SA_FAILED, /** IKE_SA deleted because of "replace" unique policy, no argument */ ALERT_UNIQUE_REPLACE, /** IKE_SA deleted because of "keep" unique policy, no arguement */ diff --git a/src/libcharon/sa/ikev2/tasks/child_create.c b/src/libcharon/sa/ikev2/tasks/child_create.c index 0ded7fcfc..ed2af4334 100644 --- a/src/libcharon/sa/ikev2/tasks/child_create.c +++ b/src/libcharon/sa/ikev2/tasks/child_create.c @@ -552,6 +552,8 @@ static status_t select_and_install(private_child_create_t *this, (status_i != SUCCESS) ? "inbound " : "", (status_i != SUCCESS && status_o != SUCCESS) ? "and ": "", (status_o != SUCCESS) ? "outbound " : ""); + charon->bus->alert(charon->bus, ALERT_INSTALL_CHILD_SA_FAILED, + this->child_sa); return FAILED; } |