diff --git a/RELNOTES b/RELNOTES index f9bb65bd..f8c62a4a 100644 --- a/RELNOTES +++ b/RELNOTES @@ -172,11 +172,15 @@ by Eric Young (eay@cryptsoft.com). - Add code to properly dereference a pointer in the dhclient code on an error condition. - [ISC-Bugs #36194 + [ISC-Bugs #36194] - Add code to help clean up soft leases. [ISC-Bugs #36304] +- Disable the gentle shutdown functionality until we can determine + the best way to present it to remove or reduce the side effects. + [ISC-Bugs #36066] + Changes since 4.3.0rc1 - None diff --git a/client/dhclient.c b/client/dhclient.c index 12c42b79..5ef59cd4 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -714,9 +714,12 @@ main(int argc, char **argv) { dmalloc_outstanding = 0; #endif +#if defined(ENABLE_GENTLE_SHUTDOWN) + /* no signal handlers until we deal with the side effects */ /* install signal handlers */ signal(SIGINT, dhcp_signal_handler); /* control-c */ signal(SIGTERM, dhcp_signal_handler); /* kill */ +#endif /* If we're not supposed to wait before getting the address, don't. */ diff --git a/includes/site.h b/includes/site.h index 6ba5a8a7..d87b309e 100644 --- a/includes/site.h +++ b/includes/site.h @@ -295,6 +295,15 @@ prefix. */ #define DHCLIENT_DEFAULT_PREFIX_LEN 64 +/* Enable the gentle shutdown signal handling. Currently this + means that on SIGINT or SIGTERM a client will release its + address and a server in a failover pair will go through + partner down. Both of which can be undesireable in some + situations. We plan to revisit this feature and may + make non-backwards compatible changes including the + removal of this define. Use at your own risk. */ +/* #define ENABLE_GENTLE_SHUTDOWN */ + /* Include definitions for various options. In general these should be left as is, but if you have already defined one of these and prefer your definition you can comment the diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index 115fbd45..80ebc395 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -591,9 +591,12 @@ main(int argc, char **argv) { dhcpv6_packet_handler = do_packet6; #endif +#if defined(ENABLE_GENTLE_SHUTDOWN) + /* no signal handlers until we deal with the side effects */ /* install signal handlers */ signal(SIGINT, dhcp_signal_handler); /* control-c */ signal(SIGTERM, dhcp_signal_handler); /* kill */ +#endif /* Start dispatching packets and timeouts... */ dispatch(); diff --git a/server/dhcpd.c b/server/dhcpd.c index 1f2d774f..24d638e7 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -787,9 +787,12 @@ main(int argc, char **argv) { omapi_set_int_value ((omapi_object_t *)dhcp_control_object, (omapi_object_t *)0, "state", server_running); +#if defined(ENABLE_GENTLE_SHUTDOWN) + /* no signal handlers until we deal with the side effects */ /* install signal handlers */ signal(SIGINT, dhcp_signal_handler); /* control-c */ signal(SIGTERM, dhcp_signal_handler); /* kill */ +#endif /* Log that we are about to start working */ log_info("Server starting service.");