diff options
author | Martin Willi <martin@revosec.ch> | 2012-11-06 11:33:29 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-12-19 10:40:33 +0100 |
commit | f285b9efc81e1d4a1c2e45676ab11f655c7a3bf2 (patch) | |
tree | 927260180a603909a62a7c9ea661ec68007e8a8e | |
parent | bcf3147e0a3eb21d7f9be6c8095053188ca26d83 (diff) | |
download | strongswan-f285b9efc81e1d4a1c2e45676ab11f655c7a3bf2.tar.bz2 strongswan-f285b9efc81e1d4a1c2e45676ab11f655c7a3bf2.tar.xz |
Raise an alert if kernel policy installation fails
-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 1a064c358..94841f01a 100644 --- a/src/libcharon/bus/bus.h +++ b/src/libcharon/bus/bus.h @@ -116,6 +116,8 @@ enum alert_t { ALERT_TS_MISMATCH, /** Installation of IPsec SAs failed, argument is child_sa_t */ ALERT_INSTALL_CHILD_SA_FAILED, + /** Installation of IPsec Policy failed, argument is child_sa_t */ + ALERT_INSTALL_CHILD_POLICY_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 ed2af4334..c59b4d646 100644 --- a/src/libcharon/sa/ikev2/tasks/child_create.c +++ b/src/libcharon/sa/ikev2/tasks/child_create.c @@ -586,6 +586,8 @@ static status_t select_and_install(private_child_create_t *this, if (status != SUCCESS) { DBG1(DBG_IKE, "unable to install IPsec policies (SPD) in kernel"); + charon->bus->alert(charon->bus, ALERT_INSTALL_CHILD_POLICY_FAILED, + this->child_sa); return NOT_FOUND; } |