diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2020-02-27 13:45:49 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-16 16:44:53 +0000 |
commit | ae1001ab3a82de100619878644ff5e20d276eb6c (patch) | |
tree | 0cfb2de9e93bf7bc5156a582d5c24f922a2b7b4a /meta/recipes-connectivity/dhcp/dhcp/0002-Added-shutdown-log-statment-to-dhcrelay.patch | |
parent | f4f272f72c71fe1056f7658b767225139e797b27 (diff) | |
download | poky-ae1001ab3a82de100619878644ff5e20d276eb6c.tar.gz |
dhcp: Fix REQUIRE(ctx->running) assertion triggered on SIGTERM/SIGINT
Closed a small window of time between the installation of graceful
shutdown signal handlers and application context startup, during which
the receipt of shutdown signal would cause a REQUIRE() assertion to
occur. Note this issue is only visible when compiling with
ENABLE_GENTLE_SHUTDOWN defined.
Reference:
https://gitlab.isc.org/isc-projects/dhcp/issues/53
Upstream patches:
https://gitlab.isc.org/isc-projects/dhcp/commit/ce117de7a1ed3c4911b4009c1cc23fba85370a26
https://gitlab.isc.org/isc-projects/dhcp/commit/dbd36dfa82956b53683462afadfabb1b33fa3dd1
https://gitlab.isc.org/isc-projects/dhcp/commit/95944cab6035d20be270eec01254c7bb867ec705
(From OE-Core rev: 7235c62727e48415c4e81f852607311ec31b6e41)
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/dhcp/dhcp/0002-Added-shutdown-log-statment-to-dhcrelay.patch')
-rw-r--r-- | meta/recipes-connectivity/dhcp/dhcp/0002-Added-shutdown-log-statment-to-dhcrelay.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0002-Added-shutdown-log-statment-to-dhcrelay.patch b/meta/recipes-connectivity/dhcp/dhcp/0002-Added-shutdown-log-statment-to-dhcrelay.patch new file mode 100644 index 0000000000..78b2b74f45 --- /dev/null +++ b/meta/recipes-connectivity/dhcp/dhcp/0002-Added-shutdown-log-statment-to-dhcrelay.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From adcd34ae1f56b16d7e9696d980332b4cf6c7ce91 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Markwalder <tmark@isc.org> | ||
3 | Date: Fri, 13 Sep 2019 15:03:31 -0400 | ||
4 | Subject: [PATCH 2/3] Added shutdown log statment to dhcrelay | ||
5 | |||
6 | Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/dhcp.git] | ||
7 | |||
8 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
9 | --- | ||
10 | relay/dhcrelay.c | 3 +++ | ||
11 | 1 file changed, 3 insertions(+) | ||
12 | |||
13 | diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c | ||
14 | index d8caaaf..4bd1d47 100644 | ||
15 | --- a/relay/dhcrelay.c | ||
16 | +++ b/relay/dhcrelay.c | ||
17 | @@ -2076,6 +2076,9 @@ dhcp_set_control_state(control_object_state_t oldstate, | ||
18 | if (newstate != server_shutdown) | ||
19 | return ISC_R_SUCCESS; | ||
20 | |||
21 | + /* Log shutdown on signal. */ | ||
22 | + log_info("Received signal %d, initiating shutdown.", shutdown_signal); | ||
23 | + | ||
24 | if (no_pid_file == ISC_FALSE) | ||
25 | (void) unlink(path_dhcrelay_pid); | ||
26 | |||
27 | -- | ||
28 | 2.23.0 | ||
29 | |||