aboutsummaryrefslogtreecommitdiffstats
path: root/src/starter
diff options
context:
space:
mode:
Diffstat (limited to 'src/starter')
-rw-r--r--src/starter/invokecharon.c5
-rw-r--r--src/starter/invokepluto.c5
-rw-r--r--src/starter/starter.c4
3 files changed, 12 insertions, 2 deletions
diff --git a/src/starter/invokecharon.c b/src/starter/invokecharon.c
index bd15ac148..1eb2a0332 100644
--- a/src/starter/invokecharon.c
+++ b/src/starter/invokecharon.c
@@ -53,6 +53,11 @@ void starter_charon_sigchild(pid_t pid, int status)
(status == 64) ? "libstrongswan" : "charon");
_stop_requested = 1;
}
+ else if (status == SS_RC_INITIALIZATION_FAILED)
+ {
+ plog("charon has quit: initialization failed");
+ _stop_requested = 1;
+ }
if (!_stop_requested)
{
plog("charon has died -- restart scheduled (%dsec)"
diff --git a/src/starter/invokepluto.c b/src/starter/invokepluto.c
index 5ca1b45ab..08fb0657a 100644
--- a/src/starter/invokepluto.c
+++ b/src/starter/invokepluto.c
@@ -54,6 +54,11 @@ starter_pluto_sigchild(pid_t pid, int status)
(status == 64) ? "libstrongswan" : "pluto");
_stop_requested = 1;
}
+ else if (status == SS_RC_INITIALIZATION_FAILED)
+ {
+ plog("pluto has quit: initialization failed");
+ _stop_requested = 1;
+ }
if (!_stop_requested)
{
plog("pluto has died -- restart scheduled (%dsec)"
diff --git a/src/starter/starter.c b/src/starter/starter.c
index b64227238..72421ca96 100644
--- a/src/starter/starter.c
+++ b/src/starter/starter.c
@@ -103,8 +103,8 @@ static void fsig(int signal)
else if (WIFEXITED(status))
{
exit_status = WEXITSTATUS(status);
- if (exit_status == SS_RC_LIBSTRONGSWAN_INTEGRITY ||
- exit_status == SS_RC_DAEMON_INTEGRITY)
+ if (exit_status >= SS_RC_LIBSTRONGSWAN_INTEGRITY &&
+ exit_status <= SS_RC_INITIALIZATION_FAILED)
{
_action_ = FLAG_ACTION_QUIT;
}