From ae1001ab3a82de100619878644ff5e20d276eb6c Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Thu, 27 Feb 2020 13:45:49 +0200 Subject: 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 Signed-off-by: Anuj Mittal Signed-off-by: Richard Purdie --- ...2-Added-shutdown-log-statment-to-dhcrelay.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 meta/recipes-connectivity/dhcp/dhcp/0002-Added-shutdown-log-statment-to-dhcrelay.patch (limited to 'meta/recipes-connectivity/dhcp/dhcp/0002-Added-shutdown-log-statment-to-dhcrelay.patch') 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 @@ +From adcd34ae1f56b16d7e9696d980332b4cf6c7ce91 Mon Sep 17 00:00:00 2001 +From: Thomas Markwalder +Date: Fri, 13 Sep 2019 15:03:31 -0400 +Subject: [PATCH 2/3] Added shutdown log statment to dhcrelay + +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/dhcp.git] + +Signed-off-by: Ovidiu Panait +--- + relay/dhcrelay.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c +index d8caaaf..4bd1d47 100644 +--- a/relay/dhcrelay.c ++++ b/relay/dhcrelay.c +@@ -2076,6 +2076,9 @@ dhcp_set_control_state(control_object_state_t oldstate, + if (newstate != server_shutdown) + return ISC_R_SUCCESS; + ++ /* Log shutdown on signal. */ ++ log_info("Received signal %d, initiating shutdown.", shutdown_signal); ++ + if (no_pid_file == ISC_FALSE) + (void) unlink(path_dhcrelay_pid); + +-- +2.23.0 + -- cgit v1.2.3-54-g00ecf