From 9a5a2c713f34639d25a1f0c3f46160f908d7cc15 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Tue, 14 Feb 2017 10:13:34 -0500 Subject: strongswan-5.5.1-5: rebuild --- pcr/strongswan/2222-charon-systemd-sighup.patch | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pcr/strongswan/2222-charon-systemd-sighup.patch (limited to 'pcr/strongswan/2222-charon-systemd-sighup.patch') diff --git a/pcr/strongswan/2222-charon-systemd-sighup.patch b/pcr/strongswan/2222-charon-systemd-sighup.patch new file mode 100644 index 000000000..544612c20 --- /dev/null +++ b/pcr/strongswan/2222-charon-systemd-sighup.patch @@ -0,0 +1,33 @@ +index 5c7bbd779..fc93e2182 100644 +--- a/src/charon-systemd/charon-systemd.c ++++ b/src/charon-systemd/charon-systemd.c +@@ -241,6 +241,7 @@ static int run() + sigset_t set; + + sigemptyset(&set); ++ sigaddset(&set, SIGHUP); + sigaddset(&set, SIGTERM); + sigprocmask(SIG_BLOCK, &set, NULL); + +@@ -262,6 +263,21 @@ static int run() + } + switch (sig) + { ++ case SIGHUP: ++ { ++ DBG1(DBG_DMN, "signal of type SIGHUP received. Reloading " ++ "configuration"); ++ if (lib->settings->load_files(lib->settings, lib->conf, FALSE)) ++ { ++ charon->load_loggers(charon, NULL, FALSE); ++ lib->plugins->reload(lib->plugins, NULL); ++ } ++ else ++ { ++ DBG1(DBG_DMN, "reloading config failed, keeping old"); ++ } ++ break; ++ } + case SIGTERM: + { + DBG1(DBG_DMN, "SIGTERM received, shutting down"); -- cgit v1.2.3