Raise an alert if kernel policy installation fails

This commit is contained in:
Martin Willi
2012-12-19 10:40:33 +01:00
parent bcf3147e0a
commit f285b9efc8
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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 */
@@ -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;
}